/
production.yml
56 lines (51 loc) · 1.16 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
53
54
55
56
version: '3.8'
networks:
my_network:
driver: bridge
volumes:
csoc_postgres_data: {}
static:
gunicorn_socket:
nginx_modsec_conf:
services:
postgres:
image: postgres
container_name: csoc_postgres
networks:
- my_network
volumes:
- csoc_postgres_data:/var/lib/postgresql/data
env_file:
- .env
django_gunicorn:
image: csoc_django_gunicorn
restart: always
links:
- postgres:postgres
volumes:
- .:/app:z
- ./static:/app/static
- ./logs:/app/logs
- gunicorn_socket:/app
env_file:
- .env
networks:
- my_network
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
container_name: csoc_django_gunicorn
depends_on:
- postgres
nginx:
build: ./compose/production/nginx
volumes:
- ./static:/app/static
- /etc/letsencrypt/live/csoc.codeshack.codes/fullchain.pem:/etc/nginx/certs/fullchain.pem:ro
- /etc/letsencrypt/live/csoc.codeshack.codes/privkey.pem:/etc/nginx/certs/privkey.pem:ro
- gunicorn_socket:/app
ports:
- "80:80"
- "443:443"
depends_on:
- django_gunicorn