Build JS on CI host, copy dist into Docker image for faster arm64 builds; v1.0.5

Removes the build stage from Dockerfile so npm install/build no longer run under
QEMU emulation — only the lightweight runtime stage runs per-platform, making
arm64 images build reliably.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmert
2026-07-16 16:02:19 -04:00
parent 3a055ba8b2
commit 369a7944f0
4 changed files with 5 additions and 15 deletions
+2 -11
View File
@@ -1,12 +1,3 @@
FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci --legacy-peer-deps
COPY . .
RUN npm run build
FROM node:22-alpine AS runtime
WORKDIR /app
@@ -19,10 +10,10 @@ ENV COMMIT_SHA=${COMMIT_SHA}
COPY package*.json ./
RUN npm ci --omit=dev --legacy-peer-deps
COPY --from=build /app/dist ./dist
COPY dist ./dist
COPY server.js ./server.js
COPY server/ ./server/
COPY --from=build /app/A_Study_of_Titus.pdf ./A_Study_of_Titus.pdf
COPY A_Study_of_Titus.pdf ./A_Study_of_Titus.pdf
# Copy seed data to a separate directory so the entrypoint can seed /app/data
# only when no live data exists yet — upgrades never overwrite existing data.