Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions nixpacks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Nixpacks configuration for Next.js (pnpm)
# Docs: https://nixpacks.com/docs/reference/configuration

providers = ["node"]

[phases.setup]
# Use Node 20 and pnpm from nixpkgs for reproducibility
nixPkgs = ["nodejs_20", "pnpm"]

[variables]
NEXT_TELEMETRY_DISABLED = "1"
HUSKY = "0"

[phases.install]
dependsOn = ["setup"]
cmds = [
"pnpm install --frozen-lockfile"
]
# Persist pnpm store between builds for faster installs
cacheDirectories = ["~/.pnpm-store"]

[phases.build]
dependsOn = ["install"]
cmds = [
"pnpm run build"
]

[start]
# Bind to 0.0.0.0 and use Dokploy-provided $PORT
cmd = "NODE_ENV=production pnpm run start -- -H 0.0.0.0 -p ${PORT:-3000}"