-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (18 loc) · 734 Bytes
/
Dockerfile
File metadata and controls
19 lines (18 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# ---------- Build (Vite) ----------
FROM node:22-slim AS builder
WORKDIR /app
RUN corepack enable && corepack prepare pnpm@latest --activate
COPY package.json pnpm-lock.yaml* ./
RUN pnpm install --frozen-lockfile
COPY . .
ARG BUILDTIME
ARG VERSION
ARG REVISION
ENV VITE_BUILDTIME=$BUILDTIME VITE_VERSION=$VERSION VITE_REVISION=$REVISION
RUN pnpm build
# ---------- Runtime (Static Web Server) ----------
FROM ghcr.io/static-web-server/static-web-server:latest
COPY --from=builder /app/dist /public
EXPOSE 8080
# NOTE: keep CMD on ONE line so linters don't misparse flags as instructions
CMD ["--root","/public","--host","0.0.0.0","--port","8080","--page-fallback","/index.html","--compression","true","--compression-static","true"]