fix redis and db hostname and services

This commit is contained in:
Michael lima 2025-06-28 23:14:47 -04:00 committed by GitHub
parent fe557c244b
commit 50b47490ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 6 deletions

View File

@ -29,7 +29,7 @@ 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@api_db:5432/evolution?schema=public'
# 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
@ -235,7 +235,7 @@ EVOAI_ENABLED=false
# Cache - Environment variables
# Redis Cache enabled
CACHE_REDIS_ENABLED=true
CACHE_REDIS_URI=redis://localhost:6379/6
CACHE_REDIS_URI=redis://api_redis:6379/6
CACHE_REDIS_TTL=604800
# Prefix serves to differentiate data from one installation to another that are using the same redis
CACHE_REDIS_PREFIX_KEY=evolution

View File

@ -1,13 +1,12 @@
services:
api:
container_name: evolution_api
container_name: api
image: evolution/api:local
build: .
restart: always
ports:
- 8080:8080
volumes:
- evolution_instances:/evolution/instances
- instances:/evolution/instances
networks:
- evolution-net
env_file:
@ -15,8 +14,31 @@ services:
expose:
- 8080
api_db:
image: postgres:16
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=evolution
networks:
- evolution-net
volumes:
- api_db:/var/lib/postgresql/data
api_redis:
image: redis:7.2.5-alpine
networks:
- evolution-net
command: redis-server --port 6379 --appendonly yes
volumes:
- api_redis:/data
volumes:
evolution_instances:
instances:
api_redis:
api_db:
networks: