-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.prod.yml
106 lines (97 loc) · 2.49 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
95
96
97
98
99
100
101
102
103
104
105
106
# Inspiration:
# https://goo.gl/n1q5Gf
# https://goo.gl/HzrrFa
version: '3'
services:
frontend:
image: gcr.io/digital-seat-198720/frontend:$COMMIT_SHA
depends_on:
- nginx-letsencrypt
environment:
- VIRTUAL_HOST=legacy.auzom.gg
- LETSENCRYPT_HOST=legacy.auzom.gg
restart: unless-stopped
postgres:
image: postgres:$POSTGRES_VERSION
volumes:
- /mnt/disks/data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres
restart: unless-stopped
backend:
image: gcr.io/digital-seat-198720/backend:$COMMIT_SHA
depends_on:
- nginx-letsencrypt
- postgres
environment:
- VIRTUAL_HOST=api.legacy.auzom.gg
- LETSENCRYPT_HOST=api.legacy.auzom.gg
- STATIC_HOST=legacy.auzom.gg
- POSTGRES_URL=$POSTGRES_URL
env_file: .secrets
command: serve
restart: unless-stopped
worker:
image: gcr.io/digital-seat-198720/backend:$COMMIT_SHA
depends_on:
- postgres
environment:
- STATIC_HOST=legacy.auzom.gg
- POSTGRES_URL=$POSTGRES_URL
env_file: .secrets
command: work
restart: unless-stopped
nginx:
image: nginx
container_name: nginx
labels: [com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy]
volumes:
- confd:/etc/nginx/conf.d
- vhostd:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs:ro
ports:
- 80:80
- 443:443
restart: unless-stopped
nginx-gen:
image: jwilder/docker-gen
depends_on:
- nginx
labels: [com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen]
volumes:
- confd:/etc/nginx/conf.d
- vhostd:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
entrypoint: []
command:
- sh
- -c
- |
wget https://raw.githubusercontent.com/jwilder/nginx-proxy/master/nginx.tmpl
docker-gen \
-notify-sighup nginx \
-watch \
-wait 5s:30s \
nginx.tmpl /etc/nginx/conf.d/default.conf
restart: unless-stopped
nginx-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
depends_on:
- nginx-gen
volumes:
- confd:/etc/nginx/conf.d
- vhostd:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
volumes:
confd:
vhostd:
html:
certs: