Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print environment variables on Heroku?

I'd like to print all environment variables set on my Heroku server. How can I do that with command line only?

like image 658
Karol Selak Avatar asked Nov 14 '17 17:11

Karol Selak


2 Answers

The heroku run command runs a one-off process inside a Heroku dyno. The unix command that prints environment variables is printenv (manual page). Thus

heroku run -a app-name printenv

is the command you are looking for.

like image 152
Lucas Braune Avatar answered Oct 23 '22 22:10

Lucas Braune


step 1 : list your apps

heroku apps

Copy the name of your app

step 2 : view config variables of this app

heroku config -a acme-web
like image 45
JRichardsz Avatar answered Oct 23 '22 20:10

JRichardsz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!