Warm tip: This article is reproduced from stackoverflow.com, please click
heroku heroku-toolbelt

Can someone explain "heroku ps:scale web=1"

发布于 2020-04-11 22:40:59

I'm looking for a straightforward explanation of what all happens when I enter the following command:

heroku ps:scale web=1 

What is Heroku doing behind the scenes to deploy the app? I ask because I'm just now using Heroku to deploy and would like to better understand the process. Thanks!

Questioner
Ahmed Haque
Viewed
36
Damien MATHIEU 2015-05-19 20:45

This command does not deploy the app. It starts it, after you have deployed.

When you deploy your application, heroku creates a "slug". A runnable zipped version of your app which is then stored. You can then start "dynos", which take your current slug and start it on one of heroku's servers.

Running heroku ps:scale web=1 will scale your app to one running dyno, basically meaning you have one server running your app currently.

If you deploy your app again, a new slug will be generated and stored, and your currently running dynos will be destroyed, to be replaced by new ones with the new version of your code.