-
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (28 loc) · 693 Bytes
/
Dockerfile
File metadata and controls
44 lines (28 loc) · 693 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
39
40
41
42
43
44
FROM node:22.17.0-alpine AS base
RUN apk add --no-cache \
python3 \
make \
g++
WORKDIR /app
FROM base AS builder
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
FROM base AS native
WORKDIR /app
COPY package*.json .
RUN npm ci --omit=dev
RUN npm rebuild better-sqlite3
FROM node:22.17.0-alpine AS production
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/server ./server
COPY --from=builder /app/shared ./shared
COPY --from=native /app/node_modules ./node_modules
COPY --from=native /app/package*.json ./
ENV NODE_ENV=production \
HUSKY=0
EXPOSE 2308
CMD ["npm", "run", "docker"]