Files
npm-statuspage/Dockerfile
Fredrik Johansson 3adf06e4e1
All checks were successful
Docker / build-and-push (push) Successful in 1m44s
Add favicon
Pulse-line mark in the status-yellow accent, on both the status page and /admin. Wires up static file serving and fixes the Dockerfile to actually ship the public/ dir into the runtime image.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-19 19:50:36 +02:00

27 lines
851 B
Docker

FROM node:22-alpine AS build
WORKDIR /app
# better-sqlite3 has a native addon with no prebuilt binary for this
# platform/Node combo yet — build it from source.
RUN apk add --no-cache python3 make g++
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:22-alpine
WORKDIR /app
# Same native-addon rebuild needed for the production-only install below;
# the toolchain is purged again afterward to keep the runtime image lean.
RUN apk add --no-cache python3 make g++
COPY package*.json ./
RUN npm install --omit=dev && apk del python3 make g++
COPY --from=build /app/dist ./dist
COPY --from=build /app/public ./public
# DATA_DIR (SQLite DB) is a mutable runtime volume — not baked into the
# image, so redeploys don't clobber host overrides / manual targets.
ENV DATA_DIR=/app/data
EXPOSE 3035
CMD ["node", "dist/index.js"]