feat(database): add pgbouncer support and optimize postgres config

- Add pgbouncer service to handle connection pooling
- Update database connection URIs to support direct and pooled connections
- Optimize postgres configuration with better memory settings
- Update prisma schema to support directUrl connection
This commit is contained in:
guilherme
2025-07-08 17:14:37 -03:00
parent 39606240da
commit 3b920f93c5
3 changed files with 36 additions and 11 deletions

View File

@@ -29,7 +29,8 @@ DEL_INSTANCE=false
# Provider: postgresql | mysql
DATABASE_PROVIDER=postgresql
DATABASE_CONNECTION_URI='postgresql://user:pass@postgres:5432/evolution?schema=public'
DATABASE_CONNECTION_URI='postgresql://user:pass@postgres:6543/evolution?pgbouncer=true&schema=evolution_api'
DATABASE_DIRECT_CONNECTION_URI=postgresql://user:pass@postgres:5432/evolution?schema=evolution_api
# Client name for the database connection
# It is used to separate an API installation from another that uses the same database.
DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange