[phases.setup]
nixPkgs = ["nodejs_22"]

[phases.install]
cmds = ["npm install --production --frozen-lockfile"]

[phases.build]
cmds = ["npm run build"]

[start]
cmd = "node server.js"

[variables]
NODE_ENV = "production"
NEXT_TELEMETRY_DISABLED = "1"

# These environment variables will need to be set in your deployment platform
# NEXT_PUBLIC_API_URL - Set in deployment platform
# NEXT_PUBLIC_CLIENT_ID - Set in deployment platform
# NEXT_PUBLIC_CLIENT_SECRET - Set in deployment platform