-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
63 lines (63 loc) · 1.4 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: '3'
services:
db:
image: postgres
container_name: panopticum_db
ports:
- "5433:5432"
environment:
POSTGRES_USER: panopticum_user
POSTGRES_PASSWORD: panopticum_password
POSTGRES_DB: panopticum_db
volumes:
- ./data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 2s
timeout: 2s
retries: 10
deploy:
resources:
limits:
cpus: '2'
memory: 6000M
reservations:
cpus: '1'
memory: 4000M
web:
build: .
container_name: panopticum_backend
ports:
- "8000:8000"
volumes:
- ./compose/panopticum/settings_local.py:/opt/panopticum/panopticum_django/settings_local.py:ro
depends_on:
init:
condition: service_completed_successfully
db:
condition: service_healthy
deploy:
resources:
limits:
cpus: '2'
memory: 1000M
reservations:
cpus: '1'
memory: 500M
nginx:
image: nginx
container_name: panopticum_nginx
ports:
- "80:80"
volumes:
- ./compose/nginx:/etc/nginx/conf.d:ro
depends_on:
- web
- db
init:
build: .
container_name: panopticum_migrate
command: python manage.py migrate
depends_on:
db:
condition: service_healthy