1.) Generate a server ENVKEY.

2.) Add the EnvKey buildpack at index 1:

$ heroku buildpacks:add --index 1 https://github.com/envkey/envkey-heroku-buildpack#v2

3.) Then add the buildpack that will run your application at index 2.

$ heroku buildpacks:add --index 2 heroku/python

4.) Then set your ENVKEY from step 1 as a config var.

$ heroku config:set ENVKEY=...

5.) Now in your Procfile, wrap any processes you have defined with es -w --rolling -- proc-start-command

So if previously your Procfile looked like this:

web: node server.js

Change it to:

web: es -w --rolling -- node server.js

The -w flag will automatically reload your process on environment changes. The --rolling flag enables rolling reloads when you have multiple instances connected so you can avoid downtime during reloads.

Omit the -w and --rolling flags if you'd prefer to restart manually after an environment change.

6.) And finally push a git update to trigger a re-build:

$ git push heroku master

Did this page help you?