spicebook/docker-compose.dev.yml
Ryan Malloy 2ddc08cd3a Add schematic thumbnails, descriptions to notebook cards and resistor color guide
Notebook cards now show schematic SVG thumbnails (on Mims green background)
and description snippets extracted from the first markdown cell. The backend
extracts both from already-loaded notebook data at zero additional I/O cost.

New ResistorColorGuide section between the pipeline strip and featured
notebooks explains the 4-band color code with an annotated zigzag diagram
and reference table using the same BAND_HEX colors from the schematic renderer.

Also switches docker-compose.dev.yml from direct port mapping to Caddy labels,
matching the production routing pattern and avoiding port conflicts.
2026-02-21 08:56:48 -07:00

52 lines
1.5 KiB
YAML

services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
target: dev
expose:
- "8000"
volumes:
- ./backend/src:/app/src
- ./notebooks:/app/notebooks
# Mount mcltspice for live development
- ../mcp-ltspice/src/mcltspice:/app/mcltspice-lib:ro
command: ["uv", "run", "uvicorn", "spicebook.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
networks:
- default
- caddy
labels:
caddy: "${SPICEBOOK_DOMAIN:-spicebook.localhost}"
caddy.@api.path: "/api/* /health /docs /openapi.json /redoc"
caddy.reverse_proxy_0: "@api {{upstreams 8000}}"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: dev
expose:
- "4321"
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
command: ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
networks:
- default
- caddy
labels:
caddy: "${SPICEBOOK_DOMAIN:-spicebook.localhost}"
caddy.reverse_proxy_1: "{{upstreams 4321}}"
caddy.reverse_proxy_1.flush_interval: "-1"
caddy.reverse_proxy_1.transport: "http"
caddy.reverse_proxy_1.transport.read_timeout: "0"
caddy.reverse_proxy_1.transport.write_timeout: "0"
caddy.reverse_proxy_1.transport.keepalive: "5m"
caddy.reverse_proxy_1.transport.keepalive_idle_conns: "10"
caddy.reverse_proxy_1.stream_timeout: "24h"
caddy.reverse_proxy_1.stream_close_delay: "5s"
networks:
caddy:
external: true