build: deploy via Dockerfile on npm + node 22 #9

Merged
TimCane merged 1 commit from chore/switch-to-npm into main 2026-06-20 18:30:49 +01:00
TimCane commented 2026-06-20 18:29:37 +01:00 (Migrated from github.com)

Summary

  • switch package manager pnpm -> npm: nixpacks' bundled pnpm 9 parsed pnpm-workspace.yaml (pnpm 11-only keys) as a workspace manifest and failed with packages field missing or empty
  • add a multi-stage Dockerfile on node:22-slim: nixpacks cannot supply a node that satisfies astro 6's >=22.12.0 (snapshot has 22.11, lacks 24, and 23 pulls a pin that errors on removed node 18)
  • drop pnpm-lock.yaml / pnpm-workspace.yaml; add package-lock.json, Dockerfile, .dockerignore; engines.node >=22.12.0

Test plan

  • npm ci + npm run build succeeds and emits dist/server/entry.mjs; require('sharp') loads its native binary
  • node ./dist/server/entry.mjs boots and serves GET / -> 200
  • (no local docker available to build the image)

Coolify change required

  • switch the application Build Pack from Nixpacks to Dockerfile
  • the custom install/build/start commands and the NIXPACKS_NODE_VERSION env var are no longer used and can be cleared
  • keep HOST=0.0.0.0 and the exposed port 4321
## Summary - switch package manager pnpm -> npm: nixpacks' bundled pnpm 9 parsed `pnpm-workspace.yaml` (pnpm 11-only keys) as a workspace manifest and failed with `packages field missing or empty` - add a multi-stage Dockerfile on `node:22-slim`: nixpacks cannot supply a node that satisfies astro 6's `>=22.12.0` (snapshot has 22.11, lacks 24, and 23 pulls a pin that errors on removed node 18) - drop `pnpm-lock.yaml` / `pnpm-workspace.yaml`; add `package-lock.json`, `Dockerfile`, `.dockerignore`; `engines.node >=22.12.0` ## Test plan - `npm ci` + `npm run build` succeeds and emits `dist/server/entry.mjs`; `require('sharp')` loads its native binary - `node ./dist/server/entry.mjs` boots and serves `GET /` -> 200 - (no local docker available to build the image) ## Coolify change required - switch the application Build Pack from **Nixpacks** to **Dockerfile** - the custom install/build/start commands and the `NIXPACKS_NODE_VERSION` env var are no longer used and can be cleared - keep `HOST=0.0.0.0` and the exposed port `4321`
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
TJC/thisisapresentationonflags.lol!9
No description provided.