providers = []
buildImage = 'ghcr.io/railwayapp/nixpacks:ubuntu-1745885067'

[variables]
CI = 'true'
NIXPACKS_METADATA = 'node'
NODE_ENV = 'production'
[phases.build]
dependsOn = ['install']
cmds = ['node scripts/load-secrets.mjs && source .env.infisical && pnpm run build']
cacheDirectories = ['node_modules/.cache']

[phases.install]
dependsOn = ['setup']
cmds = ['pnpm install --frozen-lockfile --config.confirmModulesPurge=false']
cacheDirectories = ['/root/.local/share/pnpm/store']
paths = ['/app/node_modules/.bin']

[phases.setup]
nixPkgs = ['nodejs_22', 'pnpm']
nixpkgsArchive = '23f9169c4ccce521379e602cc82ed873a1f1b52b'

[start]
cmd = 'node scripts/load-secrets.mjs && source .env.infisical && node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs'

