mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00

- 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
84 lines
1.6 KiB
YAML
84 lines
1.6 KiB
YAML
services:
|
|
|
|
api:
|
|
container_name: evolution_api
|
|
image: evoapicloud/evolution-api:latest
|
|
restart: always
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
ports:
|
|
- 8080:8080
|
|
volumes:
|
|
- evolution_instances:/evolution/instances
|
|
networks:
|
|
- evolution-net
|
|
env_file:
|
|
- .env
|
|
expose:
|
|
- 8080
|
|
|
|
redis:
|
|
image: redis:latest
|
|
networks:
|
|
- evolution-net
|
|
container_name: redis
|
|
command: >
|
|
redis-server --port 6379 --appendonly yes
|
|
volumes:
|
|
- evolution_redis:/data
|
|
ports:
|
|
- 6379:6379
|
|
|
|
postgres:
|
|
container_name: postgres
|
|
image: postgres:15
|
|
networks:
|
|
- evolution-net
|
|
command: [
|
|
"postgres",
|
|
"-c", "max_connections=200",
|
|
"-c", "listen_addresses=*",
|
|
"-c", "shared_buffers=256MB",
|
|
"-c", "effective_cache_size=1GB",
|
|
"-c", "work_mem=4MB"
|
|
]
|
|
restart: always
|
|
ports:
|
|
- 5432:5432
|
|
environment:
|
|
- POSTGRES_USER=user
|
|
- POSTGRES_PASSWORD=pass
|
|
- POSTGRES_DB=evolution_db
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
# pgbouncer:
|
|
# image: edoburu/pgbouncer:latest
|
|
# environment:
|
|
# DB_HOST: postgres
|
|
# DB_USER: user
|
|
# DB_PASSWORD: pass
|
|
# POOL_MODE: transaction
|
|
# AUTH_TYPE: trust
|
|
# MAX_CLIENT_CONN: 1000
|
|
# DEFAULT_POOL_SIZE: 25
|
|
# depends_on:
|
|
# - postgres
|
|
# ports:
|
|
# - "6543:5432"
|
|
# networks:
|
|
# - evolution-net
|
|
|
|
volumes:
|
|
evolution_instances:
|
|
evolution_redis:
|
|
postgres_data:
|
|
|
|
|
|
networks:
|
|
evolution-net:
|
|
name: evolution-net
|
|
driver: bridge
|