-
Notifications
You must be signed in to change notification settings - Fork 1
/
production.yml
52 lines (48 loc) · 1.26 KB
/
production.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
version: '3'
services:
nginx:
restart: always
image: nginx:latest
ports:
- "443:443"
- "80:80"
volumes:
- ./qr:/qr
- ./nginx:/etc/nginx/conf.d
- ./sslfiles:/etc/nginx/ssl
depends_on:
- web
networks:
- nginx_network
db:
restart: always
image: postgres:10
networks:
- db_network
volumes:
- dev_postgres_volume:/var/lib/postgresql/data
env_file:
- ./.envs/.production/.postgres
web:
restart: always
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
command: bash -c "python manage.py collectstatic --noinput && python manage.py makemigrations core && python manage.py makemigrations codes && python manage.py makemigrations codes && python manage.py makemigrations disabled && python manage.py makemigrations ubication && python manage.py makemigrations items && python manage.py migrate && gunicorn qr.wsgi -b 0.0.0.0:443"
volumes:
- ./qr:/qr
depends_on:
- db
networks:
- db_network
- nginx_network
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
networks:
db_network:
driver: bridge
nginx_network:
driver: bridge
volumes:
dev_postgres_volume: