Can someone explain “heroku ps:scale web=1”

后端 未结 4 1934
北恋
北恋 2020-12-30 01:21

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

heroku ps:scale web=1 

What is Hero

4条回答
  •  悲哀的现实
    2020-12-30 02:03

    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.

提交回复
热议问题