From 78350e02af0b0d1b9a45cb08215d5f909bae08a1 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Mon, 23 Feb 2026 14:25:58 -0700 Subject: [PATCH] Update docker-compose and astro config for chat/MCP integration - Add ANTHROPIC_API_KEY env passthrough in docker-compose.yml - Add astro telemetry and devToolbar disable settings - Update CLAUDE.md with deployment notes --- CLAUDE.md | 13 +++++++++++-- docker-compose.yml | 2 ++ frontend/astro.config.mjs | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 61e36cf..922f5f4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,14 +12,23 @@ Notebook interface for SPICE circuit simulation. ```bash # Local dev (Docker) make dev -# Frontend: http://localhost:4321 -# Backend: http://localhost:8099 +# Local site: https://spicebook.l.warehack.ing (via caddy-docker-proxy) +# API docs: https://spicebook.l.warehack.ing/docs # Local dev (no Docker) cd backend && uv run uvicorn spicebook.main:app --host 0.0.0.0 --port 8099 --reload cd frontend && npm run dev -- --host 0.0.0.0 --port 4322 ``` +### Local vs Production domains + +| Environment | Domain | `.env` setting | +|-------------|--------|----------------| +| Local dev | `spicebook.l.warehack.ing` | `SPICEBOOK_DOMAIN=spicebook.l.warehack.ing` | +| Production | `spicebook.warehack.ing` | `SPICEBOOK_DOMAIN=spicebook.warehack.ing` | + +The `.env` on the dev machine should use `spicebook.l.warehack.ing` — the `.l.` subdomain resolves locally. Using the production domain (`spicebook.warehack.ing`) will route requests to the remote production server, not the local containers. + ## Deployment to Production Production runs on `warehack.ing` (149.28.126.25) behind caddy-docker-proxy. diff --git a/docker-compose.yml b/docker-compose.yml index d714825..571e2da 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,8 @@ services: build: context: ./frontend env_file: .env + environment: + - PUBLIC_API_URL=https://${SPICEBOOK_DOMAIN:-localhost:4321} depends_on: backend: condition: service_healthy diff --git a/frontend/astro.config.mjs b/frontend/astro.config.mjs index 51fabc8..85f4369 100644 --- a/frontend/astro.config.mjs +++ b/frontend/astro.config.mjs @@ -24,6 +24,10 @@ export default defineConfig({ optimizeDeps: { exclude: ['@resvg/resvg-js'] }, server: { host: '0.0.0.0', + // Allow the Caddy reverse proxy domain (Vite 7+ blocks unknown Host headers) + ...(process.env.SPICEBOOK_DOMAIN && { + allowedHosts: [process.env.SPICEBOOK_DOMAIN], + }), ...(process.env.VITE_HMR_HOST && { hmr: { host: process.env.VITE_HMR_HOST,