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

Move credentials.json to .env file #53

Closed
benjaminbojko opened this issue Aug 25, 2022 · 2 comments · Fixed by #133 or #129
Closed

Move credentials.json to .env file #53

benjaminbojko opened this issue Aug 25, 2022 · 2 comments · Fixed by #133 or #129

Comments

@benjaminbojko
Copy link
Collaborator

benjaminbojko commented Aug 25, 2022

This should align more with best practices for storing sensitive info and dealing with test/live environments.

Need to consider possible backwards compatibility with:

  • credentials.json
  • Command line parameters
  • launchpad.json config parameters

Also should think about whether there's a global credentials/sensitive info manager class or just one for content sources.

cc @pingevt

@benjaminbojko
Copy link
Collaborator Author

See #18

@claytercek
Copy link
Member

claytercek commented Sep 15, 2023

Copying over the env cascading logic mentioned in #126:

It could be nice to also add an extra option to the launchpad CLI to allow selecting specific dotenv files, and perhaps cascade them. Example:

Given the following dotenv files (assuming files ending in .local are gitignored):

# .env
API_DATASET="production"
PC_NAME="foo"
HELLO="world"

# .env.local
PC_NAME="bar"

# .env.development
API_DATASET="development"

Running npx launchpad would load .env then load .env.local, resulting in

{
   "API_DATASET": "production",
   "PC_NAME": "bar",
   "HELLO": "world"
}

Running npx launchpad -e development would load .env then load .env.local then .env.development, resulting in

{
   "API_DATASET": "development",
   "PC_NAME": "bar",
   "HELLO": "world"
}

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