Allow the user to be set via an environment variable. #136
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.
Hi,
In #133 I suggested that it would be useful to allow the user to control both the user via an environmental variable. This PR contains the solution that works for my use case, and I'm hoping we can build on it to reach something that can be merged into the project :)
I needed a way of mounting a volume (either from the host, or a data container) for persistent storage within the app, but keeping the permissions reasonably simple (in terms of understanding). My main issue was that over the course of subsequent deploys, the container that originally wrote files to the persistent storage area was no longer able to manipulate them. It also made it difficult to share files with non-Dokku containers. I also wanted to avoid having to continuously re-
chown
'ing the files as the user changed.This PR can be used in conjunction with the persistent storage plugin (https://github.com/dyson/dokku-persistent-storage) in order to populate the variables at build time, e.g.:
Thanks,
Jay