Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md references a /data folder - what is it? #101

Closed
micklynch opened this issue Apr 29, 2024 · 6 comments · Fixed by #102
Closed

README.md references a /data folder - what is it? #101

micklynch opened this issue Apr 29, 2024 · 6 comments · Fixed by #102
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@micklynch
Copy link

Description

The README references a /data folder.

`sudo chown -R $USER:$USER /data`

However, in the folder structure, this location does not exist. Is this something that needs to be created or is this supposed to reference /mnt/storage folder instead?

@micklynch
Copy link
Author

And follow-up question, do I need to run everything as root?

@jgwehr jgwehr self-assigned this Apr 30, 2024
@jgwehr
Copy link
Owner

jgwehr commented Apr 30, 2024

Hi @micklynch - thanks for reaching out!

Is this something that needs to be created or is this supposed to reference /mnt/storage folder instead?

You found a mistake in the readme - I'll fix this as soon as I can. Until I can get this updated, the wiki may be a better reference: https://github.com/jgwehr/homelab-docker/wiki#install-steps
Please ignore /data and instead use /mnt/storage. Please exercise caution with this, too. I think this instruction was from when I first started - so I haven't had a chance to verify if it still makes sense. And, of course, your particular contents/needs may require different permissions. My usage of mergerfs makes this a bit more confusing; but regardless it works.

The structure is based on TRaSH Guides, PerfectMediaServer, and Servarr docs.

And follow-up question, do I need to run everything as root?

This should not be necessary. I run everything rootless. It's been a while since setup and I did a (poorer) job documenting this area...
I would start by assigning a non-root user to the docker group (wiki). Directories and files can be owned by user:docker (instead of user:user or root:root). Refer to this also: Rootless Docker.

If you have questions or find more places to improve the documentation, let me know! By end of week I'll be able to check what I actualy have running on the server and post a follow up for you.

@jgwehr jgwehr added the documentation Improvements or additions to documentation label Apr 30, 2024
@micklynch
Copy link
Author

Thank you! I'll try to set it up this weekend and make a note of any inconsistencies. Are you open to accepting PRs? I can open one with changes that I feel are needed.

Another example, should all these env params also point to /mnt/storage?

DATADIR=/data
DOWNLOADDIR=/data/downloads
MEDIADIR=/data/media
STATICDIR=/data/staticfiles
DBDIR=/data/db

@jgwehr jgwehr added this to the 3.1.0 - Home Assistant milestone Apr 30, 2024
@jgwehr
Copy link
Owner

jgwehr commented Apr 30, 2024

Good gracious, haha, yes they should. Feel free to PR if you have the time.
I started this last night, and will be able to look closer over the weekend, also: https://github.com/jgwehr/homelab-docker/tree/maintenance/101-readmemd-references-a-data-folder-what-is-it

@jgwehr
Copy link
Owner

jgwehr commented Jun 18, 2024

Sorry I've been very late responding - a few personal things slowing me down.

Here are the perms for /srv/docker - which is where I bind all my docker configs. The blurred users/groups are my user. Any inconsistencies here are unintentional. I don't understand linux perms as well as I want to, but I believe the ideal state is to have all of these owned by non-root-user:docker
image

Similar explanation for the drives (note, storage is the mergerfs endpoint). Though, I'm more comfortable with these being owned by root:root.
image

And again, within one of the drives. Poor hygiene on my part, but it works.
image

Within the combined, mergerfs directory, all the directories used by docker are user:x
image

There's a bit more info on this in a dusty issue here: #21

I get mostly blanks when I run docker inspect $(docker ps -q) --format '{{.Config.User}} {{.Name}}' - but I do not use sudo when I execute docker compose up -d. All of these containers should show 1000:1000 aka the default user. This user has been added to the docker group.

@micklynch
Copy link
Author

micklynch commented Jun 18, 2024

Thank you @jgwehr ! Very helpful. I have set-up the services that I need and it's up and running already, I don't use mergerfs. I'll read through you're comment to see if it improves anything. I'll need to wait until I have some tinkering time too..."if it ain't broke..." yadayada.
Thanks for sharing this project, I definitely learned some cool stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants