-
Notifications
You must be signed in to change notification settings - Fork 2
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
Config should be persistent and updated via the HTTP api #11
Comments
There is already a support for a configuration via application environment. Now perhaps this part could be refactored to have a full fledged config file like http port and other options. |
@nrdufour this is already the case, you can define the conf and such but this isn't really human friendly imo. Also it can't be easily update via HTTP. I suggest either to use INI or toml [1] as config formatI. Example of config:
Ip, ports could still be configred in the app.config file. Note that if we can easily update the app.confi using HTTP I'm fine for it. Thought? |
I like a lot toml one for sure. It would be consistent to have just one config file for all. |
+1 for the consistency. |
We need to define which configuration will be persistent or not. Items that I see persistent are:
In yesterday discussion we discussed the possibility to have a database storing these configs informations. Maybe it isn't needed for a start. We could use econfig to manage the config in a configuration file. Eventually econfig can be updated to support toml. To make things easier we can also make the config system pluggable with a default to the config file. Thoughts? |
I like the idea of starting simple with econfig. So let's move on with econfig. |
initial step to handle the main configuration of coffer using an ini file. For now add econfig tdependancy and handle the HTTP configuration. Example of config file: [http main] listen = 7000 will listen all interfaces on the port 7000. Multiples HTTP interfaces can be set. listen is under the form [IP:]Port, where IP is an IP v4 or v6. To setup an SSL connection add the following section: [http somessl] listen = 7001 ssl = true cert_file = cert.pem cert_key = cert.key Other ssl options are password, cacert_file. Check the elrang documentation for more informations about these options. Multiple ssl interfaces can be set. Partially answer to #11 .
If the http config changes, the new http handlers will get the new config optins. If the protocol changes, the handler will automatically be restarted (ie http -> https). While I'm here refactor a little the code to make it reusable. related to #11.
in relation to #10
I'm thinking to add a
config
file in the release that would contain the main settings and containers descriptions.The text was updated successfully, but these errors were encountered: