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

Simplify staging/preproduction environment files #4875

Merged
merged 3 commits into from
Jul 20, 2022
Merged

Commits on Jul 19, 2022

  1. Use the same config for staging and preproduction

    We were already doing so by duplicating the code; now we're doing it
    explicitly.
    
    This is going to help because we're going to do a few changes in the
    environment files, and this way we don't have to do everything twice.
    
    Note that, after we're finished with these changes, the staging and
    production environments will be mostly identical and we could simply
    require the production environment configuration in the `staging.rb`
    file. We aren't doing so because some Consul installations might have
    customized these files and it'd be hard for them to deal with all these
    changes at once. So, for now, they'll only have to deal with the
    possible differences between their staging and preproduction
    environments.
    
    Changes to the preproduction environment that won't be applied to the
    staging environment can be added like this:
    
    require Rails.root.join("config", "environments", "staging")
    
    Rails.application.configure do
      config.log_level = :warn
    end
    javierm committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    7b91adb View commit details
    Browse the repository at this point in the history
  2. Remove obsolete comment in environment files

    We removed the assets initializer in commit 91cd1ce.
    javierm committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    e7b271f View commit details
    Browse the repository at this point in the history
  3. Unify production and staging environment files

    We changed the structure of the production environment file in commit
    eb36b7e, but forgot to do so for staging and preproduction.
    
    We're also changing the comments in the production environment file so
    they use double quotes, like we do everywhere else.
    
    After these changes, the staging and production environments are mostly
    identical, and we could simply require the production environment
    configuration in the `staging.rb` file. We aren't doing so because we've
    just done changes affecting the preproduction environment and, since
    Consul installations might have customized these files, it might be hard
    for them to deal with all these changes at once.
    javierm committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    dbc988f View commit details
    Browse the repository at this point in the history