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 # Provider: postgresql | mysql
DATABASE_PROVIDER=postgresql 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 # Client name for the database connection
# It is used to separate an API installation from another that uses the same database. # It is used to separate an API installation from another that uses the same database.
DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange
@ -235,7 +235,7 @@ EVOAI_ENABLED=false
# Cache - Environment variables # Cache - Environment variables
# Redis Cache enabled # Redis Cache enabled
CACHE_REDIS_ENABLED=true CACHE_REDIS_ENABLED=true
CACHE_REDIS_URI=redis://localhost:6379/6 CACHE_REDIS_URI=redis://api_redis:6379/6
CACHE_REDIS_TTL=604800 CACHE_REDIS_TTL=604800
# Prefix serves to differentiate data from one installation to another that are using the same redis # Prefix serves to differentiate data from one installation to another that are using the same redis
CACHE_REDIS_PREFIX_KEY=evolution CACHE_REDIS_PREFIX_KEY=evolution

View File

@ -1,13 +1,12 @@
services: services:
api: api:
container_name: evolution_api container_name: api
image: evolution/api:local image: evolution/api:local
build: . build: .
restart: always
ports: ports:
- 8080:8080 - 8080:8080
volumes: volumes:
- evolution_instances:/evolution/instances - instances:/evolution/instances
networks: networks:
- evolution-net - evolution-net
env_file: env_file:
@ -15,8 +14,31 @@ services:
expose: expose:
- 8080 - 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: volumes:
evolution_instances: instances:
api_redis:
api_db:
networks: networks: