Files
Siteforge/Dockerfile
T
nmemmert 369a7944f0 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>
2026-07-16 16:02:19 -04:00

29 lines
631 B
Docker

FROM node:22-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=4173
ARG COMMIT_SHA=unknown
ENV COMMIT_SHA=${COMMIT_SHA}
COPY package*.json ./
RUN npm ci --omit=dev --legacy-peer-deps
COPY dist ./dist
COPY server.js ./server.js
COPY server/ ./server/
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.
COPY data ./data-seed
RUN mkdir -p /app/data
COPY entrypoint.sh ./entrypoint.sh
RUN chmod +x ./entrypoint.sh
EXPOSE 4173
ENTRYPOINT ["./entrypoint.sh"]