Files
mono/sx/entrypoint.sh
giles 03196c3ad0 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>
2026-03-02 21:25:52 +00:00

26 lines
623 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# No database — skip DB wait and migrations
# Clear Redis page cache on deploy
if [[ -n "${REDIS_URL:-}" && "${REDIS_URL}" != "no" ]]; then
python3 -c "
import redis, os
r = redis.from_url(os.environ['REDIS_URL'])
r.flushdb()
" || echo "Redis flush failed (non-fatal), continuing..."
fi
# Start the app
RELOAD_FLAG=""
if [[ "${RELOAD:-}" == "true" ]]; then
RELOAD_FLAG="--reload"
python3 -m shared.dev_watcher &
fi
PYTHONUNBUFFERED=1 exec hypercorn "${APP_MODULE:-app:app}" \
--bind 0.0.0.0:${PORT:-8000} \
--workers ${WORKERS:-1} \
--keep-alive 75 \
${RELOAD_FLAG}