Add sx documentation app (sx.rose-ash.com)

New public-facing service documenting the s-expression rendering engine.
Modelled on four.htmx.org with violet theme, all content rendered via sx.

Sections: docs, reference, protocols, examples (live demos), essays
(including "sx sucks"). No database — purely static documentation.

Port 8012, Redis DB 10. CI and deploy.sh updated with app_dir() mapping
for sx_docs -> sx/ directory. Caddy reverse proxy entry added separately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 21:25:52 +00:00
parent 815c5285d5
commit 03196c3ad0
20 changed files with 2001 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
set -euo pipefail
REGISTRY="registry.rose-ash.com:5000"
APPS="blog market cart events federation account relations likes orders test"
APPS="blog market cart events federation account relations likes orders test sx_docs"
usage() {
echo "Usage: deploy.sh [app ...]"
@@ -15,6 +15,14 @@ usage() {
cd "$(dirname "$0")"
_app_dir() {
# Map compose service name to source directory when they differ
case "$1" in
sx_docs) echo "sx" ;;
*) echo "$1" ;;
esac
}
# Determine which apps to build
if [ $# -eq 0 ]; then
# Auto-detect: uncommitted changes + last commit
@@ -24,7 +32,8 @@ if [ $# -eq 0 ]; then
BUILD=($APPS)
else
for app in $APPS; do
if echo "$CHANGED" | grep -q "^$app/"; then
dir=$(_app_dir "$app")
if echo "$CHANGED" | grep -q "^$dir/"; then
BUILD+=("$app")
fi
done
@@ -56,8 +65,9 @@ echo "Unit tests passed."
echo ""
for app in "${BUILD[@]}"; do
dir=$(_app_dir "$app")
echo "=== $app ==="
docker build -f "$app/Dockerfile" -t "$REGISTRY/$app:latest" .
docker build -f "$dir/Dockerfile" -t "$REGISTRY/$app:latest" .
docker push "$REGISTRY/$app:latest"
docker service update --force "coop_$app" 2>/dev/null \
|| echo " (service coop_$app not running — will start on next stack deploy)"