add cron to renew cert
This commit is contained in:
parent
b0bf8a2d11
commit
a2f5d8212b
|
@ -1,7 +1,7 @@
|
||||||
FROM node:14-slim as build
|
FROM node:14-slim as build
|
||||||
|
|
||||||
# install node-gyp dependencies
|
# install node-gyp dependencies
|
||||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends apt-utils g++ make python
|
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends apt-utils cron g++ make python
|
||||||
|
|
||||||
# add pin script
|
# add pin script
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
|
@ -4,6 +4,10 @@ redis-server --requirepass $REDIS_PASSWORD &
|
||||||
/docker-entrypoint.sh /opt/couchdb/bin/couchdb &
|
/docker-entrypoint.sh /opt/couchdb/bin/couchdb &
|
||||||
/etc/init.d/nginx restart
|
/etc/init.d/nginx restart
|
||||||
if [[ ! -z "${CUSTOM_DOMAIN}" ]]; then
|
if [[ ! -z "${CUSTOM_DOMAIN}" ]]; then
|
||||||
|
# Add monthly cron job to renew certbot certificate
|
||||||
|
echo -n "* * 2 * * root exec /app/letsencrypt/certificate-renew.sh ${CUSTOM_DOMAIN}" >> /etc/cron.d/certificate-renew
|
||||||
|
chmod +x /etc/cron.d/certificate-renew
|
||||||
|
# Request the certbot certificate
|
||||||
/app/letsencrypt/certificate-request.sh ${CUSTOM_DOMAIN}
|
/app/letsencrypt/certificate-request.sh ${CUSTOM_DOMAIN}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue