diff --git a/example/gateway/certbot/files/crontab_nobody b/example/gateway/certbot/files/crontab_nobody index 7612fe8..a577bdb 100644 --- a/example/gateway/certbot/files/crontab_nobody +++ b/example/gateway/certbot/files/crontab_nobody @@ -1,2 +1 @@ -@reboot /usr/local/bin/python3 /certbot/scripts/certbot.py >/dev/null 2>&1 @weekly /usr/local/bin/certbot renew --webroot -w /certbot/webroot --server https://127.0.11.1:14000 --no-verify-ssl -n --agree-tos >/dev/null 2>&1 diff --git a/example/gateway/focker-compose.yml b/example/gateway/focker-compose.yml index 84b962b..29cc1a5 100644 --- a/example/gateway/focker-compose.yml +++ b/example/gateway/focker-compose.yml @@ -26,6 +26,7 @@ jails: image: nginx-http mounts: certbot-webroot: /certbot/webroot + ip4.addr: 127.0.12.1 certbot: image: certbot @@ -33,9 +34,19 @@ jails: mounts: certbot-data: /usr/local/etc/letsencrypt certbot-webroot: /certbot/webroot + exec.start: | + rm -vf /usr/local/etc/letsencrypt/.ready && \ + ( ( /usr/local/bin/python3 /certbot/scripts/certbot.py && \ + touch /usr/local/etc/letsencrypt/.ready ) & ) && \ + /bin/sh /etc/rc + ip4.addr: 127.0.13.1 nginx-https: image: nginx-https depend: certbot mounts: certbot-data: /usr/local/etc/letsencrypt + exec.start: | + ( until [ -f /usr/local/etc/letsencrypt/.ready ]; do sleep 1; done && \ + /bin/sh /etc/rc) & + ip4.addr: 127.0.14.1