release: v0.20.0

This commit is contained in:
Ralksta
2026-10-02 18:14:23 +02:00
committed by GitHub
parent 81ce886b01
commit 5f831f719a
209 changed files with 13807 additions and 803 deletions

View File

@@ -24,6 +24,13 @@ ENV AUTH_SECRET="build-placeholder"
RUN npm run build
# The standalone trace copies content/ along: proxy.ts and instrumentation.ts
# read it through runtime paths, which the tracer resolves to the whole
# directory. .dockerignore already keeps a checkout's content out of this
# stage; dropping the traced copy makes sure the runner below gets content/
# from nowhere but the templates it copies by name.
RUN rm -rf .next/standalone/content
# ── Runtime ───────────────────────────────────────
FROM base AS runner
WORKDIR /app
@@ -38,7 +45,16 @@ RUN adduser --system --uid 1001 nextjs
RUN apk add --no-cache su-exec
COPY --from=builder /app/public ./public
COPY --from=builder /app/content ./content
# content/ ships with the templates only. The site's own files come from the
# volume mounted at /app/content; with an empty volume the app shows the setup
# screen and the wizard writes into it. Copying the templates by name rather
# than the whole directory keeps a checkout's real content (credentials,
# contact messages, proofing links, backups) out of the image even if a build
# context ever includes it — .dockerignore is the first line of that.
RUN mkdir -p content/journal
COPY --from=builder /app/content/*.example ./content/
COPY --from=builder /app/content/journal/*.example ./content/journal/
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --chmod=755 docker-entrypoint.sh ./docker-entrypoint.sh
@@ -46,13 +62,19 @@ COPY --chmod=755 docker-entrypoint.sh ./docker-entrypoint.sh
# `npm run doctor` — the config doctor for the terminal (#521). It is the tool
# for the case where the app will not start, so it has to be in the runtime
# image rather than only in a checkout. Node 22.18+ strips the types itself,
# so this is the whole of it: the entry point, the pure checks it imports, and
# js-yaml, which the standalone bundle inlines rather than leaving on disk.
# The standalone build copies package.json verbatim, so the script entry is
# already there.
# so this is the whole of it: the entry point, every module it imports at
# runtime, and js-yaml, which the standalone bundle inlines rather than leaving
# on disk. The standalone build copies package.json verbatim, so the script
# entry is already there. scripts/__tests__/doctor-image.test.ts walks the
# import graph and fails when a module of it is missing from this list.
COPY --from=builder /app/scripts/doctor.mjs ./scripts/doctor.mjs
COPY --from=builder /app/scripts/doctor.mts ./scripts/doctor.mts
COPY --from=builder /app/lib/admin/doctor.ts ./lib/admin/doctor.ts
COPY --from=builder /app/lib/config/settingValues.ts ./lib/config/settingValues.ts
COPY --from=builder /app/lib/config/schema.ts ./lib/config/schema.ts
COPY --from=builder /app/lib/config/theme.ts ./lib/config/theme.ts
COPY --from=builder /app/lib/config/presets.ts ./lib/config/presets.ts
COPY --from=builder /app/lib/siteUrl.ts ./lib/siteUrl.ts
COPY --from=deps /app/node_modules/js-yaml ./node_modules/js-yaml
# Content dir must be writable for admin saves (ownership fixed at runtime)