-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (26 loc) · 968 Bytes
/
Dockerfile
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
45
FROM docker.io/library/node:20-slim AS base
RUN apt-get update && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
WORKDIR /app
FROM base AS build
COPY package.json package-lock.json ./
RUN npm ci
COPY prisma prisma
RUN npx prisma generate
COPY panda.config.ts postcss.config.cjs tsconfig.json vite.config.ts ./
COPY src src
COPY vendors vendors
RUN NODE_ENV=production npm run build
FROM base AS node_modules
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
FROM base
COPY package.json ./
COPY --from=node_modules /app/node_modules node_modules
COPY --from=build /app/build build
COPY --from=build /app/dist dist
COPY --from=build /app/out out
COPY --from=build /app/styled-system styled-system
COPY --from=build /app/node_modules/.prisma /app/node_modules/.prisma
COPY --from=build /app/node_modules/@prisma/client /app/node_modules/@prisma/client
ENV NODE_ENV=production
CMD [ "node", "--enable-source-maps", "out/main.js" ]