Close

Say hello to docker-compose

A project log for raspi iot

'No limits' to what you can control with javascript web apps, the rest is done for you by node.js and python services

wassimWassim 08/21/2020 at 21:070 Comments

https://github.com/HomeSmartMesh/raspi/blob/master/docker-compose.yml

The dream of mastering IoT software is becoming true thanks to docker-compose.

A single file allows a single command to launch all services

services:
  mosquitto:
    image: eclipse-mosquitto
    ports:
      - "1883:1883"
      - "1884:1883"
    volumes:
      - ${PWD}/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
  influx:
    image: influxdb
    ports:
      - "8086:8086"
    volumes:
      - ${PWD}/influxdb:/var/lib/influxdb
    environment:
      - INFLUXDB_DB:=mqtt
  grafana:
    image: grafana/grafana
    ports:
      - "3000:3000"
    network_mode: "host"
    volumes:
      - ${PWD}/grafana/data:/var/lib/grafana
      - ${PWD}/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
    depends_on:
      - "influx"

We see above mosquitto, influx and grafana, but in the full file link above we can also find a custom rf to mqtt service, an mqtt2influx databse script and all sorts of webapps, in addition two instances of zigbee2mqttassistant running each for a separate zigbee2mqtt instance.

Starting a new IoT Home automation project comes down to configuring a single file if not simply using the default config.

Discussions