Wire mcltspice into the backend image: WineHQ 11.10 (matching the dev host), i386 multiarch, Mesa software GL, a build-time Wine prefix seeded with the LTspice.ini first-run config, and an entrypoint that starts Xvfb. The LTspice install (exe/lib/examples) mounts from the host; the engine reads LTSPICE_DIR. Gated for now: LTspice v26 stalls at graphics init under headless Wine in the slim image (runs fine on a full desktop). The mount + LTSPICE_DIR are commented in docker-compose.prod.yml so the engine fails fast as 'unavailable' rather than hanging. ngspice is unaffected.
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
target: prod
|
|
expose:
|
|
- "8000"
|
|
# LTspice engine is GATED. The backend image ships Wine 11.10 + the prefix,
|
|
# and the host carries ./ltspice (exe/lib/examples), but LTspice v26 stalls
|
|
# at graphics init under headless Wine in this slim image (works on the dev
|
|
# desktop). Without LTSPICE_DIR the engine reports "unavailable" and fails
|
|
# fast instead of hanging. To resume debugging, uncomment the two blocks:
|
|
# volumes:
|
|
# - ./ltspice:/opt/ltspice-src:ro
|
|
# environment:
|
|
# - LTSPICE_DIR=/opt/ltspice
|
|
# - DISPLAY=:99
|
|
networks:
|
|
- default
|
|
- caddy
|
|
labels:
|
|
caddy: "${SPICEBOOK_DOMAIN:-spicebook.localhost}"
|
|
caddy.@api.path: "/api/* /health /docs /openapi.json /redoc /mcp/*"
|
|
caddy.reverse_proxy_0: "@api {{upstreams 8000}}"
|
|
caddy.reverse_proxy_0.flush_interval: "-1"
|
|
caddy.reverse_proxy_0.transport: "http"
|
|
caddy.reverse_proxy_0.transport.read_timeout: "0"
|
|
caddy.reverse_proxy_0.transport.write_timeout: "0"
|
|
caddy.reverse_proxy_0.stream_timeout: "24h"
|
|
caddy.reverse_proxy_0.stream_close_delay: "5s"
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
target: prod
|
|
expose:
|
|
- "4321"
|
|
networks:
|
|
- default
|
|
- caddy
|
|
labels:
|
|
caddy: "${SPICEBOOK_DOMAIN:-spicebook.localhost}"
|
|
caddy.reverse_proxy_1: "{{upstreams 4321}}"
|
|
caddy.reverse_proxy_1.flush_interval: "-1"
|
|
|
|
networks:
|
|
caddy:
|
|
external: true
|