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"
|
2018-11-25 11:38:52 +01:00
|
|
|
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;'"
|