-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.prod.yml
57 lines (52 loc) · 1.15 KB
/
docker-compose.prod.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
version: "3.7"
services:
postgresql:
image: postgres:12.0-alpine
container_name: predico_postgresql
restart: always
env_file:
- api/.env
volumes:
- postgresql-data:/var/lib/postgresql/data
networks:
- predico_network
ports:
- "5432:5432"
app: &api
build: api
container_name: predico_rest_app
environment:
- WAIT_HOSTS=postgresql:5432
restart: unless-stopped
command: gunicorn -c gunicorn.conf api.wsgi:application -b :8000
depends_on:
- postgresql
env_file:
- api/.env
networks:
- predico_network
volumes:
- static_volume:/usr/src/django/api/staticfiles
- media_volume:/usr/src/django/api/mediafiles
nginx:
container_name: predico_rest_nginx
restart: unless-stopped
build:
context: nginx
dockerfile: Dockerfile
ports:
- "80:80"
depends_on:
- app
networks:
- predico_network
volumes:
- static_volume:/usr/src/api/staticfiles
- media_volume:/usr/src/api/mediafiles
volumes:
postgresql-data:
static_volume:
media_volume:
networks:
predico_network:
driver: bridge