Replace Quartz with a read-only SilverBullet for public /notes/

/notes/ is now served by silverbullet-public: the same SilverBullet 2.11.0
image as the /sb/ editor, run with SB_READ_ONLY over a read-only mount of
the vault. Quartz is retired (quartz/ kept with a STATUS header).

Keeping private/ off the public site needs nginx, not just SilverBullet:
SB_SPACE_IGNORE only filters the file listing. Verified with curl that
2.11.0 still serves ignored paths via /.fs/<path>, via server-rendered page
URLs, and exposes the vault's .git through /.fs/.git/. nginx now 404s any
private/ or templates/ segment at any depth and any nested dot-folder under
/notes/. SB_REVISIONS=disabled stops /.revisions serving git history, and
nginx blocks it as a second layer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-09-30 20:37:10 +01:00
co-authored by Claude Opus 5.5
parent 78324bf7a3
commit 7ce86f08ec
8 changed files with 200 additions and 84 deletions
+5 -2
View File
@@ -68,8 +68,9 @@
# ICECAST_HOST / ICECAST_PORT radio stream upstream
# GITEA_HOST / GITEA_PORT git server upstream
# HASURA_HOST / HASURA_PORT Hasura console upstream
# QUARTZ_HOST / QUARTZ_PORT notes site upstream
# SILVERBULLET_HOST / _PORT notes editor upstream (defaulted below)
# SILVERBULLET_PUBLIC_HOST / _PORT
# public notes viewer upstream (defaulted below)
# PYTHON_HOST / PYTHON_PORT FastAPI upstream (defaulted below)
# DEV_MODE "true" only via docker-compose.dev.yml
# CERT_WATCH_INTERVAL optional, seconds between certificate-watch
@@ -89,11 +90,13 @@ export PYTHON_HOST="${PYTHON_HOST:-python}"
export PYTHON_PORT="${PYTHON_PORT:-8000}"
export SILVERBULLET_HOST="${SILVERBULLET_HOST:-silverbullet}"
export SILVERBULLET_PORT="${SILVERBULLET_PORT:-3000}"
export SILVERBULLET_PUBLIC_HOST="${SILVERBULLET_PUBLIC_HOST:-silverbullet-public}"
export SILVERBULLET_PUBLIC_PORT="${SILVERBULLET_PUBLIC_PORT:-3000}"
# The envsubst allow-list, defined once and reused by both full-config branches
# so the two lists cannot drift apart. It MUST stay single-quoted here and be
# passed as "$ENVSUBST_VARS" (one argument) below.
ENVSUBST_VARS='${DOMAIN} ${BACKEND_HOST} ${BACKEND_PORT} ${BACKEND_ENDPOINT} ${ICECAST_HOST} ${ICECAST_PORT} ${GITEA_HOST} ${GITEA_PORT} ${HASURA_HOST} ${HASURA_PORT} ${QUARTZ_HOST} ${QUARTZ_PORT} ${SILVERBULLET_HOST} ${SILVERBULLET_PORT} ${PYTHON_HOST} ${PYTHON_PORT}'
ENVSUBST_VARS='${DOMAIN} ${BACKEND_HOST} ${BACKEND_PORT} ${BACKEND_ENDPOINT} ${ICECAST_HOST} ${ICECAST_PORT} ${GITEA_HOST} ${GITEA_PORT} ${HASURA_HOST} ${HASURA_PORT} ${SILVERBULLET_HOST} ${SILVERBULLET_PORT} ${SILVERBULLET_PUBLIC_HOST} ${SILVERBULLET_PUBLIC_PORT} ${PYTHON_HOST} ${PYTHON_PORT}'
# Check if DEV_MODE
if [ "$DEV_MODE" = "true" ]; then