mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-01 09:29:38 +02:00
feat: add Docker deployment with Containerfile, entrypoints, and nginx
Multi-stage Containerfile for all Node.js services (single image, different CMD per docker-compose service). ESM entrypoints for gateway, config, text-completion, prompt, embeddings, agent, and librarian. Workbench gets a separate Containerfile (nginx:alpine) with SPA routing and API/WebSocket proxy to gateway. Docker Compose updated with 6 app services (gateway, config-service, text-completion, prompt, embeddings, workbench) using shared trustgraph-ts:local image. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f09ef4de45
commit
d1f24cf759
13 changed files with 241 additions and 78 deletions
27
ts/packages/workbench/Containerfile
Normal file
27
ts/packages/workbench/Containerfile
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue