version: "3.8"
services:
  mqtt2prometheus:
    build:
      context: ../
      dockerfile: Dockerfile
    command:
      - /mqtt2prometheus
      - -log-level
      - debug
      - -config
      - /config.yaml
    ports:
      - 9641:9641
    volumes:
      - type: bind
        source: ./${CONFIG:-dht22.yaml}
        target: /config.yaml
  mosquitto:
    image: eclipse-mosquitto:1.6.15
    ports:
    - 1883:1883
    - 9001:9001
  prometheus:
    image: prom/prometheus:v2.55.1
    ports:
    - 9090:9090
    volumes:
      - type: bind
        source: ./prometheus.yml
        target: /etc/prometheus/prometheus.yml
