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
This commit is contained in:
parent
b89e520479
commit
78350e02af
13
CLAUDE.md
13
CLAUDE.md
@ -12,14 +12,23 @@ Notebook interface for SPICE circuit simulation.
|
|||||||
```bash
|
```bash
|
||||||
# Local dev (Docker)
|
# Local dev (Docker)
|
||||||
make dev
|
make dev
|
||||||
# Frontend: http://localhost:4321
|
# Local site: https://spicebook.l.warehack.ing (via caddy-docker-proxy)
|
||||||
# Backend: http://localhost:8099
|
# API docs: https://spicebook.l.warehack.ing/docs
|
||||||
|
|
||||||
# Local dev (no Docker)
|
# Local dev (no Docker)
|
||||||
cd backend && uv run uvicorn spicebook.main:app --host 0.0.0.0 --port 8099 --reload
|
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
|
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
|
## Deployment to Production
|
||||||
|
|
||||||
Production runs on `warehack.ing` (149.28.126.25) behind caddy-docker-proxy.
|
Production runs on `warehack.ing` (149.28.126.25) behind caddy-docker-proxy.
|
||||||
|
|||||||
@ -15,6 +15,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
env_file: .env
|
env_file: .env
|
||||||
|
environment:
|
||||||
|
- PUBLIC_API_URL=https://${SPICEBOOK_DOMAIN:-localhost:4321}
|
||||||
depends_on:
|
depends_on:
|
||||||
backend:
|
backend:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|||||||
@ -24,6 +24,10 @@ export default defineConfig({
|
|||||||
optimizeDeps: { exclude: ['@resvg/resvg-js'] },
|
optimizeDeps: { exclude: ['@resvg/resvg-js'] },
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
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 && {
|
...(process.env.VITE_HMR_HOST && {
|
||||||
hmr: {
|
hmr: {
|
||||||
host: process.env.VITE_HMR_HOST,
|
host: process.env.VITE_HMR_HOST,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user