-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (23 loc) · 816 Bytes
/
Dockerfile
File metadata and controls
26 lines (23 loc) · 816 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
FROM node:22-alpine AS base
WORKDIR /app
COPY package.json yarn.lock ./
COPY packages/api/package.json packages/api/
COPY packages/web/package.json packages/web/
RUN yarn install --frozen-lockfile --production=false
FROM base AS build-web
COPY packages/web/ packages/web/
COPY tsconfig.json ./
RUN yarn workspace @6oclock/web build
FROM base AS build-api
COPY packages/api/ packages/api/
COPY tsconfig.json ./
RUN yarn workspace @6oclock/api build
FROM node:22-alpine
WORKDIR /app
COPY package.json yarn.lock ./
COPY packages/api/package.json packages/api/
RUN yarn install --frozen-lockfile --production && yarn cache clean
COPY --from=build-api /app/packages/api/dist packages/api/dist
COPY --from=build-web /app/packages/web/dist packages/api/dist/public
EXPOSE 34571
CMD ["node", "packages/api/dist/main.js"]