version: '3.8'

services:
  eta-engine:
    build: .
    container_name: eta-engine
    restart: unless-stopped
    ports:
      - "8081:8081"
    environment:
      - TRACCAR_WS_URL=${TRACCAR_WS_URL}
      - TRACCAR_EMAIL=${TRACCAR_EMAIL}
      - TRACCAR_PASSWORD=${TRACCAR_PASSWORD}
      - BROADCAST_PORT=8081
    volumes:
      - ./logs:/var/log/eta
    networks:
      - eta-network
    healthcheck:
      test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8081/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

networks:
  eta-network:
    driver: bridge
