Skip to content
Snippets Groups Projects
Forked from infrastruktur / ansible-warpzone
615 commits behind the upstream repository.
docker-compose.yml 1020 B
version: "3"

services:

  app:

    image: eclipse-mosquitto:2.0.15
    restart: always
    ports:
      - "{{mqtt_port}}:1883" 
    volumes:
      - {{ basedir }}/mosquitto.conf:/mosquitto/config/mosquitto.conf
      - {{ basedir }}/data:/mosquitto/data
      - {{ basedir }}/log:/mosquitto/log


  influxdb:

    image: influxdb:2.6.0
    restart: always
    ports:
      - {{ int_ip4 }}:{{ influxdb_port }}:8086
    volumes:
      - {{ basedir }}/influxdb-data:/var/lib/influxdb2
      - {{ basedir }}/influxdb-conf:/etc/influxdb2
    environment:
      DOCKER_INFLUXDB_INIT_MODE: setup
      DOCKER_INFLUXDB_INIT_USERNAME: mqtt
      DOCKER_INFLUXDB_INIT_PASSWORD: {{ influxdb_password }}
      DOCKER_INFLUXDB_INIT_ORG: mqtt
      DOCKER_INFLUXDB_INIT_BUCKET: mqtt
      DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: {{ influxdb_token }}


  telegraf:

    image: telegraf:1.22.4
    restart: always
    depends_on: 
      - app
      - influxdb
    volumes:
      - {{ basedir }}/telegraf.conf:/etc/telegraf/telegraf.conf:ro