-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (20 loc) · 708 Bytes
/
Dockerfile
File metadata and controls
22 lines (20 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM node:22-alpine as ts-builder
WORKDIR /app
COPY . /app
RUN npm i -g npm && npm ci --ignore-scripts && npm run build
FROM node:22-alpine as dep-builder
WORKDIR /app
COPY package.json package-lock.json /app/
COPY tools /app/tools
RUN apk add --no-cache --update build-base python3 py3-pip
COPY --from=ts-builder /app/dist /app/dist
RUN npm i -g npm && npm ci && node tools/minify-docker.js && sh tools/clean-nm.sh
FROM node:22-alpine as app
WORKDIR /app
ENV NODE_PRODUCTION true
COPY data /app/data
COPY logs /app/logs
COPY package.json /app/package.json
COPY --from=ts-builder /app/dist /app/dist
COPY --from=dep-builder /app/node_modules-minimal/node_modules /app/node_modules
CMD npm run start-docker