modules = ["python-3.11", "postgresql-16"]

[nix]
channel = "stable-24_05"
packages = ["cairo", "ffmpeg-full", "freetype", "gcc", "ghostscript", "glibc", "glibcLocales", "gobject-introspection", "gtk3", "libstdcxx5", "pkg-config", "qhull", "tcl", "tk"]

[deployment]
deploymentTarget = "autoscale"
run = ["streamlit", "run", "app.py", "--server.port", "5000"]

[workflows]
runButton = "Project"

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

[[workflows.workflow.tasks]]
task = "workflow.run"
args = "Streamlit Server"

[[workflows.workflow.tasks]]
task = "workflow.run"
args = "API Server"

[[workflows.workflow]]
name = "Streamlit Server"
author = "agent"

[[workflows.workflow.tasks]]
task = "shell.exec"
args = "streamlit run app.py --server.port 5000"
waitForPort = 5000

[[workflows.workflow]]
name = "API Server"
author = "agent"

[[workflows.workflow.tasks]]
task = "shell.exec"
args = "python api_server.py"
waitForPort = 5001

[workflows.workflow.metadata]
outputType = "console"

[[ports]]
localPort = 5000
externalPort = 80

[[ports]]
localPort = 5001
externalPort = 3000
