I'm working on a registration agent for http://www.dif.io to enable tracking of apps deployed on Heroku. I'm missing some pieces of information for the deployed app. The registration agent is a script (usually written in the app native language) which is designed to be executed after deployment (heroku run for example or automaticaly via some post deploy hook if any).
How do I get the application name, URL and some UUID identifier from inside the app, preferably from some ENV variables? I need it to be portable between languages.
I explored a sample Python application and all of the above info is missing. There are only couple more ENV variables related to Python. The dyno hostname however looks like an UUID.
I could use something like this but without the user/password requirements: https://addons.heroku.com/provider/resources/technical/reference/app-info
Please point me to the correct docs.
By default, a Heroku app is available at its Heroku domain, which has the form [name of app]. herokuapp.com . For example, an app named serene-example-4269 is hosted at serene-example-4269.herokuapp.com .
If you want to rename your app, run heroku apps:rename [newname] in the app folder and swap out newname with the name that you want to change to. You can also see a complete list of Heroku apps that you're a creator or contributor to by running heroku apps .
The command app:info
no longer seems to be a heroku
command but just info
will do the same thing so:
heroku info -s | grep web_url | cut -d= -f2
or to set the variable
heroku config:set HEROKU_URL=$(heroku info -s | grep web_url | cut -d= -f2)
Dyno Metadata was introduced December 2015. It’s currently a labs feature which must be enabled first.
Dyno metadata gives the dyno easy access to information about the app and environment. Examples of available dyno metadata include details about the release, dyno size, application name as well as the unique identifier for the particular running dyne.
https://devcenter.heroku.com/articles/dyno-metadata
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With