CI / check (push) Successful in 29s
CI / tests-integration (push) Successful in 2m13s
CI / tests-unit (push) Successful in 2m28s
CI / tests-imaging-browsers (push) Successful in 2m29s
CI / tests-quality (push) Successful in 55s
CI / tests-ui (push) Successful in 5m10s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m47s
The Docker build was slower than it needed to be and could drift away from the lockfile. Three separate causes, fixed together. The image installed a pinned [email protected].1 while package.json pins 12.11.2 through `packageManager`. pnpm silently self-managed the difference at build time: it downloaded the right version into an uncached location and never verified the sha512 hash. Install corepack instead and let it resolve version and hash from the pin, so the image can no longer diverge and a tampered tarball is rejected. The resolved pnpm lives in COREPACK_HOME inside the image, so the migrations image still runs pnpm offline (`docker run --entrypoint pnpm ... db:migrate`). The pnpm store cache-mount pointed at /root/.local/share/pnpm/store, but pnpm keeps its store in $PNPM_HOME/store/v11. The mount was a no-op: every build re-downloaded all 493 packages ("reused 0, downloaded 493"). Mounting the store where pnpm actually keeps it turns that into "reused 493, downloaded 0". The build context carried backups/ (232MB of rotating database dumps) and public/vendor/ (regenerated by `pnpm assets:editor` from node_modules). Both grew the context and invalidated the `COPY . .` layer on every daily backup rotation, forcing a full Next.js rebuild. Excluding them takes the context from 276MB to 23MB. Compose now also exports the build cache to .docker-cache/cms and imports it again, so the cache survives `scripts/docker-prune.sh`, which trims the daemon cache to 4GB after every deploy. Verified by pruning the entire daemon cache: the next build restored every layer from the local export and downloaded nothing. Also: byparr's floating `:latest` tag is now pulled on every start, the migrations build in scripts/docker-update.sh imports the same local cache, the README no longer claims the build needs host networking or an iptables-disabled daemon, the pnpm rationale in renovate.json reflects that Docker follows the pin automatically, and contract tests pin the new invariants so the store path cannot drift back.
59 lines
1.2 KiB
Plaintext
59 lines
1.2 KiB
Plaintext
.git
|
|
.gitignore
|
|
.next
|
|
node_modules
|
|
coverage
|
|
storage
|
|
prod.log
|
|
update.log
|
|
.pm2
|
|
# Only the pnpm lockfile is used. Ignore other lockfile formats and stray
|
|
# package managers so they never taint the build context by accident.
|
|
package-lock.json
|
|
yarn.lock
|
|
bun.lockb
|
|
.npmrc.bak
|
|
# Installation secrets must never enter any image layer (including migrations).
|
|
.env
|
|
.env.*
|
|
**/.env
|
|
**/.env.*
|
|
!.env.example
|
|
*.pem
|
|
*.key
|
|
*.tsbuildinfo
|
|
# Runtime write targets; bound as RW volumes at runtime (see docker-compose.yml)
|
|
public/nitro-assets
|
|
public/swf
|
|
|
|
# Databasebackups (~232MB, dagelijkse rotatie): horen niet in de buildcontext.
|
|
# Ze maakten elke context groot en invalideerden bij elke rotatie de
|
|
# `COPY . .`-laag, waardoor de Next-build volledig opnieuw draaide.
|
|
backups/
|
|
|
|
# Wordt tijdens de build opnieuw gegenereerd door `pnpm assets:editor`
|
|
# (bron: node_modules/tinymce) en staat niet in git.
|
|
public/vendor/
|
|
|
|
# Lokale buildcache voor `docker compose build` (cache_from/cache_to).
|
|
.docker-cache/
|
|
|
|
.deploy.lock
|
|
logs
|
|
|
|
# Other installation data and local tool artifacts
|
|
public/cache
|
|
public/tmp
|
|
db_backup_*.sql
|
|
*.log
|
|
.codex
|
|
.agents
|
|
|
|
.docker-install
|
|
.docker-install.tmp.*
|
|
.env.install.*
|
|
build-reports
|
|
test-results
|
|
playwright-report
|
|
blob-report
|