Closed Vadorequest closed 3 years ago
Yes, that sounds like a good idea.
It would also be nice to have command-line options for each specific property in .fauna.json
, so that you wouldn't need multiple configs with just one or two different options. In your case, you could simply add a script like this:
fgu --envPath .env.local.production
And to specify a different config altogether, you would do:
fgu --config .fauna.prod.json
I'll add this ASAP.
Okay,
Custom path for config file is now supported with version 2.1.0
, simply use:
fgu --config custom.config.json
You can also pass in command-line options for every property supported in the config file. So you could specify a custom environment file with the following:
fgu --envPath .custom.env
Awesome, thank you! I'll try it out ASAP
Works like a charm!
"fauna:sync": "fauna-gql --envPath .env.staging.local",
"fauna:sync:production": "fauna-gql --envPath .env.production.local",
"fauna:override": "fauna-gql --override --envPath .env.staging.local",
"fauna:override:production": "fauna-gql --envPath .env.production.local",
I'd like to have 2 different
envPath
(e.g:.env.local.production
and.env.local.staging
) which would both defineFAUNADB_SERVER_SECRET_KEY
pointing to 2 different Fauna DBs (staging, production)Right now, I don't think I can achieve that because the
.fauna.json
path is hardcoded and can't be changed.Could an option to
fauna-gql
script could be added to allow specifying a custom config file?https://github.com/Plazide/fauna-gql-upload/blob/746d86acc377773a6576f781caa8d1a474ea1450/src/util/getConfig.ts#L44