I’m running the stock Home Assistant docker container, launched from a docker compose file. So no Home Assistant OS (fka hass.io) in the picture.
My goal is to launch Home Assistant, passing it the
--log-file foo option so I can put the log file in a directory (for example, mounted on
/config/logs inside the container). This is so I don’t have continuously changing files on the same file system that I’d like to take frequent snapshots of. I can’t just symlink it, because Home Assistant rotates the log files after awhile.
I already move the sqlite3 database elsewhere, via a specification in
configuration.yaml, but the log file needs to be specified as an option since logging happens, I presume, ahead of processing the configuration.
I don’t think I can pass an option when launching the container, based on poking around. I’m not sure if there’s maybe an environment variable that could be used…?
For the curious, I’m running ZFS on my Ubuntu system and docker gets along with it quite nicely. I’d like to do hourly snapshots (as they’re really cheap to do on ZFS), but as the log file is “noisy” it’s going to chew up extra space keeping all the previous versions around, defeating the copy-on-write semantics that underlie how ZFS dataset snapshots and clones work.