From f6a971b19471212a400602784a91c6f4a78476cc Mon Sep 17 00:00:00 2001 From: Noah Holt Date: Thu, 5 Nov 2026 00:56:45 -0600 Subject: [PATCH] fix: install production dependencies in runtime image Express was added in 1365bd7 but the runtime stage still assumed zero runtime deps, so the image crashed with ERR_MODULE_NOT_FOUND: express. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8b5bf16..f93e57a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,14 +7,15 @@ COPY tsconfig.json ./ COPY src ./src RUN npm run build -# Runtime stage: no dev deps (this service has zero runtime deps) +# Runtime stage: production deps only FROM node:22-slim WORKDIR /app ENV NODE_ENV=production ARG GIT_SHA=dev ENV GIT_SHA=${GIT_SHA} +COPY package.json package-lock.json ./ +RUN npm ci --omit=dev COPY --from=build /app/dist ./dist -COPY package.json ./ USER node EXPOSE 3000 CMD ["node", "dist/index.js"]