mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-01 09:29:38 +02:00
28 lines
1.1 KiB
Text
28 lines
1.1 KiB
Text
|
|
# TrustGraph Workbench — Vite SPA served by nginx.
|
||
|
|
|
||
|
|
# ---------------------------------------------------------------------------
|
||
|
|
# Stage 1: Build
|
||
|
|
# ---------------------------------------------------------------------------
|
||
|
|
FROM node:22-slim AS builder
|
||
|
|
RUN corepack enable && corepack prepare pnpm@9.15.0 --activate
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json tsconfig.base.json ./
|
||
|
|
COPY packages/base/package.json packages/base/tsconfig.json packages/base/
|
||
|
|
COPY packages/client/package.json packages/client/tsconfig.json packages/client/
|
||
|
|
COPY packages/workbench/package.json packages/workbench/tsconfig.json packages/workbench/vite.config.ts packages/workbench/
|
||
|
|
|
||
|
|
RUN pnpm install --frozen-lockfile
|
||
|
|
|
||
|
|
COPY packages/ packages/
|
||
|
|
COPY tsconfig.json ./
|
||
|
|
RUN pnpm build --filter=@trustgraph/workbench
|
||
|
|
|
||
|
|
# ---------------------------------------------------------------------------
|
||
|
|
# Stage 2: Serve
|
||
|
|
# ---------------------------------------------------------------------------
|
||
|
|
FROM nginx:alpine
|
||
|
|
COPY --from=builder /app/packages/workbench/dist /usr/share/nginx/html
|
||
|
|
COPY packages/workbench/nginx.conf /etc/nginx/conf.d/default.conf
|
||
|
|
EXPOSE 80
|