mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-18 09:54:35 +08:00
fix: use Railway PORT env var for nginx
This commit is contained in:
13
railway/start-nginx.sh
Normal file
13
railway/start-nginx.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# Nginx startup wrapper - substitutes PORT environment variable
|
||||
|
||||
# Default PORT to 8080 if not set
|
||||
export PORT=${PORT:-8080}
|
||||
|
||||
echo "🌐 Starting nginx on port $PORT..."
|
||||
|
||||
# Generate nginx config from template
|
||||
envsubst '${PORT}' < /etc/nginx/nginx.conf.template > /etc/nginx/http.d/default.conf
|
||||
|
||||
# Start nginx
|
||||
exec nginx -g "daemon off;"
|
||||
Reference in New Issue
Block a user