Files
2026-09-16 16:41:15 -07:00

23 lines
770 B
Docker

# Build stage
# The exported files are the same bytes on either architecture, so this stage
# runs native on the build host instead of once per target under emulation.
FROM --platform=$BUILDPLATFORM node:20-alpine AS build
WORKDIR /src
ENV CI=true
RUN npm install -g pnpm@10
COPY . .
RUN pnpm install --frozen-lockfile
RUN pnpm --filter @luxbank/brand build
RUN cd app/site && STATIC_EXPORT=1 pnpm build
# Build a Pagefind search index over the exported site.
# The resulting /pagefind/* is served statically and loaded lazily by the
# CommandPalette in src/components/CommandPalette.
RUN cd app/site && npx --yes pagefind --site out
# Runtime stage
FROM ghcr.io/hanzoai/spa:1.4.13
COPY --from=build /src/app/site/out /public
ENV PORT=3000
ENV ROOT=/public
EXPOSE 3000