Skip to content

Instantly share code, notes, and snippets.

@gilbertotoledo
Last active June 7, 2025 15:05
Show Gist options
  • Select an option

  • Save gilbertotoledo/a3c232a91ba8cf243c96e0602092cb1a to your computer and use it in GitHub Desktop.

Select an option

Save gilbertotoledo/a3c232a91ba8cf243c96e0602092cb1a to your computer and use it in GitHub Desktop.
N8N + EvolutionAPI + Postgres
services:
n8n:
image: docker.n8n.io/n8nio/n8n
container_name: n8n
restart: unless-stopped
environment:
- N8N_HOST=n8n.SEUDOMINIO
- N8N_PORT=5678
- N8N_PROTOCOL=https
- NODE_ENV=production
- WEBHOOK_URL=https://n8n.SEUDOMINIO/
- GENERIC_TIMEZONE=America/Sao_Paulo
- EXECUTIONS_DATA_PRUNE=true
- EXECUTIONS_DATA_MAX_AGE=72
- EXECUTIONS_DATA_PRUNE_MAX_COUNT=500
volumes:
- /n8n/data:/home/node/.n8n
- /n8n/local-files:/files
logging:
options:
max-size: 10m
max-file: 3
evolution-postgres:
image: postgres
container_name: evolution-postgres
restart: unless-stopped
environment:
POSTGRES_PASSWORD: "SUA-SENHA-SUPER-SEGURA"
volumes:
- /evolution/db:/var/lib/postgresql/data
logging:
options:
max-size: 10m
max-file: 3
evolution:
image: atendai/evolution-api:latest
container_name: evolution
restart: unless-stopped
environment:
- AUTHENTICATION_API_KEY=SUA_API_KEY
- SERVER_URL=https://evolution.SEUDOMINIO
- CONFIG_SESSION_PHONE_VERSION=2.3000.1023204200
- DEL_INSTANCE=false
- DATABASE_ENABLED=true
- DATABASE_PROVIDER=postgresql
- DATABASE_CONNECTION_URI=postgresql://postgres:SUA-SENHA-SUPER-SEGURA@evolution-postgres:5432/postgres
- DATABASE_SAVE_DATA_INSTANCE=true
- DATABASE_SAVE_DATA_NEW_MESSAGE=true
- DATABASE_SAVE_MESSAGE_UPDATE=true
- DATABASE_SAVE_DATA_CONTACTS=true
- DATABASE_SAVE_DATA_CHATS=true
- DATABASE_SAVE_DATA_LABELS=true
- DATABASE_SAVE_DATA_HISTORIC=true
- DATABASE_CONNECTION_CLIENT_NAME=evolution_v2
- RABBITMQ_ENABLED=false
- RABBITMQ_URI=amqp://admin:admin@rabbitmq:5672/default
- CACHE_REDIS_ENABLED=false
- CACHE_REDIS_URI=redis://evo_redis:6379/1
- CACHE_REDIS_PREFIX_KEY=evolution_v2
- CACHE_REDIS_SAVE_INSTANCES=false
- CACHE_LOCAL_ENABLED=false
- S3_ENABLED=false
- S3_ACCESS_KEY=
- S3_SECRET_KEY=
- S3_BUCKET=evolution
- S3_PORT=443
- S3_ENDPOINT=files.site.com
- S3_USE_SSL=true
volumes:
- /evolution/data:/evolution/instances
logging:
options:
max-size: 10m
max-file: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment