-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
35 lines (32 loc) · 1001 Bytes
/
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
version: "3"
services:
nginx:
image: nginx:stable-alpine
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.prod.conf:/etc/nginx/conf.d/default.conf
- ./data/certbot/dhparam:/etc/nginx/dhparam
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/logs:/var/log/letsencrypt
networks:
- app-network
depends_on:
- app
certbot:
image: certbot/certbot:latest
container_name: app-certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/logs:/var/log/letsencrypt
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
- app-network
app:
volumes:
- /app/node_modules
environment:
- NODE_ENV=production
command: yarn start