Question

What are the best practices with Heroku add-ons? I manage multiple Heroku apps. I want them to share a common add-on. how to do that?

For example, first I signed up for Mandrill on their website. When I added Mandrill add-on on Heroku, they created a new Mandril account for me. I wanted to merge them but Mandril support said that they can't merge accounts!

Another example, I added Logentries add-on to one Heroku app. A Logentries account was created. Then I added another Logentries add-on to another Heroku app, then another Logentries account was created.

It's getting messy. Am I doing it right? How to make several Heroku apps share one add-on account?

Was it helpful?

Solution 3

Yes, you're doing it right. Each Heroku app is a separate instance and will get its own add-ons. There is no way to share add-ons across multiple Heroku apps, as far as I know.

OTHER TIPS

Sharing add-ons between apps is possible. Once the add-on is added to one of the apps, an environment variable will be created containing the account information. You can copy the variable to other apps and they will start sharing the same 3rd party resource. The add-on will remain listed only under the first app, where it was initially added, but this will not prevent the other apps to use it.

In the general case it isn't possible to share add-ons between Heroku apps. However with some specific add-ons this is possible, depending on the add-on.

For example with Logentries you can have one Logentries account and then configure each Heroku app to send its logs to Logentries via a syslog drain.

https://logentries.com/doc/heroku/ (See the "Alternatively: Point your syslog drain to Logentries" section)

To set up syslog drain, you have to create a new log in Logentries UI with the source type “Syslog TCP, UDP” (select Hosts, then click on a button in right top corner). Logentries will assign you a port number PORT and set the log in discovery mode to match your log with source.

Then, let Heroku know where to send you log entries. Add a Heroku syslog drain and point it at api.logentries.com:PORT:

heroku drains:add syslog://api.logentries.com:PORT

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top