mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-16 01:06:59 +08:00
debug: add PORT environment variable debugging
This commit is contained in:
@@ -5,9 +5,15 @@
|
|||||||
export PORT=${PORT:-8080}
|
export PORT=${PORT:-8080}
|
||||||
|
|
||||||
echo "🌐 Starting nginx on port $PORT..."
|
echo "🌐 Starting nginx on port $PORT..."
|
||||||
|
echo "🔍 All environment variables with PORT:"
|
||||||
|
env | grep -i port || echo "No PORT variables found"
|
||||||
|
|
||||||
# Generate nginx config from template
|
# Generate nginx config from template
|
||||||
envsubst '${PORT}' < /etc/nginx/nginx.conf.template > /etc/nginx/http.d/default.conf
|
envsubst '${PORT}' < /etc/nginx/nginx.conf.template > /etc/nginx/http.d/default.conf
|
||||||
|
|
||||||
|
# Show generated config for debugging
|
||||||
|
echo "📄 Generated nginx config:"
|
||||||
|
cat /etc/nginx/http.d/default.conf | head -10
|
||||||
|
|
||||||
# Start nginx
|
# Start nginx
|
||||||
exec nginx -g "daemon off;"
|
exec nginx -g "daemon off;"
|
||||||
|
|||||||
@@ -23,3 +23,4 @@ stdout_logfile=/dev/stdout
|
|||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
|
environment=PORT="%(ENV_PORT)s"
|
||||||
|
|||||||
Reference in New Issue
Block a user