Adds xenv binary to the application.
This buildpack adds a utility script for fetching configuration from XEnv API and updates the app's Heroku configuration during deploy.. XEnv configs will overwrite all config keys.
- Add buildpack to Heroku app (Use some Github account with read access to repo.)
heroku buildpacks:add https://github.com/AppGyver/xenv-buildpack.git
- Set required ENVs by XEnv (See section below).
heroku config:set XENV_URL=https://your.xenv.service?token=SECRET&platform=heroku&app=your-app&xgyver=yourgyver
heroku config:set XENV_HEROKU_APP=your-app
-
Deploy app
-
Optional configuration
If the app should fetch configuration on every boot set:
heroku config:set XENV_UPDATE_ON_BOOT=true
ENV | Description |
---|---|
XENV_HEROKU_APP_NAME (Required) | The current apps name |
XENV_URL (Required) | URL to XEnv API with query params for token, app & etc. |
XENV_RUN (Optional) | Set to true to allow changes to Heroku config. |
XENV_UPDATE_ON_BOOT (Optional) | Set to true if we should fetch XEnv config on boot. Default behaviour is just on deploy. |
XENV_DEBUG (Optional) | Set to true to print debug output. |
- Do we really want XEnv to remove any undefined keys in Heroku config?
- We need to source the latest envs during boot otherwise changes wont take effect until next run.
All rights reserved.