fix: servname

This commit is contained in:
u00lipp
2025-10-30 10:57:22 +01:00
parent 259dcab1b5
commit 399bf44394
+2 -7
View File
@@ -1,13 +1,8 @@
#!/bin/sh
set -e
# Ensure SERVER_NAME is set
if [ -z "$SERVER_NAME" ]; then
echo "[entrypoint] SERVER_NAME is not set. Using default value: localhost"
SERVER_NAME="localhost"
else
echo "[entrypoint] Using SERVER_NAME=$SERVER_NAME"
fi
SERVER_NAME="${SERVER_NAME:-$(hostname -f 2>/dev/null || hostname)}"
export SERVER_NAME
# Render vhost ONLY into http.d so it's inside http{} context
if [ -f /etc/nginx/templates/default.conf.template ]; then