firebase-functions-yaml-config
v1.3.9
Published
Use YAML to configure your environment variables in Firebase Functions
Readme
Firebase Functions YAML Config
Use YAML to configure your environment variables in Firebase Functions
Features:
- Set either default values, or by environment
- Read from both environment variables and static values
- Use templated names for your environment variables
Examples:
Your configuration file (config.yaml)
default:
hello:
world: Hello, World!
username: $HELLO_USERNAME
password: $HELLO_PASSWORD_ENV
say:
yes: true
ci:
service1:
username: service1-ci
prod:
service1:
username: service1-prodConfigure your CI environment using command:
firebase-functions-yaml-config config.yaml ciwhich in turn will execute:
firebase functions:config:set hello.world='Hello, World!'
firebase functions:config:set hello.username=$HELLO_USERNAME
firebase functions:config:set hello.password=$HELLO_PASSWORD_CI
firebase functions:config:set say.yes=true
firebase functions:config:set service1.username='service1-ci'Then for PROD
firebase-functions-yaml-config config.yaml prod==>
firebase functions:config:set hello.world='Hello, World!'
firebase functions:config:set hello.username=$HELLO_USERNAME
firebase functions:config:set hello.password=$HELLO_PASSWORD_PROD
firebase functions:config:set say.yes=true
firebase functions:config:set service1.username='service1-prod'