services:
  evolution-api:
    image: evoapicloud/evolution-api:latest
    container_name: area-membros-evolution-api
    restart: unless-stopped
    env_file:
      - .env
    ports:
      - "${EVOLUTION_HOST_PORT:-8080}:8080"
    depends_on:
      - postgres
      - redis

  postgres:
    image: postgres:16-alpine
    container_name: area-membros-evolution-postgres
    restart: unless-stopped
    environment:
      POSTGRES_DB: ${POSTGRES_DB:-evolution_api}
      POSTGRES_USER: ${POSTGRES_USER:-evolution}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change_me}
    volumes:
      - evolution_postgres_data:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine
    container_name: area-membros-evolution-redis
    restart: unless-stopped
    command: ["redis-server", "--appendonly", "yes"]
    volumes:
      - evolution_redis_data:/data

volumes:
  evolution_postgres_data:
  evolution_redis_data:
