Add V2 Forgejo workflow publishing study:v2 image
Pushes to v2 typecheck and test inside the Node 24 image via a new Dockerfile test stage, build and smoke-test the production image as a fresh non-root container, then publish :v2 and :v2-<sha>. Never touches V1's :latest. Document the image tags and Unraid 99:100 volume ownership. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d7e19db468
commit
3046e46d1c
4 changed files with 107 additions and 10 deletions
|
|
@ -1,9 +1,16 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
FROM node:24-bookworm-slim AS build
|
||||
FROM node:24-bookworm-slim AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
|
||||
# CI target: `docker build --target test .` runs typecheck and the full test suite on the
|
||||
# same Node version the runtime image uses. Not part of the default image build.
|
||||
FROM deps AS test
|
||||
RUN npm run typecheck && npm test
|
||||
|
||||
FROM deps AS build
|
||||
RUN npm run build && npm prune --omit=dev
|
||||
|
||||
FROM node:24-bookworm-slim AS runtime
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue