diff --git a/farsi_transcriber_web/backend/nixpacks.toml b/farsi_transcriber_web/backend/nixpacks.toml new file mode 100644 index 0000000..7a1f464 --- /dev/null +++ b/farsi_transcriber_web/backend/nixpacks.toml @@ -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" diff --git a/farsi_transcriber_web/nixpacks.toml b/farsi_transcriber_web/nixpacks.toml new file mode 100644 index 0000000..18bdf0c --- /dev/null +++ b/farsi_transcriber_web/nixpacks.toml @@ -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" diff --git a/nixpacks.toml b/nixpacks.toml deleted file mode 100644 index 700b783..0000000 --- a/nixpacks.toml +++ /dev/null @@ -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" diff --git a/railway.toml b/railway.toml deleted file mode 100644 index 5a60dff..0000000 --- a/railway.toml +++ /dev/null @@ -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"