OCaml HTTP server now serves /static/* files with MIME types, immutable cache headers, and in-memory caching. Computes MD5 hashes for JS/WASM files and injects them as ?v= cache-busting query params. Inline CSS: reads tw.css + basics.css at startup, injects into <style id="sx-css"> tag. Pages now render with full Tailwind styling. Shell statics now include real file hashes: sx-js-hash, body-js-hash, wasm-hash — 12-char MD5 hex Docker compose: mounts shared/static as /app/static for the container. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 lines
559 B
YAML
18 lines
559 B
YAML
# Native OCaml HTTP server for sx_docs — no Python, no Quart
|
|
# Overrides dev-sx.yml entrypoint to use sx_server --http
|
|
#
|
|
# Usage:
|
|
# docker compose -p sx-dev -f docker-compose.dev-sx.yml -f docker-compose.dev-sx-native.yml up
|
|
|
|
services:
|
|
sx_docs:
|
|
entrypoint: ["/app/bin/sx_server", "--http", "8000"]
|
|
environment:
|
|
SX_PROJECT_DIR: /app
|
|
SX_SPEC_DIR: /app/spec
|
|
SX_LIB_DIR: /app/lib
|
|
SX_WEB_DIR: /app/web
|
|
volumes:
|
|
# Static files (CSS, JS, WASM) — served by Caddy on externalnet
|
|
- ./shared/static:/app/static:ro
|