airi/apps/stage-web/Dockerfile
Rin f85a809d7c
refactor(stage-*): analytics and telemetry, including consent (#1414)
---------

Co-authored-by-agent: Codex <267193182+codex@users.noreply.github.com>
Co-authored-by-agent: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: RainbowBird <rbxin2003@outlook.com>
Co-authored-by: Neko <neko@ayaka.moe>
2026-03-24 13:01:39 +08:00

29 lines
863 B
Docker

FROM node:24-trixie AS build-stage
WORKDIR /app
ARG VITE_ENABLE_POSTHOG=false
ENV VITE_ENABLE_POSTHOG=${VITE_ENABLE_POSTHOG}
RUN apt update && apt install -y ca-certificates curl
RUN update-ca-certificates
RUN apt update && apt install -y build-essential python3 python3-setuptools curl
RUN corepack enable
COPY . .
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
pnpm install --frozen-lockfile
RUN pnpm -F @proj-airi/stage-web run build && \
pnpm -F @proj-airi/docs run build:base && \
mv ./docs/.vitepress/dist ./apps/stage-web/dist/docs && \
pnpm -F @proj-airi/stage-ui run story:build && \
mv ./packages/stage-ui/.histoire/dist ./apps/stage-web/dist/ui
FROM nginx:stable-alpine AS production-stage
COPY --from=build-stage /app/apps/stage-web/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]