read time 3 mins
Doppler's Heroku integration is a great way for Heroku users to sync a config's secrets with a Heroku app's config vars. Syncing with Heroku also adds another layer of high availability for your service, as now Heroku will also have the latest copy of your secrets. Our Heroku integration is a standalone service, that does not require the use of the Doppler CLI. Setup is quick and takes less than 3 minutes.
- You have an account setup at Heroku and have deployed some code
Empty Secret Values
Heroku currently rejects doesn't allow environment variables with no value set for CI and Preview applications. If you have a secret with an empty value in Doppler at the time you enable syncing with Heroku, this will prevent secrets from being synced at all. If you add one after the initial sync, it won't be synced to Heroku – although other secrets will be synced when changed. For now, we recommend removing any secrets with empty values from Doppler to avoid confusion and potential syncing problems.
In your project, navigate to Integrations and select "Heroku":
We will redirect you to Heroku to authorize Doppler for your account:
In the next screen, you select the Heroku Project Type and App you would like to integrate with, the Doppler config you'd like to sync from, and whether you'd like to perform a one-time import of config vars from Heroku (preferring either Doppler or Heroku secrets):
Once you've selected the options you want, click Set Up Integration and you're all set!
Reserved Secrets & Addons
Some Config vars are Heroku-managed and are not meant to be updated by users. Doppler will not overwrite secrets from installed Heroku Addons, as well as the following secrets when syncing to Heroku:
|HEROKU_APP_ID||Heroku app's id|
|HEROKU_APP_NAME||Heroku app's name|
|HEROKU_RELEASE_CREATED_AT||Heroku app's current release created date|
|HEROKU_RELEASE_VERSION||Heroku app's current release version|
|HEROKU_SLUG_COMMIT||Heroku app's current release commit|
|HEROKU_SLUG_DESCRIPTION||Heroku app's current release description|
If you imported Config vars from Heroku when creating the integration and some Heroku-managed Config vars were copied over, keep in mind that these are NOT kept up-to-date. Secret syncing is a one-way operation from Doppler to Heroku. Changes to Config vars made by Heroku will not be synced back to Doppler.
Now you are all set up on Heroku. Every time you update your secrets in Doppler, we will automatically update them in your Heroku App.
Updated about 1 year ago