services:
  aegis-gateway:
    image: axieyangb/aegis:latest
    container_name: aegis-gateway
    restart: unless-stopped
    ports:
      - "8765:8765"
    volumes:
      - aegis_data:/data
    environment:
      - ADMIN_USERNAME=admin
      - ADMIN_PASSWORD=changeme        # change this
      - AUTH_ENABLED=true
      - BLOCK_ENABLED=true
      - NODE_ID=home

  envoy:
    image: envoyproxy/envoy:v1.35-latest
    container_name: envoy
    restart: unless-stopped
    depends_on:
      - aegis-gateway
    ports:
      - "80:10080"     # HTTP  — listeners in Aegis UI should bind to port 10080
      - "443:10443"    # HTTPS — listeners in Aegis UI should bind to port 10443
      - "9901:9901"    # Envoy admin UI
    volumes:
      - ./envoy/envoy.yaml:/etc/envoy/envoy.yaml:ro
    command:
      - /usr/local/bin/envoy
      - -c
      - /etc/envoy/envoy.yaml
      - --log-level
      - warn

volumes:
  aegis_data:
