-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (31 loc) · 1.03 KB
/
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
46
47
FROM node:20.3.1
RUN npm install -g pnpm
WORKDIR /app
COPY pnpm-lock.yaml .
RUN pnpm fetch
COPY . .
RUN pnpm install --offline --ignore-scripts --frozen-lockfile
ARG NODE_ENV=production
ARG SENTRY_AUTH_TOKEN
ARG SOURCE_VERSION
RUN pnpm b prepare
RUN pnpm b build
RUN pnpm b sentry
RUN pnpm w build
FROM node:20.3.1-alpine
COPY --from=0 /app/package.json /app/package.json
COPY --from=0 /app/pnpm-lock.yaml /app/pnpm-lock.yaml
COPY --from=0 /app/pnpm-workspace.yaml /app/pnpm-workspace.yaml
COPY --from=0 /app/webapp/package.json /app/webapp/package.json
COPY --from=0 /app/backend/package.json /app/backend/package.json
COPY --from=0 /app/shared/package.json /app/shared/package.json
COPY --from=0 /app/webapp/dist /app/webapp/dist
COPY --from=0 /app/backend/dist /app/backend/dist
COPY --from=0 /app/backend/src/prisma /app/backend/src/prisma
WORKDIR /app
RUN npm install -g pnpm
RUN pnpm install --ignore-scripts --frozen-lockfile --prod
RUN pnpm b pgc
ARG SOURCE_VERSION
ENV SOURCE_VERSION=$SOURCE_VERSION
CMD pnpm b pmp && pnpm b start