-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.dev.yaml
69 lines (64 loc) · 1.36 KB
/
compose.dev.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: react-rust-postgres
services:
frontend:
build:
context: frontend
target: development
container_name: frontend
networks:
- client-side
ports:
- 3000:3000
volumes:
- ~/vietaku/frontend/src:/code/src:ro
frontend-react:
build:
context: frontend_react
target: development
container_name: frontend-react
networks:
- client-side
ports:
- 3001:3001
volumes:
- ~/vietaku/frontend_react/src:/code/src:ro
backend:
build:
context: backend
target: development
environment:
- ADDRESS=0.0.0.0:8000
- RUST_LOG=debug
- PG_DBNAME=${POSTGRES_DB}
- PG_HOST=db
- PG_USER=${POSTGRES_USER}
- PG_PASSWORD=${POSTGRES_PASSWORD}
container_name: backend
networks:
- client-side
- server-side
volumes:
- ~/vietaku/backend/src:/code/src
- backend-cache:/code/target
depends_on:
- db
db:
image: postgres:12-alpine
container_name: db
restart: always
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
networks:
- server-side
ports:
- 5432:5432
volumes:
- db-data:/var/lib/postgresql/data
networks:
client-side: {}
server-side: {}
volumes:
backend-cache: {}
db-data: {}