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.
Currently, only the Nginx Proxy Manager stack uses the
secrets
directory, but it's intended to be available for anydocker-host
stack that will need secrets. So, we add the installation of thesecrets
directory to the mainsetup.sh
installer for stacks.Additionally, though, it's important to incorporate security into the creation of this directory, so that the admin is not expected to have to do it after the fact to be secure. At the very least, the directory should have all perms removed from "others".
To ensure the directory can be readable by the user doing the install, who is probably the admin, we also give the option to set the "group" of the directory to a group that the user is a member of. This is just a nicety but really makes things more convenient.
The whole security setting step can be skipped by the user if desired.
Notes
On systems integrated with AD, retrieval of user groups may be slow, taking many seconds. So, we retrieve the user's groups in the background right away, so that by the time we want to list the user's groups, the wait will be shorter or even no wait at all.
By using the id command, we get group IDs and names, so it is most accurate (by using the ID) and user-friendly (by showing the name).