How to stop an app on Heroku?

后端 未结 9 957
猫巷女王i
猫巷女王i 2020-12-22 15:10

I have an app on Heroku which is being used by few users. However, I notice there are some data issues which i\'d like to fix and stop the app in the mean time so users don\

相关标签:
9条回答
  • 2020-12-22 15:19

    http://devcenter.heroku.com/articles/maintenance-mode

    If you’re deploying a large migration or need to disable access to your application for some length of time, you can use Heroku’s built in maintenance mode. It will serve a static page to all visitors, while still allowing you to run rake tasks or console commands.

    $ heroku maintenance:on
    Maintenance mode enabled.
    

    and later

    $ heroku maintenance:off
    Maintenance mode disabled.
    
    0 讨论(0)
  • 2020-12-22 15:21

    Go to your dashboard on heroku. Select the app. There is a dynos section. Just pull the sliders for the dynos down, (a decrease in dynos is to the left), to the number of dynos you want to be running. The slider goes to 0. Then save your changes. Boom.

    According to the comment below: there is a pencil icon that needs to be clicked to accomplish this. I have not checked - but am putting it here in case it helps.

    0 讨论(0)
  • 2020-12-22 15:23

    To completely 'stop' your app you can scale the web dynos down to zero which effectively takes all your app http-processes offline.

    $ heroku ps:scale web=0
    Scaling web processes... done, now running 0
    
    0 讨论(0)
  • 2020-12-22 15:25

    You can disable the app using enable maintenance mode from the admin panel.

    • Go to settings tabs.
    • In bottom just before deleting the app. enable maintenance mode. see in the screenshot below.

    0 讨论(0)
  • 2020-12-22 15:30

    You might have to be more specific and specify the app name as well (this is the name of the app as you have it in heroku). For example:

    heroku ps:scale web=0 --app myAppName 
    

    Otherwise you might get the following message:

     % heroku ps:scale web=0
    Scaling dynos... failed
     !    No app specified.
     !    Run this command from an app folder or specify which app to use with --app APP.
    
    0 讨论(0)
  • 2020-12-22 15:30

    To DELETE your Heroku app

    This is for those looking to DELETE an app on their Heroku account. Sometimes you end up here when trying to find out how to remove/delete an app.

    WARNING: This is irreversible!

    • Go to your Heroku dashboard here
    • Select the app you want to delete.
    • Scroll down to the bottom of the settings page for that app.
    • Press the red Delete app... button.
    0 讨论(0)
提交回复
热议问题