mirror of
https://github.com/luxfi/bridge.git
synced 2026-09-24 00:26:46 +00:00
pkg/utila has a rollup config issue + isn't in app/bridge's dep graph. pkg/bridge ships from src/ (no dist), Vite reads its TS directly. Drop both from the pre-build chain — threshold + core are the only workspace deps that need to be compiled for Vite to resolve exports.
22 lines
919 B
Docker
22 lines
919 B
Docker
# syntax=docker/dockerfile:1.7
|
|
#
|
|
# Bridge — Vite 8 SPA served by ghcr.io/hanzoai/spa.
|
|
# Build context: repo root (pnpm workspace).
|
|
|
|
FROM node:22-alpine AS build
|
|
RUN apk add --no-cache libc6-compat python3 make g++ git
|
|
RUN corepack enable && corepack prepare [email protected] --activate
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN pnpm install --frozen-lockfile 2>/dev/null || pnpm install --no-frozen-lockfile
|
|
# Build only the workspace deps app/bridge transitively needs whose packages
|
|
# declare exports → dist/ (i.e. require a compile to be resolvable). pkg/bridge
|
|
# itself ships from src/ (exports point at src/*.ts), so Vite consumes its TS
|
|
# directly — no build needed. pkg/utila + pkg/settings + pkg/ui are not in
|
|
# app/bridge's dep graph and are intentionally skipped.
|
|
RUN pnpm -C pkg/threshold build && pnpm -C pkg/core build
|
|
RUN pnpm -C app/bridge build
|
|
|
|
FROM ghcr.io/hanzoai/spa
|
|
COPY --from=build /app/app/bridge/dist /public
|