-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
executable file
·53 lines (49 loc) · 1.02 KB
/
docker-compose.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
name: react-rust-postgres
services:
frontend:
build:
context: ../frontend
target: dev-envs
networks:
- client-side
ports:
- 3000:3000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
backend:
build:
context: ../backend
target: dev-envs
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}
networks:
- client-side
- server-side
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- db
db:
image: postgres:12-alpine
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: {}