spicebook/docker-compose.prod.yml

58 lines
2.0 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,
# the host carries ./ltspice (exe/lib/examples), but LTspice v26's threads
# spin in userspace during startup under headless Wine in this slim image
# (runs fine on the dev desktop). Without LTSPICE_DIR the engine reports
# "unavailable" and fails fast instead of hanging.
#
# Ruled out (don't re-tread): Wine version (11.10 matches dev), the ini
# first-run seed, the X display (Xvfb up), GL/EGL/vulkan libs, fonts,
# 32-bit subsystem, color depth, and the entire CUPS/print path (cupsd up,
# CUPS_SERVER, libcups removed -- all still spin). Next: a userspace
# backtrace of the spinning thread, or pivot to running mcltspice on a
# real desktop and calling it remotely. To resume, uncomment both 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