Added PROPOGATION_TIME variable
This commit is contained in:
parent
1773f9d3ee
commit
09bdaf819c
@ -17,6 +17,7 @@ ENV DOMAINS=
|
|||||||
ENV EMAIL=
|
ENV EMAIL=
|
||||||
ENV INTERVAL="0 */6 * * *"
|
ENV INTERVAL="0 */6 * * *"
|
||||||
ENV STAGING=false
|
ENV STAGING=false
|
||||||
|
ENV PROPOGATION_TIME=10
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/tini", "-s", "/run.sh"]
|
ENTRYPOINT ["/usr/bin/tini", "-s", "/run.sh"]
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@ docker run -d --name certbot-cron \
|
|||||||
| DOMAINS | None | Domains to be included in the certificate. Comma separated list, no spaces. Wildcards supported |
|
| DOMAINS | None | Domains to be included in the certificate. Comma separated list, no spaces. Wildcards supported |
|
||||||
| INTERVAL | 0 */6 * * * | How often certbot attempts to renew the certificate. Cron syntax |
|
| INTERVAL | 0 */6 * * * | How often certbot attempts to renew the certificate. Cron syntax |
|
||||||
| STAGING | false | Uses the LetsEncrypt staging endpoint for testing - avoids the aggressive rate-limiting of the production endpoint |
|
| STAGING | false | Uses the LetsEncrypt staging endpoint for testing - avoids the aggressive rate-limiting of the production endpoint |
|
||||||
|
| PROPOGATION_TIME | 10 | The amount of time (seconds) that certbot waits for the TXT records to propogate to Cloudflare before verifying - the more domains in the certificate, the longer you might need |
|
||||||
|
|
||||||
|
|
||||||
## Volumes
|
## Volumes
|
||||||
|
|
||||||
|
4
renew.sh
4
renew.sh
@ -4,12 +4,12 @@ echo "Attempting to renew certificates"
|
|||||||
if [[ $STAGING = true ]]
|
if [[ $STAGING = true ]]
|
||||||
then
|
then
|
||||||
echo "Using staging endpoint - THIS SHOULD BE USED FOR TESTING ONLY"
|
echo "Using staging endpoint - THIS SHOULD BE USED FOR TESTING ONLY"
|
||||||
certbot certonly --staging --non-interactive --agree-tos --dns-cloudflare --dns-cloudflare-credentials /config/.secrets/cloudflare.ini --email $EMAIL -d $DOMAINS
|
certbot certonly --staging --non-interactive --agree-tos --dns-cloudflare --dns-cloudflare-propagation-seconds $PROPOGATION_TIME --dns-cloudflare-credentials /config/.secrets/cloudflare.ini --email $EMAIL -d $DOMAINS
|
||||||
echo "Renewal attempt complete"
|
echo "Renewal attempt complete"
|
||||||
elif [[ $STAGING = false ]]
|
elif [[ $STAGING = false ]]
|
||||||
then
|
then
|
||||||
echo "Using production endpoint"
|
echo "Using production endpoint"
|
||||||
certbot certonly --non-interactive --agree-tos --dns-cloudflare --dns-cloudflare-credentials /config/.secrets/cloudflare.ini --email $EMAIL -d $DOMAINS
|
certbot certonly --non-interactive --agree-tos --dns-cloudflare --dns-cloudflare-propagation-seconds $PROPOGATION_TIME --dns-cloudflare-credentials /config/.secrets/cloudflare.ini --email $EMAIL -d $DOMAINS
|
||||||
echo "Renewal attempt complete"
|
echo "Renewal attempt complete"
|
||||||
else
|
else
|
||||||
echo "Unrecognised option for STAGING variable - check your configuration"
|
echo "Unrecognised option for STAGING variable - check your configuration"
|
||||||
|
6
run.sh
6
run.sh
@ -51,17 +51,19 @@ ln -s /config/letsencrypt /etc/letsencrypt
|
|||||||
|
|
||||||
echo "Domains being added to the certificate are "$DOMAINS
|
echo "Domains being added to the certificate are "$DOMAINS
|
||||||
|
|
||||||
|
echo "Propogation time is $PROPOGATION_TIME seconds"
|
||||||
|
|
||||||
echo "Creating certificates, or attempting to renew if they already exist"
|
echo "Creating certificates, or attempting to renew if they already exist"
|
||||||
|
|
||||||
if [[ $STAGING = true ]]
|
if [[ $STAGING = true ]]
|
||||||
then
|
then
|
||||||
echo "Using staging endpoint - THIS SHOULD BE USED FOR TESTING ONLY"
|
echo "Using staging endpoint - THIS SHOULD BE USED FOR TESTING ONLY"
|
||||||
certbot certonly --staging --non-interactive --agree-tos --dns-cloudflare --dns-cloudflare-credentials /config/.secrets/cloudflare.ini --email $EMAIL -d $DOMAINS
|
certbot certonly --staging --non-interactive --agree-tos --dns-cloudflare --dns-cloudflare-propagation-seconds $PROPOGATION_TIME --dns-cloudflare-credentials /config/.secrets/cloudflare.ini --email $EMAIL -d $DOMAINS
|
||||||
echo "Creation/renewal attempt complete"
|
echo "Creation/renewal attempt complete"
|
||||||
elif [[ $STAGING = false ]]
|
elif [[ $STAGING = false ]]
|
||||||
then
|
then
|
||||||
echo "Using production endpoint"
|
echo "Using production endpoint"
|
||||||
certbot certonly --non-interactive --agree-tos --dns-cloudflare --dns-cloudflare-credentials /config/.secrets/cloudflare.ini --email $EMAIL -d $DOMAINS
|
certbot certonly --non-interactive --agree-tos --dns-cloudflare --dns-cloudflare-propagation-seconds $PROPOGATION_TIME --dns-cloudflare-credentials /config/.secrets/cloudflare.ini --email $EMAIL -d $DOMAINS
|
||||||
echo "Creation/renewal attempt complete"
|
echo "Creation/renewal attempt complete"
|
||||||
else
|
else
|
||||||
echo "Unrecognised option for STAGING variable - check your configuration"
|
echo "Unrecognised option for STAGING variable - check your configuration"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user