Dokku start Mongo after reboot

anguiac7

I've been playing around with Dokku on a server and using it to deploy MEAN apps. I really like it, but my one concern is that after a server reboot (or crash), Dokku doesn't restart the Mongo service. I manually have to go in and dokku mongodb:start and then dokku MYAPP deploy to get it to reconnect. Otherwise I get a bad gateway error.

Thanks for any tips! I'm pretty new to all of this.

andrewsomething

This is a bug in the dokku-mongodb plugin. Dokku itself uses an Upstart script to start on boot. It is installed to /etc/init/dokku-redeploy.conf and looks like this:

description "Dokku app redeploy service"
start on filesystem and started docker
script
  sleep 2 # give docker some time
  sudo -i -u dokku /usr/local/bin/dokku ps:restartall
end script

I'd suggest using something similar, perhaps:

description "Dokku MongoDB plugin redeploy service"

start on started dokku-redeploy
stop on runlevel [!12345]

setuid dokku
setgid dokku

exec /usr/local/bin/dokku mongodb:start
pre-stop exec /usr/local/bin/dokku mongodb:stop

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Start nginx after reboot automatically

From Dev

LIRC does not start after reboot

From Dev

Start nginx after reboot automatically

From Dev

mysql does not start after a reboot

From Dev

mysql does not start after a reboot

From Dev

Why does HHVM in daemon mode not start automatically after server reboot?

From Dev

nginx service won't start after reboot AWS Linux server

From Dev

nodejs app does not start up correctly with forever after reboot

From Dev

How do I start a Cron job 1 min after @reboot?

From Dev

How do I start a Cron job 1 min after @reboot?

From Dev

X fails to start after update with reboot on Ubuntu 14.04

From Dev

nginx service won't start after reboot AWS Linux server

From Dev

Not all XEN VMs auto start after reboot of DOM 0

From Dev

Service uuidd won't start automatically after reboot

From Dev

Start gpsd service at reboot

From Dev

Torgaurd will not start with Crontab at reboot

From Dev

MokManager does not start on reboot

From Dev

Does iOS start app in background after reboot if remote-notification defined in UIBackgroundModes and new push notification comes?

From Dev

Inno Setup: restart during setup process won't start after reboot

From Dev

How can i auto start Wamp Xampp and tomcat after reboot server

From Dev

Reboot after installation necessary?

From Dev

lan not working after reboot

From Dev

Will 'at' command be executed after the reboot?

From Dev

Drive not appearing after reboot

From Dev

Reboot after update

From Dev

dnsmasq not working after reboot

From Dev

SSH not working after reboot

From Dev

DNS not working after reboot

From Dev

Problems with HD after reboot

Related Related

HotTag

Archive