This repository has been archived by the owner on Jul 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
94 lines (86 loc) · 2.26 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: "3.8"
services:
## entry point for all containers, can be accessed from public
core-reverse-proxy:
image: jwilder/nginx-proxy:alpine
container_name: core-reverse-proxy
ports:
- "80:80"
- "443:443"
networks:
- service
restart: always
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./core-reverse-proxy/client_max_body_size.conf:/etc/nginx/conf.d/client_max_body_size.conf:ro
- nginx-certs:/etc/nginx/certs
- nginx-vhost:/etc/nginx/vhost.d
- nginx-html:/usr/share/nginx/html
## provides SSL
ssl-provider:
image: jrcs/letsencrypt-nginx-proxy-companion
networks:
- service
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- nginx-certs:/etc/nginx/certs
- nginx-vhost:/etc/nginx/vhost.d
- nginx-html:/usr/share/nginx/html
environment:
- DEFAULT_EMAIL=treeckle@googlegroups.com
- NGINX_PROXY_CONTAINER=core-reverse-proxy
## entry point for treeckle app containers
app-reverse-proxy:
image: jermytan/treeckle-reverse-proxy:production
volumes:
- static-volume:/app/static
networks:
- service
- frontend
- backend
restart: always
environment:
- VIRTUAL_HOST=v2.treeckle.com
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=v2.treeckle.com
- LETSENCRYPT_EMAIL=treeckle@googlegroups.com
## can only be accessed within frontend network
frontend:
image: jermytan/treeckle-frontend:production
networks:
- frontend
restart: always
## can only be accessed within backend network
backend:
image: jermytan/treeckle-backend:production
command: sh -c "cd treeckle && gunicorn treeckle.wsgi:application --bind 0.0.0.0:8000"
volumes:
- static-volume:/app/static
networks:
- backend
restart: always
env_file:
- .env.backend.prod
depends_on:
- db
## can only be accessed within backend network
db:
image: postgres:13-alpine
networks:
- backend
volumes:
- postgres-data:/var/lib/postgresql/data/
env_file:
- .env.db.prod
restart: always
networks:
service:
frontend:
backend:
volumes:
nginx-certs:
nginx-vhost:
nginx-html:
postgres-data:
static-volume: