Linux system: Hass.io vs Python Virtual Env

It can be .yaml.

You place the file wherever you run the command from. It simply doesn’t matter. When you run the docker compose command it is just looking for that file in the directory you are currently running the command.

Docker doesn’t care about where you are when you run the command, so you can drop it right into your home folder and when you log in, run docker-compose up -d

Got it, thank you.

I created that docker-compose.yaml file, but it gives me an error:

homeassistant@HomeAssistant:~$ docker-compose up -d
-bash: docker-compose: command not found
homeassistant@HomeAssistant:~$ 

What should I do?

You should install docker compose…

Thank you.

I installed it and was able to run “docker-compose up -d”.

The problem is that now my Home Assistant is reset back to start. My files are still in place, but HA is back to the basic. I guess that command installed it somewhere else.

I guess I should go back to the virtual env. I have done it multiple times and pretty familiar with that installation, but docker gives me one surprise after another.

It’s super simple.

YOU tell docker where the files are. It’s that simple.

Got it thank you. Looks like I had to install this docker compose before I installed HA. Not sure.

That’s not why. Lol.

You aren’t “installing” HA. Docker containers are disposable. They should contain zero data that you care about. All data you care about should go on the host system, backed up or actually hosted on another system.

When you run an image it’s just running a single application.

If you’ve ever run a “portable app”, it’s a similar concept.

You didn’t need docker compose installed before running HA. You need to remember that you can only run one instance of home assistant in docker. If you run the command multiple times you are attempting to run multiple instances of home assistant docker images. You can’t do that.

Earlier I pointed you to my thread on docker compose.

You need to go look at it. If you take a few minutes just to look at the compose yaml, you will piece together how it all works.

I will check it, thank you.

I don’t know how far you have gotten with your deployment.

Bu if you are still having problems getting the HA stack up and running using docker-compose you can look at this for inspiration: https://github.com/orbnedron/docker-home-assistant-getting-started

It is an example HA stack I created for a friend a while back.

// S