Docker config question

I’ve got HA, mqtt and mqtt-bridge running fine in docker. I’ve created a docker-compose.yml file to run them on restart, but I don’t know where to put the yml file.

I’m using Centos 7. Where should I put the docker-compose.yml file?

Wherever you want. You just have to run the docker-compose command from the same location. Personally, I put mine in my home directory, so once I SSH in I can run my docker compose commands quickly.

Will this setup docker to automatically start mqtt, mqtt-bridge and HA? Or do I have to run docker-compose from the command line after each reboot?

the restart directives are contained in the docker command for each container individually.

if you have for instance – restart=always then the container will start up automatically any time it gets shutdown for any reason (including a reboot).

The docker-compose is , basically, just a file that combines several docker containers into one file for group control.