services:
  evolution-api:
    image: atendai/evolution-api:latest
    container_name: evolution-api
    restart: always
    network_mode: host
    environment:
      - SERVER_URL=http://localhost:8080
      - SERVER_PORT=8080
      - AUTHENTICATION_API_KEY=nexus-evolution-key-2026
      - DATABASE_ENABLED=true
      - DATABASE_PROVIDER=postgresql
      - DATABASE_CONNECTION_URI=postgresql://nexus:nexus_autoparts_2026@localhost:5432/evolution_api
      - DATABASE_CONNECTION_CLIENT_NAME=evolution
      - QRCODE_LIMIT=10
      - WEBHOOK_GLOBAL_URL=http://localhost:5001/pos/api/whatsapp/webhook
      - WEBHOOK_GLOBAL_ENABLED=true
      - WEBHOOK_EVENTS_MESSAGES_UPSERT=true
      - CACHE_REDIS_ENABLED=false
      - CACHE_LOCAL_ENABLED=true
      - LOG_LEVEL=DEBUG
    volumes:
      - evolution_data:/evolution/instances

volumes:
  evolution_data:
