-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (53 loc) · 1.06 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
version: '3.1'
services:
app:
container_name: django_container
image: django_app:latest
expose:
- 8000
env_file:
- ./.env/django.env
volumes:
- django_static_volume:/app/staticfiles
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
depends_on:
db:
condition: service_healthy
web:
container_name: nginx_container
image: django_web:latest
ports:
- 8080:80
env_file:
- ./.env/nginx.env
volumes:
- django_static_volume:/usr/share/nginx/staticfiles
deploy:
resources:
limits:
cpus: '0.5'
memory: 128M
depends_on:
- app
db:
container_name: postgres_container
image: postgres
env_file:
- ./.env/postgres.env
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
healthcheck:
test: ["CMD-SHELL", "pg_isready -d postgres -U postgres"]
interval: 5s
timeout: 10s
retries: 3
start_period: 5s
volumes:
django_static_volume: