Env Variables Management
In addition to creating and assigning environment variables to applications during application creation time, you can also manage them separately and assign them to applications at any moment.
The commands below explain how to manage the environment variables lifecycle using Ketch.
Setting Environment Variables
You can set environment variables for an application at any moment after the application framework has been created, even before your application image or code is deployed as well as post-deployment. You can do so through the following command:
ketch env set VARIABLE=VALUE [flags]
Flags:
Flag | Type | Description |
---|---|---|
-a, --app | string | The name of the application |
Retrieving Variables
Once environment variables are set, you can retrieve variables and values for a specific application using the command below:
ketch env get [-a/--app appname] [ENVIRONMENT_VARIABLE1] [ENVIRONMENT_VARIABLE2] ...
Flags:
Flag | Type | Description |
---|---|---|
-a, --app | string | The name of the application |
Removing Variables From Application
You can also remove environment variables that were previously set to an application with the command below:
ketch env-unset <ENVIRONMENT_VARIABLE1> [ENVIRONMENT_VARIABLE2] ... [ENVIRONMENT_VARIABLEN]
Flags:
Flag | Type | Description |
---|---|---|
-a, --app | string | The name of the application |
Updated almost 3 years ago