Tobserver/docs
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
..
bitcoin-pulse-postgresql.md BIT-29 Provision Bitcoin Pulse PostgreSQL (#5) 2026-07-27 10:07:40 +02:00