Skip to content

Conversation

@eosti
Copy link
Contributor

@eosti eosti commented Jul 19, 2025

In the current version of the docker-compose file, configuration options are specified in .env and then passed to the container using ENV_VAR=${ENV_VAR} under the environment section of the docker-compose file. This PR instead passes .env to the container directly, so any changes/additions made to .env are applied to the container without needing to add a corresponding entry in environment.

The motivation for this change is that in configuring LDAP on my installation of Davis, I was adding the LDAP env vars to .env but 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 .env file 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 .env and a corresponding entry in environment per 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 .env file in the docker configuration directory.

@tchapi tchapi self-assigned this Jul 19, 2025
@tchapi tchapi added the enhancement New feature or request label Jul 19, 2025
@tchapi tchapi merged commit 255070e into tchapi:main Jul 19, 2025
@tchapi
Copy link
Owner

tchapi commented Jul 19, 2025

Thanks a lot, a great improvement indeed

@eosti eosti deleted the env_vars branch July 20, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants