-
-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (22 loc) · 878 Bytes
/
Dockerfile
File metadata and controls
33 lines (22 loc) · 878 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
# ---- BASE ----
FROM node:24-alpine AS base
RUN corepack enable && corepack prepare pnpm@latest --activate
# ---- BUILDER ----
FROM base AS builder
WORKDIR /app
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
COPY packages/common/package.json ./packages/common/
COPY packages/web/package.json ./packages/web/
COPY packages/socket/package.json ./packages/socket/
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
# ---- RUNNER ----
FROM alpine:3.21 AS runner
RUN apk add --no-cache nginx nodejs supervisor
COPY docker/nginx.conf /etc/nginx/http.d/default.conf
COPY docker/supervisord.conf /etc/supervisord.conf
COPY --from=builder /app/packages/web/dist /app/web
COPY --from=builder /app/packages/socket/dist/index.cjs /app/socket/index.cjs
EXPOSE 3000
CMD ["supervisord", "-c", "/etc/supervisord.conf"]