fix: servname
This commit is contained in:
@@ -1,13 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Ensure SERVER_NAME is set
|
SERVER_NAME="${SERVER_NAME:-$(hostname -f 2>/dev/null || hostname)}"
|
||||||
if [ -z "$SERVER_NAME" ]; then
|
export SERVER_NAME
|
||||||
echo "[entrypoint] SERVER_NAME is not set. Using default value: localhost"
|
|
||||||
SERVER_NAME="localhost"
|
|
||||||
else
|
|
||||||
echo "[entrypoint] Using SERVER_NAME=$SERVER_NAME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Render vhost ONLY into http.d so it's inside http{} context
|
# Render vhost ONLY into http.d so it's inside http{} context
|
||||||
if [ -f /etc/nginx/templates/default.conf.template ]; then
|
if [ -f /etc/nginx/templates/default.conf.template ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user