1
0
mirror of https://github.com/wmnnd/nginx-certbot synced 2023-04-20 18:47:46 +08:00
nginx-certbot/docker-compose.yml

22 lines
660 B
YAML
Raw Normal View History

2018-09-28 10:17:07 +02:00
version: '3'
2018-12-23 14:36:58 +04:00
2018-09-28 10:17:07 +02:00
services:
nginx:
image: nginx:1.15-alpine
2018-12-18 12:54:17 +04:00
restart: unless-stopped
2018-09-28 10:17:07 +02:00
volumes:
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
ports:
- "80:80"
- "443:443"
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
2018-09-28 10:17:07 +02:00
certbot:
image: certbot/certbot
2018-12-18 12:54:17 +04:00
restart: unless-stopped
2018-09-28 10:17:07 +02:00
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"