Move docker env vars to .env #210
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.
In the current version of the docker-compose file, configuration options are specified in
.envand then passed to the container usingENV_VAR=${ENV_VAR}under theenvironmentsection of the docker-compose file. This PR instead passes.envto the container directly, so any changes/additions made to.envare applied to the container without needing to add a corresponding entry inenvironment.The motivation for this change is that in configuring LDAP on my installation of Davis, I was adding the LDAP env vars to
.envbut forgetting to pass them in the compose file. All the examples in the README use env-file syntax, so I just copied those over to my.envfile without thinking. It took a few hours debugging my LDAP provider before realizing that Davis was never seeing any of my changes in the first place!Setting aside my personal oversights, I prefer this method because it reduces redundant code (i.e. adding an entry in
.envand a corresponding entry inenvironmentper variable) which means less maintenance when additional configuration variables are added. It also reduces duplicated code across the four different compose files.This PR also propagates c29dc78 to the
.envfile in the docker configuration directory.