docker
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-07-03 09:12:25 +03:30
parent 5c60b303d9
commit 8be13b5912
3 changed files with 51 additions and 108 deletions
+13 -2
View File
@@ -26,6 +26,15 @@ COPY --from=deps /deps/node_modules ./node_modules
RUN npm run build
# -----------------------
# Production dependencies (Nitro externalizes ipx, sharp, etc.)
# -----------------------
FROM base AS prod-deps
WORKDIR /deps
COPY package*.json ./
RUN npm ci --omit=dev
# -----------------------
# Production runtime
# -----------------------
@@ -33,12 +42,14 @@ FROM node:18-alpine AS runner
WORKDIR /app
# sharp (used by ipx) needs libc compatibility on Alpine
RUN apk add --no-cache libc6-compat
# create non-root user
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
# only copy what is needed at runtime
COPY --from=builder /build/.output ./.output
COPY package*.json ./
COPY --from=prod-deps /deps/node_modules ./node_modules
USER appuser