Skip to content

feat: add PgBouncer in front of PostGIS - #402

Open
lewismc wants to merge 2 commits into
mainfrom
feat/106-pgbouncer
Open

feat: add PgBouncer in front of PostGIS#402
lewismc wants to merge 2 commits into
mainfrom
feat/106-pgbouncer

Conversation

@lewismc

@lewismc lewismc commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

Adds an internal-only PgBouncer hop for chatty Compose clients so PostGIS is not opened directly by every app/cron connection. Closes #106. Supersedes #196 (greenfield; do not rebase that PR).

Replaces the empty merge of #396 (that PR was merged while feat/106-pgbouncer briefly pointed at main with no PgBouncer commits).

tagbase_server ──┐
docker-cron    ──┼──► pgbouncer:5432 (edoburu, transaction, scram-sha-256)
                 └──► postgis:5432

dbbackups / pgadmin4 / host localhost:5432 ──► postgis (direct)

Changes

  • docker-compose.yml / docker-compose.test.yml: pgbouncer service; app/cron use POSTGRES_HOST=pgbouncer
  • db_utils.py + cron: honor POSTGRES_HOST / POSTGRES_PORT
  • renovate.json: loose versioning for edoburu/pgbouncer
  • Merged with main after Remove slack dependency #398 (Slack removal)

Pre-commit / Super Linter lives in #400 (split out of this work).

Test plan

  • docker compose up -d --build — pgbouncer healthy; app/cron reach DB
  • Host localhost:5432 still hits PostGIS
  • Observability smoke / stack tests green
  • CI pytest POSTGRES_HOST=localhost path unchanged

Made with Cursor

lewismc added 2 commits August 8, 2026 10:10
Pool tagbase_server and docker-cron through edoburu/pgbouncer
(transaction mode, scram-sha-256). Keep host :5432 and backups/pgAdmin
on direct PostGIS. Cover the image in Renovate with loose versioning.

Closes #106
Supersedes #196
Drop slack_docker/SLACK_BOT_TOKEN from #398; keep PgBouncer service
and app/cron routing.
@sonarqubecloud

sonarqubecloud Bot commented Aug 8, 2026

Copy link
Copy Markdown

@renato2099 renato2099 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having pgbouncer is good , thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Utilize pgbouncer to pool connections into PostGIS

2 participants