mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-05 07:08:24 +01:00
Box-side resilience prep from the DevOps audit (advisory + SSOT artifacts — zero runtime change; the founder applies the runbook steps box-side): - Vendor the OrangeCat systemd unit + launcher into the repo (they lived ONLY on the box), so a fresh-box rebuild is a scripted install, not archaeology: scripts/systemd/orangecat-app.service, scripts/systemd/launch.sh (verbatim from the box; no secrets — env is externalized to .env). - docs/operations/RESILIENCE.md — actionable, copy-paste runbook for the four proactive gaps: (1) single-box SPOF → scripted OC bring-up + publish RTO + optional warm standby; (2) off-site backups are deletable → B2 Object-Lock + non-delete key + off-box retention + ≥2 RESTIC_PASSWORD copies; (3) root deploy credential → non-root oc-deploy user with scoped sudoers; (4) the fleetcrown-owned backup pipeline dependency + the container-dump must-hold. Full box-wide IaC stays in fleetcrown's shared hetzner toolkit (noted), not forked here. Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
17 lines
676 B
Bash
Executable File
17 lines
676 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# OrangeCat app launcher (SSOT) — vendored from the box (/opt/orangecat/app/launch.sh).
|
|
# Sources the runtime .env and starts the Next.js standalone server. The
|
|
# --max-http-header-size=65536 raises Node's 16KB header cap so a browser with many
|
|
# accumulated sb-* auth cookies doesn't get a hard 431 ("won't open in Brave");
|
|
# deploy-selfhost.sh also self-heals this flag on the box copy each deploy.
|
|
set -euo pipefail
|
|
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
if [ -f "$HERE/.env" ]; then
|
|
set -a
|
|
source "$HERE/.env"
|
|
set +a
|
|
fi
|
|
unset HOSTNAME
|
|
export NODE_ENV="production"
|
|
exec /usr/bin/node --max-http-header-size=65536 "$HERE/server.js"
|