Skip to content
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

Decent handling of the configuration #121

Open
CptPie opened this issue Feb 11, 2022 · 3 comments
Open

Decent handling of the configuration #121

CptPie opened this issue Feb 11, 2022 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@CptPie
Copy link
Collaborator

CptPie commented Feb 11, 2022

While browsing GitHub I came across this library https://github.com/JeremyLoy/config

It provides really simple env variable and config file configuration.

This might be a better way to handle the config stuff (instead of saving it into the DB ...)

I know you don't want unnecessary additional dependencies but the config saved in the DB always bothered me and I think this could improve the situation by a huge margin.

What's your take @zorchenhimer ?

@CptPie CptPie added enhancement New feature or request question Further information is requested labels Feb 11, 2022
@CptPie
Copy link
Collaborator Author

CptPie commented Feb 14, 2022

An other option https://github.com/olebedev/config

@zorchenhimer
Copy link
Owner

Leaving aside the specific implementation of a configuration file for now, what would it contain?

I figure it would have values that would typically require a server restart to change. Things like the listen address/port. I would like to keep other settings that wouldn't require a restart in the database.

@CptPie
Copy link
Collaborator Author

CptPie commented Feb 15, 2022

I mean in the end its a decision you'll make - in my opinion a database should not contain configuration aspects of the application. This is based on 2 core thoughts of mine: a) a database should not necessarily contain data that can change often (after inserted) and b) coming from a sysadmin standpoint having a configuration file for all the settings currently managed in the admin view would make rapid (re-)deployment easier (the config file could be injected into the docker container for example etc.).
If i understood those libs correctly (after a really quick look at them) it should be totally feasable to still have the admin config view and instead of updating values of the db instead updating them in the config file.

@CptPie CptPie mentioned this issue Oct 28, 2022
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants