Skip to content

Migrate configuration to github.com/spf13/viper #9299

Closed
@sapk

Description

@sapk

Since https://github.com/spf13/viper/releases/tag/v1.6.0, viper support INI file config.

What do you think of migrating to this library to store config in various format (INI, Toml, Env variable, etcd, consul, ...) ?

I think this would remove a lot of code logic from gitea and help readability of the config code.
This would also ease the compatibility with container environnement via env variable or distributed config manager support (etcd, consul)
This would also ease the compatibility with FHS linux distribution by looking at multiple standard path for configuration.
Another point, this would allow support for live reloading of some configuration (and maybe could be used by UI) but this would not be the primary goal.

Somewhat related issues/change that could be replaced: #7287 #6923

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions