Luctia / ezarr

Ezarr aims to make it as easy as possible to setup an entire Servarr/Jackett/BitTorrent/Usenet/PleX/Jellyfin mediacenter stack using Docker
MIT License
730 stars 81 forks source link

Update setup.sh to match docker-compose.yml #36

Closed Pavlogal closed 1 year ago

Pavlogal commented 1 year ago

setup.sh and docker-compose.yml use mismatched config folders.

docker-compose.yml is set up to use /data/config to configs and persistent volumes for containers while setup.sh creates /data/docker for that purpose. Docker will simply auto-create the missing /config when run or the first time but it will still work*, while the entire /docker folder structure will be left empty and useless.

The caveat is that necessary permissions won't be applied when autocreating the /config folder. setup.sh usually takes care of this but since docker isn't using that folder it's going to run with autocreated permissions, owned by root. This is not a problem on its own but there are use cases when this breaks. On NFS filesystems without no_root_squash, the root user is basically useless, so if this script is installed on an NFS share (which is very common in virtualized environments), the containers will fail due to permission issues.

This is easily solvable by modifying either docker-compose.yml to use /docker instead of /config, or modifying setup.sh to use /config instead of /docker, which is the solution I proposed here, for no reason other than /config being a much nicer and more representative name for whats stored inside, plus it's often used in guides.

edit: I realized container_configs.py also needed to be edited, which is taken care of in my 2nd commit