fix: use Railway PORT env var for dynamic port binding

master
Eric0801 2 months ago
parent 51fdceb163
commit 32ef5e1978
  1. 7
      start.sh

@ -3,5 +3,8 @@ cd /flask
echo "Working directory: $(pwd)"
echo "Checking assets files:"
ls -la assets*.json 2>&1 || echo "No assets files found"
echo "Starting gunicorn..."
exec gunicorn -w 2 -b 0.0.0.0:8000 --timeout 120 main:app
# Use Railway's PORT env var if available, otherwise default to 8000
PORT=${PORT:-8000}
echo "Starting gunicorn on port $PORT..."
exec gunicorn -w 2 -b 0.0.0.0:$PORT --timeout 120 main:app

Loading…
Cancel
Save