infra: migrate postgres to shared openbrain_brain-db #664

Merged
jason.woltje merged 1 commits from infra/migrate-to-openbrain-db into main 2026-03-03 03:45:46 +00:00
Owner

Summary

  • Remove dedicated service and volume
  • Add service to provision mosaic user/db in openbrain's postgres instance
  • Update to use host with credentials
  • Update to point to
  • Add as external overlay network

Required Portainer env vars (add to stack 121)

  • (default: )
  • (= openbrain stack POSTGRES_PASSWORD)

Test plan

  • Deploy updated stack to Portainer with new env vars set
  • Verify completes successfully (creates mosaic DB/user)
  • Verify connects to openbrain_brain-db
  • Verify completes successfully

🤖 Generated with Claude Code

## Summary - Remove dedicated service and volume - Add service to provision mosaic user/db in openbrain's postgres instance - Update to use host with credentials - Update to point to - Add as external overlay network ## Required Portainer env vars (add to stack 121) - (default: ) - (= openbrain stack POSTGRES_PASSWORD) ## Test plan - [ ] Deploy updated stack to Portainer with new env vars set - [ ] Verify completes successfully (creates mosaic DB/user) - [ ] Verify connects to openbrain_brain-db - [ ] Verify completes successfully 🤖 Generated with Claude Code
jason.woltje added 1 commit 2026-03-03 03:45:25 +00:00
Remove the dedicated stack-postgres service and postgres_data volume.
Instead join the openbrain_brain-internal overlay network and connect
to openbrain_brain-db for all database operations.

- Add mosaic-db-init service to provision mosaic user/db in openbrain's postgres
- Update synapse-db-init to use BRAIN_DB_ADMIN_* credentials and openbrain_brain-db host
- Update api DATABASE_URL to openbrain_brain-db:5432
- Add openbrain-brain-internal as external network

Required new Portainer env vars:
  BRAIN_DB_ADMIN_USER (default: openbrain)
  BRAIN_DB_ADMIN_PASSWORD (openbrain stack's POSTGRES_PASSWORD)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje merged commit a8d426e3c0 into main 2026-03-03 03:45:46 +00:00
Sign in to join this conversation.