Phase 0: safety net for the build and deploy #1

Merged
pjotr merged 5 commits from fix/phase-0-safety-net into main 2026-10-28 09:08:32 +00:00
Owner

Small changes, no content changes, and no change to what runs on the server (compose still starts academie:prod).

  • .dockerignore: the build context no longer sends .git (~160 MB) or local node_modules / .output into the build.
  • Dockerfile: pnpm now comes from Corepack at the version pinned in package.json (9.1.2), instead of whatever version is latest on build day.
  • Node 22 pinned through .nvmrc and engines. The package name is now sla-website.
  • Rollback: each build is now also tagged academie:<short sha>. The README gains a "Rollback" section: retag an earlier sha as :prod and run docker compose up -d.
  • Removed stackbit.config.ts (Stackbit leftover, said Node 18) and the empty server/ folder.

Checked locally: pnpm install --frozen-lockfile and pnpm build pass. Docker and Woodpecker are not tested yet.

@bdu, two things to check:

  1. the first build on main should show an academie:<8 chars> tag. That uses Woodpecker's ${CI_COMMIT_SHA:0:8} substitution, so please confirm your Woodpecker version supports it.
  2. Corepack downloads pnpm from the npm registry during the build.

Heads-up for the next PR (Phase 1): we will remove Decap CMS (public/admin, the preview pages and layouts). From then on, content is edited as files in content/ and changes go through a PR. I know you just set up Decap's local mode on 27 Oct. This is a choice to keep the site minimal, and the Phase 1 PR will explain it.

Small changes, no content changes, and no change to what runs on the server (compose still starts `academie:prod`). - `.dockerignore`: the build context no longer sends `.git` (~160 MB) or local `node_modules` / `.output` into the build. - Dockerfile: pnpm now comes from Corepack at the version pinned in `package.json` (9.1.2), instead of whatever version is latest on build day. - Node 22 pinned through `.nvmrc` and `engines`. The package name is now `sla-website`. - Rollback: each build is now also tagged `academie:<short sha>`. The README gains a "Rollback" section: retag an earlier sha as `:prod` and run `docker compose up -d`. - Removed `stackbit.config.ts` (Stackbit leftover, said Node 18) and the empty `server/` folder. Checked locally: `pnpm install --frozen-lockfile` and `pnpm build` pass. Docker and Woodpecker are not tested yet. @bdu, two things to check: 1. the first build on main should show an `academie:<8 chars>` tag. That uses Woodpecker's `${CI_COMMIT_SHA:0:8}` substitution, so please confirm your Woodpecker version supports it. 2. Corepack downloads pnpm from the npm registry during the build. Heads-up for the next PR (Phase 1): we will remove Decap CMS (`public/admin`, the preview pages and layouts). From then on, content is edited as files in `content/` and changes go through a PR. I know you just set up Decap's local mode on 27 Oct. This is a choice to keep the site minimal, and the Phase 1 PR will explain it.
Woodpecker runs docker build -f deploy/dockerfile . from the repo root, so the
context is the whole checkout. Without this file COPY . . sent .git (about
160 MB) and any local node_modules or .output into the image build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm install -g pnpm installed whatever pnpm was latest on build day, while
package.json pins pnpm@9.1.2 in packageManager. Corepack reads that field
(and checks its hash), so the image and a local checkout use the same pnpm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The production image runs node:22-alpine; local checkouts now get the same
major through .nvmrc, and engines states it. The package name still said
sintLukas2024, the old repo. README Requirements describe the pin and Corepack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each build overwrote academie:prod, so going back meant a rebuild. The build
now also tags academie:<short sha>; compose still runs academie:prod, so
nothing changes on the server. README Deployment gains a Rollback section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stackbit.config.ts was a leftover from Stackbit (Netlify Create) and still
said Node 18; nothing imports @stackbit/types. server/ held only the Nuxt
default tsconfig.json; the site has no server routes, and nothing else
references it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pjotr merged commit aae7212f7d into main 2026-10-28 09:08:32 +00:00
Sign in to join this conversation.
No reviewers
No labels
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
sintlukas/sla-website!1
No description provided.