mcqemu/docs-site/docker-compose.yml
Ryan Malloy f4c2a70bbf Add the mcqemu.warehack.ing docs site
Starlight, diataxis-shaped: a tutorial pair, six how-to guides, a generated
tool reference plus a configuration reference, and four explanation pages
covering architecture, sandbox isolation, see-and-drive, and the failure
handling philosophy.

The tool reference is generated from the running MCP server's own schemas, so
its 33 tools, parameters and defaults cannot drift from the code; the
generator asserts its grouping still covers exactly the live tool set.

Infrastructure follows the warehacking cookie-cutter (multi-stage Dockerfile,
Caddy serving dist with real 404 status, compose profiles for prod and dev,
Makefile with a deploy target pointed at docker-2). Two deviations worth
noting: remark-gfm is added to the MDX pipeline because Astro enables GFM for
.md but not .mdx, so tables silently rendered as run-together paragraphs; and
the card icon palette is pinned to the accent because Starlight's staggered
grid rotates through colours including purple.

Package URLs now point at the Gitea repo and this site.
2026-08-17 18:46:56 -06:00

69 lines
2.2 KiB
YAML

# mcqemu docs site — two profiles.
#
# Default (no --profile flag):
# production — Caddy serves the built dist/. This is what runs at
# mcqemu.warehack.ing.
#
# --profile dev:
# Astro dev server with HMR, src/ bind-mounted for live reload. The Vite
# HMR WebSocket is configured in astro.config.mjs to survive the
# TLS-terminating proxy; the caddy.reverse_proxy.* labels below keep the
# connection from being closed as idle.
#
# Both services join the external `caddy` network and advertise themselves
# to caddy-docker-proxy through labels. DOMAIN in .env switches between the
# production and local-dev tiers.
services:
docs:
profiles: ["prod", ""]
build:
context: .
target: prod
image: mcqemu-docs:prod
container_name: mcqemu-docs
restart: unless-stopped
networks:
- caddy
labels:
caddy: ${DOMAIN:-mcqemu.warehack.ing}
caddy.reverse_proxy: "{{upstreams 80}}"
docs-dev:
profiles: ["dev"]
build:
context: .
target: dev
image: mcqemu-docs:dev
container_name: mcqemu-docs-dev
restart: unless-stopped
environment:
- DOMAIN=${DOMAIN:-mcqemu.l.warehack.ing}
- ASTRO_TELEMETRY_DISABLED=1
volumes:
# node_modules stays inside the container so host/platform mismatches
# cannot break native deps.
- ./astro.config.mjs:/app/astro.config.mjs:ro
- ./tsconfig.json:/app/tsconfig.json:ro
- ./src:/app/src
- ./public:/app/public
networks:
- caddy
labels:
caddy: ${DOMAIN:-mcqemu.l.warehack.ing}
caddy.reverse_proxy: "{{upstreams 4321}}"
# Vite HMR sends no application-level pings, so Caddy's default idle
# timeouts would close the socket every 10-15s. Needs Caddy 2.10+.
caddy.reverse_proxy.flush_interval: "-1"
caddy.reverse_proxy.transport: "http"
caddy.reverse_proxy.transport.read_timeout: "0"
caddy.reverse_proxy.transport.write_timeout: "0"
caddy.reverse_proxy.transport.keepalive: "5m"
caddy.reverse_proxy.transport.keepalive_idle_conns: "10"
caddy.reverse_proxy.stream_timeout: "24h"
caddy.reverse_proxy.stream_close_delay: "5s"
networks:
caddy:
external: true