modules = ["nodejs-24", "postgresql-16"]

[[artifacts]]
id = "artifacts/api-server"

[[artifacts]]
id = "artifacts/mockup-sandbox"

[deployment]
router = "application"
deploymentTarget = "autoscale"
build = ["sh", "-c", "pnpm --filter @workspace/api-server run build"]
run = ["sh", "-c", "node artifacts/api-server/dist/index.cjs"]

[deployment.postBuild]
args = ["pnpm", "store", "prune"]
env = { "CI" = "true" }

[workflows]
runButton = "Project"

[agent]
stack = "PNPM_WORKSPACE"
expertMode = true

[postMerge]
path = "scripts/post-merge.sh"
timeoutMs = 20000

[nix]
channel = "stable-25_05"

[userenv]

[userenv.shared]
TIMMY_TOKEN_SECRET = "33e5ed35e9af236bf4df2df7330d30118e27d0dd83a97a8c50b29e4bae50668e"
