-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (24 loc) · 956 Bytes
/
Copy pathDockerfile
File metadata and controls
40 lines (24 loc) · 956 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
FROM node:22-slim AS build
WORKDIR /usr/src/app
RUN corepack enable
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.base.json ./
COPY frontend/package.json frontend/tsconfig.json frontend/tsconfig.node.json frontend/vite.config.ts ./frontend/
COPY backend/package.json backend/tsconfig.json ./backend/
RUN pnpm install --frozen-lockfile
COPY frontend/ ./frontend/
COPY backend/ ./backend/
RUN pnpm run build
FROM node:22-slim AS runtime
ENV NODE_ENV=production
ENV FRONTEND_DIST=/usr/src/app/frontend/dist
ENV LISTEN_PORT=4999
WORKDIR /usr/src/app
RUN corepack enable
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY backend/package.json ./backend/
RUN pnpm install --prod --frozen-lockfile --filter video-chat-backend...
COPY --from=build /usr/src/app/backend/dist ./backend/dist
COPY --from=build /usr/src/app/frontend/dist ./frontend/dist
EXPOSE 4999
WORKDIR /usr/src/app/backend
CMD ["node", "dist/server.js"]