Files
EpicNext-Cms/.dockerignore
T
openhands ecd8e5852c
CI / check (push) Successful in 30s
CI / tests-unit (push) Successful in 1m53s
CI / tests-integration (push) Successful in 1m54s
CI / tests-imaging-browsers (push) Successful in 2m26s
CI / tests-quality (push) Successful in 2m19s
CI / tests-ui (push) Successful in 4m31s
CI / preflight (push) Skipped
CI / deploy (push) Failing after 3m9s
perf(build): keep test suites out of the image and cache CI builds durably
Three build-time improvements, all measured on this host.

The build context no longer ships the test suites. `next build` type-checks
the whole project, so `e2e/` and `integration/` in the context made the image
build fail on a type error in test code and pulled @playwright/test, vitest,
msw, testcontainers and drizzle-kit into the image. The CI runs those suites
on the host. Type-check time in the build drops from 2.2s to 1.3s, and a
contract test now fails if application code ever imports from those folders.

The CI now exports the build cache to a directory outside the runner
workspace: /var/cache/epicnext-cms-buildcache for the release and a separate
map for branch preflights, so a branch can never feed the release cache. The
workspace is wiped after every job and `docker builder prune` runs after
every release, so the next build started with an empty cache and downloaded
all 493 packages again (measured: reused 0, downloaded 493). With the
durable export the frozen dependency layer is reused (measured: reused 493,
downloaded 0) even after a full prune. A cache directory that is not
writable only produces a warning; the release is never blocked.

Investigated the remaining ~30s of Next.js build tracing: excluding the
dev-only packages with `outputFileTracingExcludes` made it slower (35s vs
30s), because the traced output was already minimal (5 packages). The cost
is Next's own page-config collection and file tracing over 329 routes, not
the dependency set, so no configuration was kept.
2026-10-21 19:29:50 +02:00

66 lines
1.5 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
# Testbronnen draaien op de host (pnpm test:ui / test:integration / test:e2e),
# de image heeft ze niet nodig. In de image zouden ze alleen de typecheck van
# `next build` meebepalen en de image van @playwright/test, vitest, msw,
# testcontainers en drizzle-kit afhankelijk maken.
e2e/
integration/
# 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