version: "3"

services:
  nodered:
    image: nodered/node-red
    ports:
    - 1880:1880
    volumes:
    - ./data:/data
    # if you have used persistent volume with name nodered, then use this line instead
    # - nodered:/data
    networks:
    - iot

  telegraf:
    image: telegraf
    networks:
    - iot
    volumes:
    - ./telegraf/:/etc/telegraf/:ro

networks:
    iot:

# don't forget to list all of your persistent volumes, if you use any
# volumes:
#     nodered:
#        external: true
