modules = ["python-3.11"]

[nix]
channel = "stable-25_05"
packages = ["ffmpeg-full", "libsndfile", "openssl", "postgresql"]

[deployment]
deploymentTarget = "autoscale"
run = ["gunicorn", "--bind", "0.0.0.0:5000", "main:app"]

[workflows]
runButton = "Project"

[[workflows.workflow]]
name = "Project"
mode = "parallel"
author = "agent"

[[workflows.workflow.tasks]]
task = "workflow.run"
args = "Start application"

[[workflows.workflow.tasks]]
task = "workflow.run"
args = "install_audio_deps"

[[workflows.workflow]]
name = "Start application"
author = "agent"

[[workflows.workflow.tasks]]
task = "shell.exec"
args = "gunicorn --bind 0.0.0.0:5000 --reuse-port --reload main:app"
waitForPort = 5000

[[workflows.workflow]]
name = "install_audio_deps"
author = "agent"

[[workflows.workflow.tasks]]
task = "shell.exec"
args = "uv add librosa soundfile numpy sounddevice"

[[ports]]
localPort = 5000
externalPort = 80
