Wednesday, March 21, 2012

Upstarting Thin - Aka: Using Upstart to Start and Manage Thin

Ubuntu created this great, simple way to manage startup processes on Linux called Upstart. The beauty of it is that it's much simpler to setup than the old init.d way and also easy to use. If you want to run Thin and have the processed managed by Upstart, here's the step by step.

This assumes you have a Rack based app ready to go.

1. Create an Upstart config file

Take this:

Change the APP_HOME environment variable to point to your Rack app.

Paste it into a file at /etc/init/thin.conf .

2. Start it

sudo start thin