Reputation: 13721
I deployed an app onto heroku and wanted to check how can I connect to the deployed app in my terminal so I can do things like run migrations?
thanks in advance!
Upvotes: 0
Views: 236
Reputation: 22914
You can use the heroku
command to create a one-off dyno to run arbitrary commands like bash
or rake db:migrate
.
For example heroku run bash -a my-app
will run a bash shell on a one-off dyno.
Note that there is no way to directly connect to a running dyno on Heroku (e.g. via ssh); running the heroku run
command will create a new temporary dyno that you can use to run commands using the deployed version of the code.
Upvotes: 1