git » chasquid » commit f11d2d3

docker: Add $SKIP_CERT_CHECK for debugging

author Alberto Bertogli
2026-02-01 12:15:10 UTC
committer Alberto Bertogli
2026-02-01 12:15:10 UTC
parent 6c80b55979154c3f4125cd5b52384d56bbf3f52b

docker: Add $SKIP_CERT_CHECK for debugging

When running the container, there is a check to make sure we have at
least one certificate. This is very useful to detect a common problem
early, with a friendly error message.

However, when debugging, sometimes we want to skip that check and run
anyways. So this patch introduces a $SKIP_CERT_CHECK variable that can
be used to skip that check.

docker/entrypoint.sh +2 -1

diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index dd6873f..a864bf2 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -65,7 +65,8 @@ done
 ONE_DOMAIN=$D
 
 # Check that there's at least once certificate at this point.
-if [ "$CERT_DOMAINS" == "" ]; then
+# Use $SKIP_CERT_CHECK=1 to bypass this check for debugging purposes.
+if [ "$CERT_DOMAINS" == "" ] && [ "$SKIP_CERT_CHECK" != "1" ]; then
 	echo "No certificates found."
 	echo
 	echo "Set AUTO_CERTS='example.com' to automatically get one."