Allow custom configuration file location when using Docker#1383
Open
iwitz wants to merge 3 commits intospiral-project:mainfrom
Open
Allow custom configuration file location when using Docker#1383iwitz wants to merge 3 commits intospiral-project:mainfrom
iwitz wants to merge 3 commits intospiral-project:mainfrom
Conversation
The IHATEMONEY_SETTINGS_FILE_PATH variable is not necessary but having it in the file is a way to show that it can be changed
Member
|
Thanks for opening this PR. If I follow correctly, this means that you would need to add a different volume to the docker-compose and then point there in the settings, am I correct? If that's the case, I'm not sure about the Can you explain why you need this in your case? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I've been playing with AppArmor lately and have been restricting access to /etc in many systems.
Doing this with IHateMoney installed on a server is possible since the configuration file's location can be changed from /etc to somewhere else. However in IHateMoney's Docker image the ability to change the configuration file's location was not implemented, so access to /etc within the container was mandatory.
This pull request implements that feature using the same environment variable (IHATEMONEY_SETTINGS_FILE_PATH) as is documented here : https://ihatemoney.readthedocs.io/en/latest/configuration.html
It allows the person running the containers to change the configuration's file location, for example if they wish to deny access to /etc. This also makes the app's behaviour consistent between servers and docker containers.