-
Notifications
You must be signed in to change notification settings - Fork 12
Use environment variables to avoid duplicate compose files #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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
Contributor
|
This PR breaks the tests: |
79c8e43 to
8f9dd95
Compare
…th .env These values are likely to vary often, so storing them in .env where they can be easily changed, and trivially overridden by specifying them on the commandline or exporting them in the shell when building/deploying/testing will make the process much smoother.
Now that the hostname is specified in .env there are no differences between prod and staging so they can be built with the same compose file (container-compose.yml), but a different hostname and deployment status can simply be set when building.
Since container-compose-dev only contains additional keys not found in container-compose.yml and does not delete or modify any keys therein we do not need to keep two copies of the duplicate data, instead we can use the merging functionality in compose to achieve the same affect by just passing both files using -f or by setting the following environ COMPOSE_FILES=container-compose.yml:container-compose-dev.yml
8f9dd95 to
2effdae
Compare
theyoyojo
approved these changes
Apr 2, 2024
Contributor
theyoyojo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good changes, let's get this merged
Closed
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.
finally there is one true container-compose.yml
Podman compose uses the wrong order of precedence for the evironment variables so I had to add one more commit to fix that. Make sure to pull again to get the latest commit if you want to test with non localhost / in dev versions.