Skip to content

Instantly share code, notes, and snippets.

@iaurg
Created May 24, 2025 18:04
Show Gist options
  • Save iaurg/e1b3fbb8dc9ad58681c465a9caed7b56 to your computer and use it in GitHub Desktop.
Save iaurg/e1b3fbb8dc9ad58681c465a9caed7b56 to your computer and use it in GitHub Desktop.
A docker compose for Evolution API that works in a simple way
SERVER_TYPE=http
SERVER_PORT=8080
SERVER_URL=http://localhost:8080
AUTHENTICATION_API_KEY=123TESTDEV
DATABASE_PROVIDER=postgresql
DATABASE_CONNECTION_URI=postgresql://dev:DEVPASSWORD@postgres:5432/evolution?schema=public
# Determine the logs to be displayed
LOG_LEVEL=ERROR,WARN,DEBUG,INFO,LOG,VERBOSE,DARK,WEBHOOKS,WEBSOCKET
LOG_COLOR=true
# Log Baileys - "fatal" | "error" | "warn" | "info" | "debug" | "trace"
LOG_BAILEYS=error
# Never delete instance in case of no connection
DEL_INSTANCE=false
# Name that will be displayed on smartphone connection
CONFIG_SESSION_PHONE_CLIENT=iaurg
# Browser Name = Chrome | Firefox | Edge | Opera | Safari
CONFIG_SESSION_PHONE_NAME=Chrome
# Cache - Environment variables
# Redis Cache enabled
CACHE_REDIS_ENABLED=true
CACHE_REDIS_URI=redis://redis:6379
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
# Enabling this variable will save the connection information in Redis and not in the database.
CACHE_REDIS_SAVE_INSTANCES=false
# Local Cache enabled
CACHE_LOCAL_ENABLED=false
services:
api:
container_name: evolution_api
image: atendai/evolution-api:homolog
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=1000", "-c", "listen_addresses=*"]
restart: always
ports:
- 5432:5432
environment:
- POSTGRES_USER=dev
- POSTGRES_PASSWORD=DEVPASSWORD
- POSTGRES_DB=evolution
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- postgres_data:/var/lib/postgresql/data
expose:
- 5432
volumes:
evolution_instances:
evolution_redis:
postgres_data:
networks:
evolution-net:
name: evolution-net
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment