-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
76 lines (68 loc) · 1.58 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: '3.8'
services:
db:
image: postgres:14.6-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- diploma_pg_data:/var/lib/postgresql/data
healthcheck:
test: pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
timeout: 3s
retries: 10
interval: 3s
api:
build: .
env_file: .env
environment:
POSTGRES_HOST: db
depends_on:
db:
condition: service_healthy
ports:
- "8000:8000"
command: python3 manage.py runserver 0.0.0.0:8000
volumes:
- ./todolist:/opt/todolist/
bot:
build: .
env_file: .env
environment:
POSTGRES_HOST: db
depends_on:
db:
condition: service_healthy
api:
condition: service_started
command: python3 manage.py runbot
collect_static:
build: .
env_file: .env
entrypoint: ''
depends_on:
api:
condition: service_started
db:
condition: service_healthy
volumes:
- django_static:/opt/static/
command: python3 manage.py collectstatic -c --no-input
frontend:
image: sermalenk/skypro-front:lesson-38
ports:
- "80:80"
depends_on:
collect_static:
condition: service_completed_successfully
api:
condition: service_started
volumes:
- django_static:/usr/share/nginx/html/static/
- ./deploy/nginx.conf:/etc/nginx/conf.d/default.conf
volumes:
diploma_pg_data:
django_static: