cuckoo-escapement/docs-site/docker-compose.yml
Ryan Malloy 674ad25662 Move to escapement.warehack.ing; fix GFM tables in MDX
The landing page's headline results table was rendering as a paragraph of raw
pipe characters. Astro applies remark-gfm to .md but it wasn't reaching the MDX
pipeline, so every .md page rendered tables fine and only index.mdx was broken —
which is exactly why it went unnoticed. mdx({remarkPlugins:[remarkGfm]}) fixes it.

cuckoo.warehack.ing stays as a permanent redirect; it was live briefly.
2026-07-14 10:51:35 -06:00

80 lines
2.9 KiB
YAML

# cuckoo-escapement docs site — two profiles.
#
# Default (no --profile flag):
# prod-style — Caddy serves the built dist/. Use for production-like
# deploys (the public site at escapement.warehack.ing runs this).
#
# --profile dev:
# Astro dev server with HMR. Volume mounts on src/ so edits hot-reload.
# The Vite HMR WebSocket is configured in astro.config.mjs to work
# behind the caddy-docker-proxy TLS-terminating front-end — see the
# `caddy.reverse_proxy.*` labels below for the WebSocket-friendly
# timeout configuration.
#
# Both services attach to the external `caddy` network and expose
# themselves to caddy-docker-proxy via labels. Edit DOMAIN in .env to
# switch between escapement.warehack.ing (prod) and escapement.l.warehack.ing
# (local-dev tier).
services:
docs:
profiles: ["prod", ""]
build:
context: .
target: prod
image: cuckoo-escapement-docs:prod
container_name: cuckoo-escapement-docs
restart: unless-stopped
networks:
- caddy
labels:
caddy: ${DOMAIN:-escapement.warehack.ing}
caddy.reverse_proxy: "{{upstreams 80}}"
# encode + gzip already in the container; let caddy pass through.
# The site was briefly live at cuckoo.warehack.ing before the rename. Keep
# the old host as a permanent redirect rather than letting any link that
# escaped rot. {uri} preserves the path, so deep links survive too.
caddy_1: cuckoo.warehack.ing
caddy_1.redir: https://escapement.warehack.ing{uri} permanent
docs-dev:
profiles: ["dev"]
build:
context: .
target: dev
image: cuckoo-escapement-docs:dev
container_name: cuckoo-escapement-docs-dev
restart: unless-stopped
environment:
- DOMAIN=${DOMAIN:-escapement.l.warehack.ing}
- ASTRO_TELEMETRY_DISABLED=1
volumes:
# Hot-reload bind mounts. node_modules stays inside the container
# so host platform mismatches don't 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:-escapement.l.warehack.ing}
caddy.reverse_proxy: "{{upstreams 4321}}"
# Vite HMR over WebSocket. Caddy's defaults close "idle" WS
# connections after ~10-15s; HMR doesn't send app-level pings, so
# we need explicit long-lived timeouts. Required for Caddy 2.10+
# (HTTP/2 WS fix). See ~/.claude/references/web-frontend.md.
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