-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerfile
More file actions
34 lines (24 loc) · 823 Bytes
/
Containerfile
File metadata and controls
34 lines (24 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# SPDX-FileCopyrightText: 2025 Digg - Agency for Digital Government
#
# SPDX-License-Identifier: CC0-1.0
FROM node:24.11.0-slim AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci --no-audit --no-fund --ignore-scripts
COPY . .
RUN npm run build && \
npm prune --omit=dev
FROM node:24.11.0-slim AS runtime
ENV NODE_ENV=production
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/package*.json ./
COPY --from=build /app/document ./document
COPY --from=build /app/README.md ./README.md
COPY --from=build /app/GUIDELINES.md ./GUIDELINES.md
COPY --from=build /app/openapi.yaml ./openapi.yaml
COPY --from=build /app/urlValidationConfig.cjs ./urlValidationConfig.cjs
RUN chown -R node:node /app
USER node
ENTRYPOINT ["node", "dist/app.js"]