klangcola

joined 2 years ago
[โ€“] klangcola@reddthat.com 1 points 6 days ago (2 children)

Hard to say without knowing which method you used to install HomeAssistant.

But I never found mdns .local addresses to be very reliable. They work 80-90% of the time, but the remaining 10-20% are a hassle.

Instead I'd recommend you install PiHole (in a docker container is easiest). PiHole is a DNS server intended for network-level ad-blocking. But it also have a handy feature of defining local DNS entries, so you can have HomeAssistant.myhome or HomeAssistant.whatever (.local should not be used with PiHole local DNS because .local is meant for mdns)

[โ€“] klangcola@reddthat.com 12 points 6 days ago

Not Op, but I was in a very similar situation (decent pay, old house, old car, not many fancy purchases). While many people here will borrow a lot and pay the minimum on their mortgage, I paid down my mortgage completely. (and otherwise spent money on travel).

Ironically, this is bad financial advice. The last 15-20 years interest have been very low, and house prices have soared. It would make much more financial sense to borrow more and buy a nicer house. But I value the freedom I get from not having a mortgage. And I never borrowed to buy a car, as cars depreciate like rocks

 

What are the pros and cons of using Named vs Anonymous volumes in Docker for self-hosting?

I've always used "regular" Anonymous volumes, and that's what is usually in official docker-compose.yml examples for various apps:

volumes:
  - ./myAppDataFolder:/data

where myAppDataFolder/ is in the same folder as the docker-compose.yml file.

As a self-hoster I find this neat and tidy; my docker folder has a subfolder for each app. Each app folder has a docker-compose.yml, .env and one or more data-folders. I version-control the compose files, and back up the data folders.

However some apps have docker-compose.yml examples using named volumes:

services:
  mealie:
    volumes:
      - mealie-data:/app/data/
volumes:
  mealie-data:

I had to google documentation https://docs.docker.com/engine/storage/volumes/ to find that the volume is actually called mealie_mealie-data

$ docker volume ls
DRIVER    VOLUME NAME
...
local     mealie_mealie-data

and it is stored in /var/lib/docker/volumes/mealie_mealie-data/_data

$ docker volume inspect mealie_mealie-data
...
  "Mountpoint": "/var/lib/docker/volumes/mealie_mealie-data/_data",
...

I tried googling the why of named volumes, but most answers were talking about things that sounded very enterprise'y, docker swarms, and how all state information should be stored in "the database" so you shouldnt need to ever touch the actual files backing the volume for any container.

So to summarize: Named volumes, why? Or why not? What are your preferences? Given the context that we are self-hosting, and not running huge enterprise clusters.