Heroku

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.

Prerequisites

  • You have an account setup at Heroku and have deployed some code

Secrets Import

You can quickly import your secrets to Doppler by exporting your app's Config Vars to JSON via the Heroku CLI and uploading them with the Doppler CLI:

# Select project and config for secrets upload
doppler setup

# Upload secrets from Heroku
doppler secrets upload <(heroku config --json)

You can also import secrets manually in the Doppler dashboard by navigating to the config, then click Import Secrets.

Authorization

In your project, navigate to Integrations and select "Heroku":

We will redirect you to Heroku to authorize Doppler to your account:

Configuration

In the next screen, you can select your Heroku App you would like to integrate with a specific Doppler config:

Select your Heroku App and the Doppler config you would like to integrate with. Hit "Setup Integration" and you are all set!

Reserved Secrets & Addons

Note that Doppler will not overwrite secrets from installed Heroku Addons, as well as the following secrets when syncing to Heroku:

Secret

Description

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

πŸ‘

Amazing Work!

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.


Did this page help you?