Added weekly cron to auto renew certbot

This commit is contained in:
Deon George 2017-11-20 17:01:00 +11:00
parent e77fff2610
commit c63739ec42
2 changed files with 6 additions and 0 deletions

View File

@ -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" ]

3
renew.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
certbot renew -q --config-dir /etc/nginx/conf.d/ssl/letsencrypt/ --renew-hook "kill 1"