-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.prod.yml
59 lines (59 loc) · 1.29 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
58
59
version: "3.2"
services:
backend_prod:
container_name: backend_prod
build:
context: ./backend
args:
requirements: requirements/production.txt
# default requirements set to production (will override Dockerfile's default value)
command: gunicorn backend.wsgi:application --bind 0.0.0.0:8001
env_file:
- ./env/.env
environment:
- DJANGO_SETTINGS_MODULE=backend.settings.production
networks:
- main
volumes:
- backendStatic:/backend/backend/static
depends_on:
- db
frontend_prod:
container_name: frontend_prod
build:
context: ./frontend
dockerfile: Dockerfile.prod
networks:
- main
depends_on:
- backend_prod
volumes:
- frontendData:/build
db:
container_name: db_prod
image: postgres:alpine
env_file:
- ./env/.env.prod.db
networks:
- main
ports:
- "5432:5432"
nginx:
container_name: nginx_prod
image: nginx:alpine
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- frontendData:/frontend:ro
- backendStatic:/backend/static:ro
ports:
- 80:80
- 8080:8080
networks:
- main
depends_on:
- frontend_prod
networks:
main:
volumes:
frontendData:
backendStatic: