-
Notifications
You must be signed in to change notification settings - Fork 155
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
Allow database variable injection for config.json #389
Conversation
Thanks, @spwoodcock, this is a nice improvement and fits in nicely with other database-related work we've been doing. We're going to do a little more thinking through it and see whether or not it makes sense to get into the release that we're planning for next week. Some things that will need to be done:
|
I'm leaning towards doing this as part of v2023.2 because it does simplify the merge conflict resolution for folks who have custom database configs. @spwoodcock if you're able to do some of the things in the list above, great. I can do the documentation parts and am happy to also do the rest during my day tomorrow. @alxndrsn you may also want to take a quick look at this and see if you have any other comments. |
Hi @lognaturel, thanks for the feedback! I completed the first 3 tasks as requested (rebased with If it's ok I'll leave the docs with you, as you probably know best what to write. Let me know if I can help with anything else! |
Great, thanks! I made sure host env vars are passed on to the service container so they're available to the @yanokwa could you please review? I'm wondering whether we should move other custom config into .env at the same time so that users can do this kind of migration once. In particular, folks who have custom dbs almost certainly also have custom email configurations. If we move that out to .env then users wouldn't see unmerged changes when they have custom configs. One possible disadvantage is that the environment definition will become long. I think we should use env_file instead. Note: there should not be a merge conflict with the mail config section of the .json.template file at this time. It's just that if we do it later then we will need to document the migration process again. |
c782d08
to
9ce2844
Compare
start-odk.sh
substitutes environment variables intoconfig.json.template
to create a final config file under/usr/odk/config/local.json
.Note: currently I use a hacky ENTRYPOINT in my dockerfile to update the config file with
jq
: