feat(docker): Integrate PgBouncer for connection poolingAdd PgBouncer service to the docker-compose setup for improved database connection management. Update .env.example to include new PgBouncer environment variables and service inclusion. Add PgBouncer profiles and tags to docker-compose.yml and override files for local and production configurations. Include PgBouncer initialization script for database user setup

This commit is contained in:
Fabio Tielen // Code Agency
2024-01-20 17:55:25 +01:00
parent 7568dbc44f
commit 9d13ed0db1
5 changed files with 57 additions and 1 deletions

View File

@@ -79,6 +79,23 @@ services:
- internal
profiles: [$POSTGRES_PROFILES]
pgbouncer:
image: edoburu/pgbouncer:latest
container_name: pgbouncer
restart: always
depends_on:
- db
#ports:
# - "5432:5432"
environment:
- DB_HOST=db
- DB_USER=odoo
- DB_PASSWORD=odoo
- MAX_CLIENT_CONN=500
- POOL_MODE=transaction
- ADMIN_USERS=postgres,dbuser,odoo
profiles: [$PGBOUNCER_PROFILES]
nginx:
image: nginx:${NGINX_TAG}
depends_on: