Convox encourages the use of environment variables for managing application secrets. Using environment variables allows you to keep secrets out of your codebase and to have different configuration values for different deployments (i.e. staging and production).
Environment variables that can be used by the application are defined in
Environment variables defined at the top level affect every service in the application.
This application would require four environment variables to be set:
ENCRYPTION_KEY variable will be available to both services.
Environment variables can be defined for each Service.
This application would require three environment variables to be set:
Environment variables defined at the service level will only be available to that service. In the example above, the
webservice would not have a value set for the
QUEUEenvironment variable as that variable is only defined on the
You can set a default value for any environment variable in the manifest:
You can also use environment variables to add dynamic configuration to your
You can set values for your environment variables using
convox env set:
$ convox env set ALLOWED_IPS=18.104.22.168 COOKIE_SECRET=foo QUEUE=main
Setting ALLOWED_IPS, COOKIE_SECRET, QUEUE... OK
Setting environment variables will cause a new Release to be created. In order to deploy your changes you will need to promote this release.
$ convox releases promote RABCDEFGHI
Promoting RABCDEFGHI... OK
Environment variables can be set using the CLI or through the Console and their values will be available to the Service.
The following environment variables are automatically set by Convox.
|Name of the App
|ID of the currently-promoted Build
|Description of the currently-promoted Build
|The value of the port: attribute for this Service
|The name of the Rack
|ID of the currently-promoted Release
|Name of the Service