version: '3.9'

services:
  postgres:
    image: postgres:15
    container_name: evolution_postgres
    restart: always
    environment:
      POSTGRES_USER: evouser
      POSTGRES_PASSWORD: ideadevcode135*+
      POSTGRES_DB: evolutiondb
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data

  redis:
    image: redis:7
    container_name: evolution_redis
    restart: always
    ports:
      - "6379:6379"

  evolution-api:
    container_name: evolution-api
    image: atendai/evolution-api:v2.1.1
    restart: always
    ports:
      - "8080:8080"
    env_file:
      - .env
    depends_on:
      - postgres
      - redis
    volumes:
      - evolution_instances:/evolution/instances

volumes:
  postgres_data:
  evolution_instances:
