mirror of
https://github.com/hanzoai/id.git
synced 2026-10-26 20:59:52 +00:00
The v1.3.0 git tag exists but no 1.3.0 image was published to ghcr (build pipeline blocked). 1.2.0 is the latest published spa image and the version the canonical RECIPE.md uses. Co-authored-by: Antje Worring <[email protected]>
28 lines
1.1 KiB
Docker
28 lines
1.1 KiB
Docker
# syntax=docker/dockerfile:1.7
|
|
# Hanzo ID — Vite SPA built once, served by hanzoai/spa.
|
|
FROM node:24-alpine AS build
|
|
WORKDIR /build
|
|
ENV PNPM_HOME=/pnpm PATH=$PNPM_HOME:$PATH
|
|
RUN corepack enable && corepack prepare [email protected] --activate
|
|
|
|
COPY pnpm-workspace.yaml package.json tsconfig.base.json ./
|
|
COPY apps/web/package.json apps/web/
|
|
COPY pkgs/shared/package.json pkgs/shared/
|
|
COPY pkgs/auth/package.json pkgs/auth/
|
|
COPY pkgs/idv/package.json pkgs/idv/
|
|
RUN pnpm install --frozen-lockfile=false
|
|
|
|
COPY apps apps
|
|
COPY pkgs pkgs
|
|
RUN pnpm --filter @hanzo/id-web build
|
|
|
|
# SPA server stage — hanzoai/spa is the correct base for a Vite SPA:
|
|
# history-API fallthrough for client-side routes AND a SPA-safe CSP.
|
|
# hanzoai/static defaults to `Content-Security-Policy: default-src 'none'`
|
|
# (built for static assets, not an app that loads its own bundle), which
|
|
# blocks the SPA's own scripts and leaves a blank page. hanzoai/spa serves
|
|
# index.html for all routes with a sane CSP. Defaults: PORT=3000, ROOT=/public.
|
|
FROM ghcr.io/hanzoai/spa:1.2.0
|
|
COPY --from=build /build/apps/web/dist /public
|
|
EXPOSE 3000
|