-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improve configuration process #25
Comments
To summarize today's call:
|
Some feedback from today's call. We discussed the possibility of implementing support for a configuration file and CLI argument but we didn't find a concrete agreement. But we've found these truths:
@hyperloris clear view: we should have three ways to configure the system (envs, config, CLI) BUT there should be a precise mapping between the three. The priority should be CLI > ENVs > File. He doesn't know the structure of the config file. Here is an example: |
So we decided the final task list that can be find in the issue description |
@ivanzy still thinks that right now File support is overkill and should be deferred. |
After #28, @ivanzy may I ask you to implement the logic above? |
Okay, I will start to work on that. Just to clarify:
|
custom flags, to follow what @hyperloris said:
I think if an ENV is ZION_PERSISTENCE_DB_PORT then the corresponding CLI parameter is
If there is already some support for YAML, I won't complain. But I also like JSON + JSONSchema as a file configuration ( I little bit overkill but it depends on how much zion will grow). |
By the way, I've just noticed all the ENVs should be prefixed with ZION. It is a good practice to avoid conflicts with other services in non-docker environments. |
As discussed in [github comment](#25 (comment)), common practice is to prepend to all env variables with the name of the project/application/library. This commit does that.
Currently, Zion utilizes a simple Env base configuration workflow. We should organize configuration parameters in a hierarchical data structure. Moreover, we have to keep in mind different developer workflows and experiences. This means that we need the flexibility to configure Zion from different sources with different priorities (like JSON/YAML files, CLI parameters, ENVs). This issue serves also as a place to evaluate different ideas before going to the PR phase.
Todos:
Sources:
The text was updated successfully, but these errors were encountered: