-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose-prod.yml
59 lines (51 loc) · 1.31 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.5'
services:
p_proxy:
build:
context: "./env/prod/proxy"
args:
server_name_arg: ${NGINX_SERVER_NAME:-sospandemia.org}
ports:
- "80:80"
- "443:443"
depends_on:
- p_spa
- p_api
volumes:
- ./env/prod/proxy/certbot/data:/etc/letsencrypt
- ./env/prod/proxy/certbot/www:/var/www/certbot
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
volumes:
- ./env/prod/proxy/certbot/data:/etc/letsencrypt
- ./env/prod/proxy/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
p_spa:
build:
context: "./env/prod/spa"
p_web:
build:
context: "./env/prod/api"
dockerfile: web.Dockerfile
working_dir: /var/www
p_api:
build:
context: "./env/prod/api"
dockerfile: api.Dockerfile
working_dir: /var/www
volumes:
- p_storage-volume:/var/www/storage
depends_on:
- p_db
p_db:
image: mdillon/postgis:11
environment:
POSTGRES_PASSWORD: postgres
volumes:
- p_database-volume:/var/lib/postgresql/data
p_redis:
image: redis:5
volumes:
p_database-volume:
p_storage-volume: