diff --git a/Dockerfile b/Dockerfile index 042bb74..07cd4d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,9 @@ RUN yum -y install certbot nginx ln-nginx && yum clean all EXPOSE 80 443 +COPY renew.sh /usr/local/sbin +LABEL cron.weekly root:/usr/local/sbin/renew.sh + # Expose our web root and log directories log. #VOLUME [ "/etc/nginx/conf.d", "/etc/nginx/default.d" ] diff --git a/renew.sh b/renew.sh new file mode 100755 index 0000000..ac7bd18 --- /dev/null +++ b/renew.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +certbot renew -q --config-dir /etc/nginx/conf.d/ssl/letsencrypt/ --renew-hook "kill 1"