-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (30 loc) · 904 Bytes
/
Dockerfile
File metadata and controls
38 lines (30 loc) · 904 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
35
36
37
38
FROM node:24 AS deps
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
FROM node:24 AS deps-prod
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile --production --no-cache
FROM node:24 AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN yarn build
FROM node:24 AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN apt-get update && apt-get install -y --no-install-recommends \
chromium \
libnss3 \
ca-certificates \
fonts-freefont-otf \
&& rm -rf /var/lib/apt/lists/*
COPY --from=deps-prod /app/node_modules ./node_modules
COPY --from=builder /app/dist/src ./dist
COPY rootfs/ /
RUN chmod +x /usr/local/bin/gen_secret
EXPOSE 3000
USER node
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s CMD wget -qO- http://localhost:3000/api/healthz || exit 1
CMD ["node", "dist/main.js"]