Update setup.sh to match docker-compose.yml #36
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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