Starting geddy as daemon #125

Closed
agorer opened this Issue Apr 20, 2012 · 10 comments

Comments

Projects
None yet
7 participants

agorer commented Apr 20, 2012

Is there an "official" way of starting geddy as a daemon / service on linux?

When I try to do it using a standard Debian init script, worker nodes became orphans when I try to stop the server.

Contributor

Techwraith commented Apr 20, 2012

I don't think we have a way built in to Geddy yet, but @mikejihbe might be able to help.

agorer commented Apr 25, 2012

I ended up doing it with forever (https://github.com/nodejitsu/forever). I works ok.

@agorer agorer closed this Apr 25, 2012

Any chance of someone posting the CLI command they used with forever to get a geddy app to start

Obviously not....

Contributor

larzconwell commented Apr 23, 2013

Hey @Malcolm-X, @yakovkhalinsky(sorry we didn't respond originally)

You can do the following with Forever

npm install -g forever

Then create a script(start.js) in your Geddy app with the following(This is similar to a deployment script you'd write for Nodejitsu. deployment docs)

var geddy = require('geddy');

geddy.startCluster({
  // Configuration here
  environment: 'development'
});

After that you can start it with Forever

forever start start.js

To use Forever from a script look at forever-monitor.

If you plan on running your own prouction server I don't recommend going this way, instead you would want to use something like upstart or systemd.

An easy way to create upstart scripts is by using a module called foreman. It allows you to export upstart scripts to use on boot for your server,etc.

Contributor

mde commented Apr 23, 2013

Excellent tips, thanks @larzconwell!

Contributor

larzconwell commented Apr 23, 2013

Welcome!

Contributor

MiguelMadero commented Apr 24, 2013

Great tips. Looks like a good wiki entry :)

Miguel

On Tue, Apr 23, 2013 at 4:43 PM, Larz Conwell notifications@github.comwrote:

Welcome!


Reply to this email directly or view it on GitHubhttps://github.com/mde/geddy/issues/125#issuecomment-16894898
.

Hi @larzconwell

Sorry for the late answer, i cannot realy use the internet at home right now and was a bit busy at work.
Thank you very much for your answer, it helped us very much.

We are not running our own production server, but we use nodejs and geddy for our composers so they can develop prototypes at high speed using only the technology they know :)

Forever is now used to start a geddyserver after each succesful bamboo build.

Contributor

larzconwell commented Apr 26, 2013

@Malcolm-X Awesome glad we could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment