where to put docker-compose

Hi,

Where should I be saving my docker-compose file? Is it:
/mnt/dietpi_userdata/docker-data/containers/?
or
/mnt/dietpi_userdata/docker-data/?
or somewhere else?

Background:
I have been running Homeassistant quite happily for a whole but want to move to using MQTT. I have therefore installed mosquito via dietpi-software, but Zigbee2MQTT is not available so I am trying to install it into a docker container. I have installed both docker and docker-compose. I am used to using docker-compose on a Mac, but not on a Pi.

You mean the yaml file? It doesn’t matter. Just create an own directory and place it there.

Btw Zigbee2MQTT could be installed as native app as well.

https://www.zigbee2mqtt.io/guide/installation/01_linux.html

thanks for the quick reply!

yes, I meant the yaml file - sorry for not being more explicit.

Would you recommend one way over the other (speed, reliability?

Quick docker follow-up. …so why does docker create a container folder? (that’s where I have always had in on my Mac).

Also, does this docker-compose.yaml look correct to you?

version: '3'
services:
  zigbee2mqtt:
    container_name: zigbee2mqtt
    restart: unless-stopped
    image: koenkk/zigbee2mqtt
    volumes:
      - ./zigbee2mqtt-data:/app/data
      - /run/udev:/run/udev:ro
    ports:
      - 8080:8080
    environment:
      - TZ=Europe/London
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0

edit: added

network_mode: host

I don’t use zigbee2mqtt or HA. But it might be correct if you followed their installation instructions.