From 2d7e21c84e74a56970abfb81a7deea57292dab4a Mon Sep 17 00:00:00 2001 From: RipleyBooya Date: Sat, 1 Mar 2025 11:58:48 +0100 Subject: [PATCH] Update pgbouncer.ini --- pgbouncer.ini | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pgbouncer.ini b/pgbouncer.ini index 849fc33..00a7db9 100644 --- a/pgbouncer.ini +++ b/pgbouncer.ini @@ -1,12 +1,13 @@ -# Configuration PgBouncer +# Configuration PgBouncer avec variables d'environnement [databases] -* = host=127.0.0.1 port=15432 auth_user=postgres pool_mode=session max_client_conn=100 +${PG_DB1} = host=127.0.0.1 port=15432 user=${PG_USER1} password=${PG_PW1} pool_mode=session +${PG_DB2} = host=127.0.0.1 port=15432 user=${PG_USER2} password=${PG_PW2} pool_mode=session +* = host=127.0.0.1 port=15432 user=${PG_DEFAULT_USER} password=${PG_DEFAULT_PW} pool_mode=session [pgbouncer] listen_addr = 0.0.0.0 listen_port = 5432 -auth_type = md5 -auth_file = /etc/pgbouncer/userlist.txt +auth_type = any admin_users = postgres max_client_conn = 200 default_pool_size = 20 @@ -15,3 +16,5 @@ pool_mode = transaction server_reset_query = DISCARD ALL logfile = /var/log/pgbouncer.log pidfile = /var/run/pgbouncer.pid + +# ⚠️ Variables d'environnement requises ! (chargées depuis `.env`)