Merge pull request #8 from claude-hdb/chore/rehome-control-plane-dump
chore: re-home the control-plane dump to rig
This commit is contained in:
commit
3b1d652ddb
2 changed files with 7 additions and 14 deletions
|
|
@ -123,8 +123,13 @@ manifest. A product-side change must not be able to lower its own guard.
|
|||
## Scripts
|
||||
|
||||
Operational helpers, all argument-driven (`scripts/`): register a GitHub App with
|
||||
Coolify, dump the Coolify control-plane database age-encrypted to S3, restore a
|
||||
database backup into a target container.
|
||||
Coolify, restore a database backup into a target container.
|
||||
|
||||
**They run where cast runs — off the box.** They drive the Coolify API, or reach a
|
||||
box over SSH; none of them expects to be executing *on* a server. Anything that
|
||||
belongs on a box, as root, under a scheduler is [rig](https://github.com/heavy-duty/rig)'s
|
||||
job, not cast's — including the nightly age-encrypted dump of the control-plane
|
||||
database, which is now `rig coolify backup install`.
|
||||
|
||||
## Development
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Nightly on the coolify box: dump Coolify's own Postgres, age-encrypt
|
||||
# client-side (dump holds GitHub App key, server SSH keys, all env values),
|
||||
# ship to S3. Forensics only — a fresh instance is recreated, never restored.
|
||||
set -euo pipefail
|
||||
: "${AGE_RECIPIENT:?age public key for the backup identity}"
|
||||
: "${S3_BUCKET:?s3 bucket, e.g. s3://my-backups/coolify-db}"
|
||||
STAMP=$(date -u +%Y%m%dT%H%M%SZ)
|
||||
OUT="/tmp/coolify-db-${STAMP}.sql.age"
|
||||
docker exec coolify-db pg_dump -U coolify coolify | age -r "$AGE_RECIPIENT" -o "$OUT"
|
||||
aws s3 cp "$OUT" "${S3_BUCKET}/" --endpoint-url "${S3_ENDPOINT:?hetzner s3 endpoint}"
|
||||
rm -f "$OUT"
|
||||
Loading…
Reference in a new issue