59

A Rails app I deployed on DigitalOcean using Dokku crashed and started returning 500 errors.

How can I restart it without pushing an empty commit?

Spone
  • 1,324
  • 1
  • 9
  • 20

5 Answers5

97

dokku ps:restart <app> works for me logged in with dokku system user.

Use dokku apps:list to list your apps.

billkw
  • 3,350
  • 3
  • 28
  • 32
Edu Lomeli
  • 2,263
  • 20
  • 18
31

If you just want restart the web app, run dokku deploy myapp

menghan
  • 1,098
  • 9
  • 14
23

Found it there! You have to use Docker restart command directly.

Connect to your server by SSH and run:

docker restart `cat /home/dokku/myapp/CONTAINER`

myapp being the name of my application. Change the path to your app if needed.

Spone
  • 1,324
  • 1
  • 9
  • 20
12

The proper way to restart an app is:

dokku release myapp
dokku deploy myapp

This is how it's done in plugins/config/commands after setting environment variables:

config_restart_app() {
  APP="$1";

  echo "-----> Releasing $APP ..."
  dokku release $APP
  echo "-----> Release complete!"
  echo "-----> Deploying $APP ..."
  dokku deploy $APP
  echo "-----> Deploy complete!"
}

I have sent a pull request to add a dokku restart myapp command.

Cameron Martin
  • 5,952
  • 2
  • 40
  • 53
5

EDIT

The 'new' way appears to be to issue the command 'dokku ps:restart myapp'

END EDIT

An easier way might be to use a plugin:

https://github.com/scottatron/dokku-rebuild

Then issue

dokku rebuild myapp

Aaron C. de Bruyn
  • 2,347
  • 1
  • 30
  • 40