19 lines
659 B
YAML
19 lines
659 B
YAML
version: '3'
|
|
services:
|
|
nginx:
|
|
image: nginx:1.15-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data/nginx.conf:/etc/nginx/conf.d/default.conf
|
|
- ./data/certbot/conf:/etc/letsencrypt
|
|
- ./data/certbot/www:/var/www/certbot
|
|
ports:
|
|
- '80:80'
|
|
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 400h & wait $${!}; done;'" |