fix: Consolidate nixpacks.toml to service directories for proper Railway deployment

This commit is contained in:
Claude 2025-11-23 08:56:52 +00:00
parent f6f67ccbb8
commit 1f8e215ed5
No known key found for this signature in database
4 changed files with 22 additions and 37 deletions

View File

@ -0,0 +1,11 @@
# Backend Nixpacks configuration
# Ensures ffmpeg is available for Whisper audio processing
[phases.setup]
nixPkgs = ["ffmpeg"]
[phases.install]
cmds = ["pip install -r requirements.txt"]
[start]
cmd = "gunicorn --workers 2 --worker-class sync --timeout 120 --bind 0.0.0.0:$PORT app:app"

View File

@ -0,0 +1,11 @@
# Frontend Nixpacks configuration
# Node.js React app with Vite
[phases.install]
cmds = ["npm install"]
[phases.build]
cmds = ["npm run build"]
[start]
cmd = "npm run preview"

View File

@ -1,11 +0,0 @@
# Nixpacks configuration for Railway deployment
# Backend deployment with Whisper and ffmpeg
[phases.setup]
nixPkgs = ["ffmpeg"]
[phases.install]
cmds = ["cd farsi_transcriber_web/backend && pip install -r requirements.txt"]
[start]
cmd = "cd farsi_transcriber_web/backend && gunicorn --workers 2 --worker-class sync --timeout 120 --bind 0.0.0.0:$PORT app:app"

View File

@ -1,26 +0,0 @@
# 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"