Commit graph

5 commits

Author SHA1 Message Date
Tobias Ostner
1bdf25bf06 Add Bitcoin Pulse operations runbook 2026-07-30 13:45:51 +07:00
Tobias Ostner
532a8ed613 Add backup for bictoin-pulse db 2026-07-30 07:49:21 +02:00
Tobserver Agent
133384660e BIT-31 Expose Bitcoin Pulse API through nginx 2026-07-28 17:12:28 +07:00
Tobserver Agent
2015aac8e4 BIT-28 Gate backend startup on migrations 2026-07-28 11:35:54 +02:00
Tobserver Agent
55fb51c760 BIT-29 Provision Bitcoin Pulse PostgreSQL (#5)
## Summary
- Provision a digest-pinned PostgreSQL 18 container through rootless Podman with health-gated systemd readiness, loopback-only publishing, graceful shutdown, and the persistent `bitcoin-pulse-db` volume.
- Declare separate SOPS credential paths for the administrator, migration, and application roles, stage them privately for first-start initialization, and reuse the role bootstrap SQL from the pinned BitcoinPulseAPI input.
- Document human-managed secret provisioning, least-privilege verification, container recreation, graceful shutdown, and coordinated credential rotation.

## Validation
- `tobserver-agent check` passed:
  - `nixpkgs-fmt --check`
  - `git diff --check`
  - `nix flake check --no-build`
  - Tobserver system derivation path evaluation
  - Gitleaks patch scan
- Evaluated the OCI container, systemd service, rootless user, and NixOS assertions; all assertions pass and the generated configuration contains the expected loopback port, health readiness, persistent volume, and shutdown settings.

## Risks and limitations
- Runtime startup, shutdown, persistence, and role behavior require Linux deployment verification and were not executed on macOS.
- The encrypted SOPS keys are intentionally absent from this agent-authored change; the service must not be deployed before a human provisions them.
- Static uid/gid 400 is reserved for the dedicated rootless container account and should be checked for conflicts during review.

## Manual follow-up
- Add `bitcoin-pulse/postgres/admin-password`, `bitcoin-pulse/postgres/migration-password`, and `bitcoin-pulse/postgres/app-password` to `secrets/tobserver.yaml` using `sops`; commit only encrypted values.
- Review and merge this pull request.
- Deploy manually on Tobserver after merge and encrypted secret provisioning.
- Run the startup, loopback binding, role privilege, restart/persistence, and graceful-shutdown checks in `docs/bitcoin-pulse-postgresql.md`.

Reviewed-on: https://codeberg.org/oibot/Tobserver/pulls/5
2026-07-27 10:07:40 +02:00