mirror of
https://github.com/wmnnd/nginx-certbot
synced 2023-04-20 18:47:46 +08:00
22 lines
660 B
YAML
22 lines
660 B
YAML
version: '3'
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:1.15-alpine
|
|
restart: unless-stopped
|
|
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;\"'"
|
|
certbot:
|
|
image: certbot/certbot
|
|
restart: unless-stopped
|
|
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;'"
|