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

@@ -15,13 +15,14 @@ DEV_MODE=
# Services
PROJECT_NAME=odoocker
SERVICES=odoo,nginx,proxy,postgres
SERVICES=odoo,nginx,proxy,postgres,pgbouncer
# Service configuration
USE_REDIS=false
USE_S3=false
USE_SENTRY=false
USE_PGADMIN=false
USE_PGBOUNCER=false
# GitHub user and access token to clone private repositories
GITHUB_USER=
@@ -46,6 +47,11 @@ UNACCENT=False
LIST_DB=True
DBFILTER=.*
# PgBouncer
POOL_MODE=transaction
MAX_CLIENT_CONN=500
ADMIN_USERS=postgres,dbuser,odoo
# Logging
LOG_LEVEL=info
# Additional logs
@@ -135,6 +141,7 @@ USE_REDIS=${USE_REDIS}
USE_S3=${USE_S3}
USE_SENTRY=${USE_SENTRY}
USE_PGADMIN=${USE_PGADMIN}
USE_PGBOUNCER=${USE_PGBOUNCER}
# Which services are going to be brought up
COMPOSE_PROFILES=${SERVICES}
@@ -148,10 +155,12 @@ ACME_COMPANION_PROFILES="acme"
KEYDB_PROFILES="keydb"
MINIO_PROFILES="minio"
PGADMIN_PROFILES="pgadmin"
PGBOUNCER_PROFILES="pgbouncer"
# Containers' Tags
ODOO_TAG=17.0
POSTGRES_TAG=16.1
PGBOUNCER_TAG=latest
KEYDB_TAG=latest
MINIO_TAG=latest
NGINX_TAG=1.25.3