Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 30s
The editor was unstyled: editor.css is .koenig-lexical-scoped (the OTHER editor);
the sx-editor's .sx-* styles live in the ~editor/sx-editor-styles component
(inline <style> in blog/sx/editor.sx). Inline them into /new by rendering that
component with the 5.1 render-page primitive (dogfooding the capability live), +
FontAwesome for the +/slash-menu icons. 79 .sx- rules now inlined.
Also: the sx_host container only mounted spec+lib, so web/adapter-html.sx (and
now blog/sx/{layouts,editor}.sx) silently failed to load at boot -> render-page
errored -> /new 502. Mount ./web + ./blog (ro) so they load. (Transitional reuse
of the legacy blog editor component + its styles; retire via the asset-manifest +
native SX-island editor.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
48 lines
1.9 KiB
YAML
48 lines
1.9 KiB
YAML
# host-on-sx live service — the SX web host (lib/host) served by the native
|
|
# http-listen server via lib/host/serve.sh. Joins the sx-dev project + externalnet
|
|
# so Caddy can reverse_proxy a subdomain to it (blog.rose-ash.com). Isolated from
|
|
# the sx_docs server: separate container, separate port.
|
|
#
|
|
# Usage:
|
|
# docker compose -p sx-dev -f docker-compose.dev-sx-host.yml up -d sx_host
|
|
# docker compose -p sx-dev -f docker-compose.dev-sx-host.yml logs -f sx_host
|
|
# docker compose -p sx-dev -f docker-compose.dev-sx-host.yml down
|
|
|
|
services:
|
|
sx_host:
|
|
image: registry.rose-ash.com:5000/sx_docs:latest
|
|
container_name: sx-dev-sx_host-1
|
|
entrypoint: ["bash", "/app/lib/host/serve.sh"]
|
|
working_dir: /app
|
|
environment:
|
|
SX_PROJECT_DIR: /app
|
|
SX_SERVER: /app/bin/sx_server
|
|
HOST_PORT: "8000"
|
|
# Bind all interfaces so Caddy (on externalnet) can reach it.
|
|
SX_HTTP_HOST: "0.0.0.0"
|
|
# Durable persist store root — on a named volume so data survives restarts.
|
|
SX_PERSIST_DIR: /data/persist
|
|
OCAMLRUNPARAM: "b"
|
|
volumes:
|
|
# SX source (hot-reload on container restart)
|
|
- ./spec:/app/spec:ro
|
|
- ./lib:/app/lib:ro
|
|
- ./web:/app/web:ro
|
|
# blog app SX — reused for the editor's style component (transitional;
|
|
# retire when the editor + its styles are host-owned / asset-managed)
|
|
- ./blog:/app/blog:ro
|
|
# OCaml server binary — this worktree's build (has the SX_HTTP_HOST bind fix)
|
|
- ./hosts/ocaml/_build/default/bin/sx_server.exe:/app/bin/sx_server:ro
|
|
# Durable persist store (the SX op-log/kv on disk) — survives restarts.
|
|
# Host dir, chowned to the image's appuser (uid 10001) so the non-root
|
|
# server can write: sudo mkdir -p /root/sx-host-persist && sudo chown 10001:10001 /root/sx-host-persist
|
|
- /root/sx-host-persist:/data/persist
|
|
networks:
|
|
- externalnet
|
|
- default
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
externalnet:
|
|
external: true
|