feat: Add Railway configuration for multi-service deployment (frontend + backend)

This commit is contained in:
Claude 2025-11-23 07:58:38 +00:00
parent 4fadc2c507
commit f6f67ccbb8
No known key found for this signature in database
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# Production environment variables for Railway deployment
# Set VITE_API_URL in Railway environment variables instead of committing here
# Default fallback - will be overridden by Railway env var
VITE_API_URL=https://your-backend-url.railway.app
VITE_APP_NAME=Farsi Transcriber
VITE_MAX_FILE_SIZE=500

26
railway.toml Normal file
View File

@ -0,0 +1,26 @@
# Railway configuration for both backend and frontend services
# https://docs.railway.app/reference/nixpacks
[build]
builder = "nixpacks"
# Backend service configuration
[[services]]
name = "backend"
root = "farsi_transcriber_web/backend"
[services.build]
nixPkgs = ["ffmpeg"]
[services.build.nixPackages]
pythonPackages = ["pip"]
[services.start]
cmd = "gunicorn --workers 2 --worker-class sync --timeout 120 --bind 0.0.0.0:$PORT app:app"
# Frontend service configuration
[[services]]
name = "frontend"
root = "farsi_transcriber_web"
buildCommand = "npm install && npm run build"
startCommand = "npm run preview"