diff --git a/railway.json b/railway.json index 6a81a07..088cdae 100644 --- a/railway.json +++ b/railway.json @@ -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 } diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..b281b0e --- /dev/null +++ b/start.sh @@ -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