22 lines
683 B
YAML
22 lines
683 B
YAML
|
|
version: '3.5'
|
||
|
|
services:
|
||
|
|
certbot:
|
||
|
|
container_name: certbot
|
||
|
|
image: certbot/certbot
|
||
|
|
restart: unless-stopped
|
||
|
|
volumes:
|
||
|
|
- /srv/certbot/etc:/etc/letsencrypt
|
||
|
|
- /srv/certbot/www:/var/www/certbot
|
||
|
|
entrypoint: >
|
||
|
|
/bin/sh -c 'trap exit TERM;
|
||
|
|
certbot certonly --noninteractive --register-unsafely-without-email --agree-tos --reinstall --cert-name {{domain_name}} -d {{domain_name}} --webroot --webroot-path=/var/www/certbot
|
||
|
|
; while :; do certbot renew --noninteractive --webroot --webroot-path=/var/www/certbot --cert-name {{domain_name}}
|
||
|
|
; sleep 12h & wait $${!}; done;'
|
||
|
|
networks:
|
||
|
|
- nginx
|
||
|
|
|
||
|
|
networks:
|
||
|
|
nginx:
|
||
|
|
external: true
|
||
|
|
|