hoarder-app / hoarder

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
https://hoarder.app
GNU Affero General Public License v3.0
6.48k stars 235 forks source link

Add user: "${UID}:${GID}" in compose.yaml #606

Open Ronaldvr opened 3 weeks ago

Ronaldvr commented 3 weeks ago

Describe the feature you'd like

When experimenting with hoarder I found that deleting documents in the mounted directories was impossible without root access. This means the images are mounted with the root (1000) user. A simple solution is using the user: "${UID}:${GID}" in the yaml and adding those variables to the .env file As explained for instance her: https://stackoverflow.com/questions/40462189/docker-compose-set-user-and-group-on-mounted-volume

Describe the benefits this would bring to existing Hoarder users

Not only is this strongly recommended behaviour these days https://www.howtogeek.com/devops/why-processes-in-docker-containers-shouldnt-run-as-root/ it is easier and safer.

Can the goal of this request already be achieved via other means?

No

Have you searched for an existing open/closed issue?

Additional context

No response