From d83c53d564c90d290276da39f64c940ebc8b2068 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 15 Dec 2019 00:47:25 +0100 Subject: [PATCH] Support secondary entrypoint --- README.md | 6 ++++++ entrypoint.sh | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 291b430..7f30a34 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,12 @@ If you want to extend the https server, simply overwrite **/etc/nginx/https.conf**. It is by default empty and only exists to be overwritten. It is included in the https block and lets you define proxy or other configurations that you need. +As this file is only included by the generated https server, you can +safely create it in your Dockerfile. + +If you want start anything **after** the certificate was retrieved and +the https server is up and running, put your code into +**/entrypoint-post-https.sh**. Note: It should be executable. ## More information diff --git a/entrypoint.sh b/entrypoint.sh index 0297b86..ee6405b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -76,4 +76,10 @@ pkill nginx # wait until old process is gone sleep 2 -nginx -g "daemon off;" +nginx + +if [ -x /entrypoint-post-https.sh ]; then + /entrypoint-post-https.sh +fi + +sleep infinity