
How to deploy your Node.js service - Lazare
http://blog.gosquadron.com/deploy-node
======
ktzar
Is it me or it seems that people have forgotten (or never learnt) bash and
make?

Automatic deployment is usually 3-10 steps that need to be run in a remote
server. How's this better that a simple script that sshs into the
server/servers, CDs into the project dir and does `make update`, which pulls
some branch, runs any migrations and does an `apache gracefully` or similar
whatever needed for the update?

~~~
iLoch
I'm using Flightplan
([https://github.com/pstadler/flightplan](https://github.com/pstadler/flightplan))
which was posted on HN a while ago. All it does is provides a thin layer
(albeit one with liberally applied DSL) on top of SSH which helps manage
production/dev automated deployments.

~~~
wesleytodd
+1 for using Node to provision Node apps. I have messed with flightplan and
think it is awesome. It inspired me to make something that is a bit more like
puppet (plugin based packaging, with helpers for common provisioning tasks)
but in node
([https://github.com/wesleytodd/wombat](https://github.com/wesleytodd/wombat)).

This is after two tries to get my company over to a Vagrant based setup, once
using puppet and a second using bash scripts. Unfortunately neither got us off
the ground fast enough to make it viable.

------
mkoryak
"its easy" followed by 10 pages on how to configure it.

really though, how is this any better than ansible?

~~~
crawfordcomeaux
Came here to make the same exact comment, ask the same question.

------
fauria
I have a git server (gitolite) with a repo and four branches: main,
development, testing and production.

When im ready to run something on testing, for example, I checkout testing,
merge from development and push.

In the remote server, the code it the repo is running with pm2. I use a post-
receive hook to npm update everything and pm2 restart.

If everything is ok, and I want to deploy into production, I do the same thing
but merging production branch instead.

When I see tools like this, I tend to think that im missing something, or that
there might be something wrong with what I do.

What do you think?

~~~
stingraycharles
The problem I have with setting up these things yourself is that I usually
forget about how I set it up in the first place. Sure you might remember how
you set it up 3 months down the road, but what about 3 years?

I try to use services or tools that do as much as possible out of the box. It
means that I didn't have to manually configure much, which means it will be
easier to understand after long periods of time. I know it isn't very hacker-
like, but I personally feel there is a gray area that might create more
problems than it solves, and I tend to stay on the "safe" side of things.

------
arnoooooo
Alternatively, this is the kind of scenario I wrote Git-deliver for :
[https://github.com/arnoo/git-deliver](https://github.com/arnoo/git-deliver)

------
eknkc
I'll take rsync over a 234234 line config / external dpeendencies and a
tutorial longer than most node.js tutorials themselves.

Thanks for taking the time though.

------
rashthedude
Why use a python script?

