From 7965403624fe216f166bb448805ce649a8a31d33 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Sat, 9 Jan 2021 15:48:30 +0100 Subject: [PATCH] Fixed small nginx mistakes --- nginx/build/Dockerfile | 3 +++ nginx/build/entrypoint.sh | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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;"