10 Commits

Author SHA1 Message Date
Serreau Jovann
1796f2d022 Add e_ticket_test database to pgbouncer-dev config for test environment
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 18:31:17 +01:00
Serreau Jovann
cb35efe3ff Fix PgBouncer dev auth: use plain auth_type for PostgreSQL 16 scram-sha-256
PostgreSQL 16 defaults to scram-sha-256, md5 hashes in userlist are
rejected. Using auth_type=plain in dev with plaintext password.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:44:29 +01:00
Serreau Jovann
d2be7311d9 Add admin/stats users to PgBouncer config for SHOW commands
Without admin_users/stats_users, connecting to the pgbouncer virtual
database fails with "database pgbouncer does not exist".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:35:43 +01:00
Serreau Jovann
74c10a60f5 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>
2026-03-26 10:33:51 +01:00
Serreau Jovann
14214b4df5 Remove pgbouncer.ini and userlist.txt from git, now generated by Ansible templates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:13:11 +01:00
Serreau Jovann
a34fed7efd Fix slave PGDATA permissions: set 700 and postgres ownership before basebackup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:03:58 +01:00
Serreau Jovann
492e080059 Fix slave init: run pg_basebackup and postgres as postgres user via su-exec
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:03:32 +01:00
Serreau Jovann
932535e6aa Fix slave replication auth: add .pgpass for passwordless pg_basebackup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:02:50 +01:00
Serreau Jovann
08704c9824 Fix PostgreSQL replication: add pg_hba.conf entries for replicator user
- Create init-master.sh that runs SQL and appends replication rules to pg_hba.conf
- Switch docker-compose-prod template from init-master.sql to init-master.sh
- Fixes "no pg_hba.conf entry for replication connection" error

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 13:45:58 +01:00
Serreau Jovann
653d7b4729 Add Docker infrastructure for dev and prod environments
- Separate PHP Dockerfiles (dev/prod) with extensions and prod opcache/php.ini optimization
- docker-compose-dev: PHP, PostgreSQL, Redis, Messenger, Mailpit, RedisInsight
- docker-compose-prod: 2x PHP replicas, PgSQL master/slave with PgBouncer, 2x Messenger, Redis
- Makefile with build/start/stop/purge commands
- AGENT.md to restrict AI access to the repository

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:12:09 +01:00