generated from KagChi/solid-start-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi.Dockerfile
33 lines (19 loc) · 809 Bytes
/
api.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
FROM ghcr.io/hazmi35/node:20-dev-alpine as build-stage
WORKDIR /tmp/build
RUN corepack enable && corepack prepare pnpm@latest
RUN apk add --no-cache build-base git python3
COPY . .
RUN pnpm install --frozen-lockfile
RUN pnpm run build
RUN pnpm prune --production
FROM ghcr.io/hazmi35/node:20-alpine
LABEL name "QRISTY API"
LABEL maintainer "KagChi"
WORKDIR /app
RUN apk add --no-cache tzdata
COPY --from=build-stage /tmp/build/services/api/package.json ./services/api/package.json
COPY --from=build-stage /tmp/build/services/api/node_modules ./services/api/node_modules
COPY --from=build-stage /tmp/build/services/api/dist ./services/api/dist
COPY --from=build-stage /tmp/build/pnpm-lock.yaml .
COPY --from=build-stage /tmp/build/node_modules ./node_modules
CMD node ./services/api/dist/index.js