-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile.frontend
More file actions
29 lines (25 loc) · 840 Bytes
/
Copy pathDockerfile.frontend
File metadata and controls
29 lines (25 loc) · 840 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
# Combined frontend: landing (Astro) + dashboard (Vite React)
# Build context: repo root
# ── Dashboard build ──
FROM node:22-alpine AS dashboard-builder
WORKDIR /app
RUN corepack enable pnpm
COPY dashboard/package.json dashboard/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY dashboard/ .
RUN pnpm build
# ── Landing build ──
FROM node:22-alpine AS landing-builder
WORKDIR /app
RUN corepack enable pnpm
COPY landing/package.json landing/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY landing/ .
RUN pnpm build
# ── Nginx serving both ──
FROM nginx:alpine
COPY --from=dashboard-builder /app/dist /usr/share/nginx/dashboard
COPY --from=landing-builder /app/dist /usr/share/nginx/landing
COPY dashboard/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3100
CMD ["nginx", "-g", "daemon off;"]