Skip to content

Environments

V edited this page Feb 16, 2022 · 2 revisions

Since 0.18.0 ami supports loading configuration based on environment. Environment is always merged with default configuration file if available.

Assuming following files exists:

// app.json
id: test
type: test.app
configuration: {
   API_KEY: "<PROD_API_KEY>"
}
// app.dev.json
configuration: {
   API_KEY: "<DEV_API_KEY>"
}

and executing:

ami --environment=dev ...

The resulting config ami loads will be:

id: test
type: test.app
configuration: {
   API_KEY: "<DEV_API_KEY>"
}
Clone this wiki locally