Skip to content

Clean-up Environment Variables change #14446

@andreslucena

Description

@andreslucena

I'd aim to fully remove this file from installations. (Note: referring to the config/initializers/decidim.rb file)

Right now (as in develop) I think the configuration is a mess, and this is specially painful in some of the Releases Notes, where we were introducing a new Env Var and it was a pain for explaining to implementers. They were something like:

  1. add the setting in config/secrets.yml:
   new_setting: Decidim::Env.new("DECIDIM_NEW_SETTING")
  1. add it to the initializer
  config.new_setting = Rails.application.secrets.new_setting
  1. define the env var DECIDIM_NEW_SETTING

I want to migrate to something like:

Define the env var DECIDIM_NEW_SETTING

At least this is where I think we should aim. This would have prevented problems like when updating the Here API version implementers need to update their static URL (that's hardcoded in this file). It's just a messy experience.

Of course if someone (power users) want to have full control and override the config accessors with initializers in their apps, they're free to do so. But I'd prefer to drop support to initiailizer in new apps and also to only have one official way of configuring Decidim: through env vars (as 12factor apps mention and keep it nice to contianers and so on).

Originally posted by @andreslucena in #13268 (comment)

Metadata

Metadata

Assignees

Labels

type: changePRs that implement a change for an existing featuretype: internalPRs that aren't necessary to add to the CHANGELOG for implementers

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions