fix: use shell script for Railway startup

master
Eric0801 2 months ago
parent 4d45bca548
commit f076054d6a
  1. 2
      railway.json
  2. 7
      start.sh

@ -5,7 +5,7 @@
"dockerfilePath": "Dockerfile"
},
"deploy": {
"startCommand": "cd /flask && ls -la assets*.json && gunicorn -w 2 -b 0.0.0.0:8000 --timeout 120 main:app",
"startCommand": "/flask/start.sh",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}

@ -0,0 +1,7 @@
#!/bin/bash
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
Loading…
Cancel
Save