#!/bin/bash cd /flask echo "Working directory: $(pwd)" echo "Checking assets files:" ls -la assets*.json 2>&1 || echo "No assets files found" # 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