How can I share environment variables between buildpacks?

Issue

You want to expose, or add to, environment variables for subsequent buildpacks

Resolution

After running a buildpack, we source the buildpack_dir/export command, export it's environment and provide the vars set there to all further buildpacks.

The following would provide the FOO environment variable to the next buildpacks:

export FOO=BAR

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support