-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
57 lines (51 loc) · 954 Bytes
/
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
54
55
56
57
version: "3.8"
services:
backend:
restart: always
volumes:
- static:/static
env_file:
- .env
build:
context: ./backend
ports:
- "8000:8000"
container_name: backend_container
depends_on:
db:
condition: service_healthy
frontend:
build:
context: ./frontend
volumes:
- frontend:/app/build
db:
restart: always
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
ports:
- "5433:5432"
container_name: postgres_db
env_file:
- .env
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
nginx:
build:
context: ./nginx
volumes:
- static:/static
- frontend:/var/www/frontend
ports:
- "81:80"
container_name: nginx_container
depends_on:
- backend
- frontend
volumes:
static:
frontend: