diff --git a/nginx/build/Dockerfile b/nginx/build/Dockerfile index b70c34b..309ea38 100644 --- a/nginx/build/Dockerfile +++ b/nginx/build/Dockerfile @@ -9,6 +9,9 @@ RUN mkdir /var/lib/certbot COPY renew /etc/periodic/weekly/renew RUN chmod +x /etc/periodic/weekly/renew +# Default.conf file is annoying +RUN rm -rf /etc/nginx/conf.d/* + RUN /usr/sbin/crond -f -d 8 & ENTRYPOINT [ "./entrypoint.sh" ] diff --git a/nginx/build/entrypoint.sh b/nginx/build/entrypoint.sh index 14ca52a..d652550 100644 --- a/nginx/build/entrypoint.sh +++ b/nginx/build/entrypoint.sh @@ -1,4 +1,6 @@ #!/usr/bin/env sh certbot certonly --standalone -d "$MAIN_DOMAIN,$DOMAINS" --email "$EMAIL" -n --agree-tos --expand -/usr/sbin/nginx -g "daemon off;" + +# The original script handles the template subsitution +exec /docker-entrypoint.sh nginx -g "daemon off;"