gschmidl / hassio-spoolman

Home Assistant Add-on: Spoolman
MIT License
2 stars 4 forks source link

The data directory is not mounted. #1

Open Maximus2711 opened 8 months ago

Maximus2711 commented 8 months ago

image

Is it any way to solve it? Its impossible to use addon when after reboot database will lost.

gschmidl commented 8 months ago

I found a way to solve it although this warning still appears. Unfortunately I don't know how to make the required directory automatically, but if you make it manually it works - I'll update the repository as soon as possible.

Maximus2711 commented 8 months ago

Oh, nice, i will wait. And it works as well? After restart addon database still fine?

gschmidl commented 8 months ago

As far as I can tell, yes. It's survived HA OS updates as well as turning the container off and on.

gschmidl commented 8 months ago

OK, I added the changes. You'll need to open a terminal in Home Assistant and do the following before starting the addon:

cd /config/addons_config
mkdir spoolman
chown 1000:1000 spoolman
cnf commented 8 months ago

I think you should use addon_configs instead

see the end of https://developers.home-assistant.io/docs/add-ons/configuration/

gschmidl commented 8 months ago

I think you should use addon_configs instead

see the end of https://developers.home-assistant.io/docs/add-ons/configuration/

Hmm, that directory doesn't exist while the other one does and is used by e.g. mealie...

image

Would still like to find out how to automatically create and chown the directory.

cnf commented 8 months ago

Sorry for the late reply, Generally it is expected you take care of that with something like a run script, for example This one

The default for the container you use is https://github.com/Donkie/Spoolman/blob/master/entrypoint.sh

I think if you want to auto create it, you'll need to make your own entry point, and and run that instead.

matthewj301 commented 6 months ago

Added a PR to make the manual commands more resilient, but will take a look at fixing this too