Add PgBouncer to dev and PgBouncer stats to admin Infra page

- Add pgbouncer service to docker-compose-dev.yml with dev config
- Route DATABASE_URL through pgbouncer:6432 in dev (matches prod)
- Add PgBouncer pools and stats tables to /admin/infra with color-coded
  avg query/xact times and client waiting indicators
- php, messenger, cron now depend on pgbouncer instead of database directly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-26 10:33:51 +01:00
parent 1a336edac5
commit 74c10a60f5
7 changed files with 204 additions and 5 deletions

2
.env
View File

@@ -25,7 +25,7 @@ DEFAULT_URI=https://esyweb.local
###< symfony/routing ###
###> doctrine/doctrine-bundle ###
DATABASE_URL="postgresql://app:secret@database:5432/ecosplay?serverVersion=16&charset=utf8"
DATABASE_URL="postgresql://app:secret@pgbouncer:6432/e_ticket?serverVersion=16&charset=utf8"
###< doctrine/doctrine-bundle ###
###> symfony/messenger ###