mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-25 06:37:45 -06:00
feat(database): add psql_bouncer support and simplify postgresql config
- Add new psql_bouncer database provider option - Update database scripts to handle psql_bouncer provider - Comment out pgbouncer service in docker-compose - Simplify postgresql schema by removing directUrl - Add new psql_bouncer-schema.prisma file - Update .env.example with psql_bouncer configuration - Modify runWithProvider.js to handle psql_bouncer migrations
This commit is contained in:
@@ -27,14 +27,17 @@ EVENT_EMITTER_MAX_LISTENERS=50
|
||||
# If you don't even want an expiration, enter the value false
|
||||
DEL_INSTANCE=false
|
||||
|
||||
# Provider: postgresql | mysql
|
||||
# Provider: postgresql | mysql | psql_bouncer
|
||||
DATABASE_PROVIDER=postgresql
|
||||
DATABASE_CONNECTION_URI='postgresql://user:pass@postgres:6543/evolution_db?pgbouncer=true&schema=evolution_api'
|
||||
DATABASE_DIRECT_CONNECTION_URI=postgresql://user:pass@postgres:5432/evolution_db?schema=evolution_api
|
||||
DATABASE_CONNECTION_URI='postgresql://user:pass@postgres:5432/evolution_db?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
|
||||
|
||||
# Bouncer connection: used only when the database provider is set to 'psql_bouncer'.
|
||||
# Defines the PostgreSQL URL with pgbouncer enabled (pgbouncer=true).
|
||||
# DATABASE_BOUNCER_CONNECTION_URI=postgresql://user:pass@pgbouncer:5432/evolution_db?pgbouncer=true&schema=evolution_api
|
||||
|
||||
# Choose the data you want to save in the application's database
|
||||
DATABASE_SAVE_DATA_INSTANCE=true
|
||||
DATABASE_SAVE_DATA_NEW_MESSAGE=true
|
||||
|
||||
Reference in New Issue
Block a user