forked from mettamatt/code-reasoning
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (17 loc) · 662 Bytes
/
Dockerfile
File metadata and controls
28 lines (17 loc) · 662 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
FROM node:22.12-alpine AS builder
COPY package.json package-lock.json tsconfig.json /app/
COPY src /app/src
WORKDIR /app
RUN --mount=type=cache,target=/root/.npm npm install
RUN npm run build
FROM node:22-alpine AS release
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/package-lock.json /app/package-lock.json
ENV NODE_ENV=production
WORKDIR /app
RUN npm ci --ignore-scripts --omit-dev
USER node
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD node -e "process.exit(0)" || exit 1
ENTRYPOINT ["node", "--max-old-space-size=512", "dist/index.js"]