forked from ghotiphud/rust-web-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (35 loc) · 871 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: "3"
services:
web:
build: ./web
volumes:
- ./web:/usr/src/app
ports:
- "3000:3000"
command: bash -c "yarn && yarn start"
links:
- api_server
api_server:
build: ./api_server
ports:
- "3001:3001"
volumes:
- ./api_server:/usr/src/app
links:
- db
# diesel infer_schema macro gives warnings with this flag.
# environment:
# - CARGO_INCREMENTAL=1
command: bash -c "bash ./wait-for-it.sh db:5432 -q -- diesel setup && cargo watch -x run"
db:
image: "postgres:9"
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data/pgdata
environment:
POSTGRES_PASSWORD: supersecretpassword
PGDATA: /var/lib/postgresql/data/pgdata
# cargo will try to redownload packages @ docker-compose up so store them here.
volumes:
pgdata: {}