aboutsummaryrefslogtreecommitdiff
path: root/services/docker/nginx/nginx-wrapper.bash
diff options
context:
space:
mode:
Diffstat (limited to 'services/docker/nginx/nginx-wrapper.bash')
-rwxr-xr-xservices/docker/nginx/nginx-wrapper.bash13
1 files changed, 11 insertions, 2 deletions
diff --git a/services/docker/nginx/nginx-wrapper.bash b/services/docker/nginx/nginx-wrapper.bash
index bd566aa..c848287 100755
--- a/services/docker/nginx/nginx-wrapper.bash
+++ b/services/docker/nginx/nginx-wrapper.bash
@@ -1,7 +1,16 @@
#!/usr/bin/bash
-set -e
+set -e -o pipefail
+
+die() {
+ echo "$@" >&2
+ exit 1
+}
+
+[[ -n "$CRUPEST_DOMAIN" ]] || die "CRUPEST_DOMAIN is not set. It is used as root domain."
+[[ -n "$CRUPEST_GITHUB" ]] || die "CRUPEST_GITHUB is not set. It is used as GitHub redirection."
+[[ -n "$CRUPEST_V2RAY_PATH" ]] || die "CRUPEST_V2RAY_PATH is not set. It is used as v2ray tunnel endpoint."
/app/certbot.bash &
-nginx "-g" "daemon off;"
+/docker-entrypoint.sh nginx "-g" "daemon off;"