Hi, I’d like to have the ability to restart the nodejs application, if it ever crashed. Something like monit, but then using Docker/Resin.io. Do you support this feature?
Do you mean an automatic restart of a container if your main process crashes? We currently only support a manual restart, if you go to your application dashboard’s actions tab you’ll see a restart button. (see screen shot) However this will restart the containers across all the devices associated with that application.
You could also update a per device environment variable which would only restart that devices container.
Thanks Craig, that helps a lot. But I was indeed talking about my main process crashing on just one device. Ideally there should be a trigger that could restart it. Technically resin.io already knows when the process stopped (log will say “Application Stopped”), so it should be quite easy to integrate an auto-restart feature, right?
Either way, such a feature would be really nice to have.
Its definitely in the roadmap but it’s still a while off. Our new images, which we will be released this week, will keep your container open and running even if you scripts throws an error. Meaning that you could run a monitoring service like mmonit.
Left me know if you need any help with implementation.
Ok perfect, thanks Craig.