File tree Expand file tree Collapse file tree 4 files changed +325
-380
lines changed
Expand file tree Collapse file tree 4 files changed +325
-380
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
2+ #
3+ # SPDX-License-Identifier: CC0-1.0
4+
5+ node_modules
6+ dist
7+ .git
8+ .gitignore
9+ .vscode
10+ coverage
11+ * .log
12+ .env
13+ .DS_Store
Original file line number Diff line number Diff line change 22#
33# SPDX-License-Identifier: CC0-1.0
44
5- FROM node:22.20.0-slim@sha256:d943bf20249f8b92eff6f605362df2ee9cf2d6ce2ea771a8886e126ec8714f08 AS packages
6- ENV NODE_ENV=staging
5+ FROM node:22.20.0-slim@sha256:d943bf20249f8b92eff6f605362df2ee9cf2d6ce2ea771a8886e126ec8714f08 AS build
6+ WORKDIR /app
7+
8+ COPY package*.json ./
9+
10+ RUN npm ci --no-audit --no-fund --ignore-scripts
11+
12+ COPY . .
713
14+ RUN npm run build
15+
16+ RUN npm prune --omit=dev
17+
18+ FROM node:22.20.0-slim@sha256:d943bf20249f8b92eff6f605362df2ee9cf2d6ce2ea771a8886e126ec8714f08 AS runtime
19+ ENV NODE_ENV=production
820WORKDIR /app
921
10- COPY --chown=node:node ["./" ,"./" ]
22+ COPY --from=build /app/dist ./dist
23+ COPY --from=build /app/node_modules ./node_modules
24+ COPY --from=build /app/package*.json ./
25+
26+ COPY --from=build /app/document ./document
27+ COPY --from=build /app/README.md ./README.md
28+ COPY --from=build /app/GUIDELINES.md ./GUIDELINES.md
29+
30+ RUN chown -R node:node /app
31+ USER node
1132
12- # RUN npm config set strict-ssl false
13- RUN npm install --omit=dev --verbose
14- RUN npm install ts-node typescript --omit=dev --verbose
15- ENTRYPOINT ["npm" , "start" , "--" ]
33+ ENTRYPOINT ["node" , "dist/app.js" ]
You can’t perform that action at this time.
0 commit comments