services:
  mosquitto:
    image: eclipse-mosquitto:2
    container_name: mosquitto
    restart: unless-stopped
    ports:
      - "1883:1883"
    volumes:
      - /docker/homeassistant/mosquitto/config:/mosquitto/config
      - /docker/homeassistant/mosquitto/data:/mosquitto/data
      - /docker/homeassistant/mosquitto:/mosquitto/log
    networks:
      - mqtt_net

  govee2mqtt:
    image: ghcr.io/wez/govee2mqtt:latest
    container_name: govee2mqtt
    restart: unless-stopped
    depends_on:
      - mosquitto
    environment:
      - GOVEE_API_KEY=193f5757-c9c7-44f5-81d9-81ce45093d4f
      - GOVEE_MQTT_HOST=172.16.201.21
      - GOVEE_MQTT_PORT=1883
      - GOVEE_MQTT_USER=connect
      - GOVEE_MQTT_PASSWORD=connect
    volumes:
      - /docker/homeassistant/govee2mqtt:/data
    networks:
      - mqtt_net

networks:
  mqtt_net:
    external: true
