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

Allow values per application in configuration file #1080

Open
benjlevesque opened this issue Sep 30, 2024 · 0 comments
Open

Allow values per application in configuration file #1080

benjlevesque opened this issue Sep 30, 2024 · 0 comments

Comments

@benjlevesque
Copy link

benjlevesque commented Sep 30, 2024

Context

When using several applications on scalingo, there might be multiple parameters that differ in some commands, leading to complex usage of the CLI.

The use of this feature is tightly linked to #1079.

Example

scalingo db-tunnel --region osc-secnum-fr1 --app xxx-production -p 1234 SCALINGO_POSTGRESQL_URL
scalingo db-tunnel --region osc-fr1 --app xxx-staging -p 5678 SCALINGO_POSTGRESQL_URL

=> here, when changing the command from staging to production, I need to change 3 parameters: the app name, the region, and the port. Ideally, I would just need to change the app name and have all 3 parameters applied according to my local configuration.

NB: the -p flag cannot be specified in the confguration file at the moment, it's a proposal in #1079

Proposed solution

The configuration file should allow defaults per app:

{
   "region": "osc-fr1", // fallback value if app doesn't override it
   "applications": {
       "xxx-production": {
          "region": "osc-secnum-fr1"
       }
    }
}

Alternatively, the configuration per application could be located in another file, but it might be less comprehensive, and would complexify managing fallback value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant