I just realised a lot of my projects are deployed in the same way:
- They run under runit.
- They operate directly from git clones.
This includes both Apache-based projects, and node.js projects.
I'm sure I could generalize this, and do clever things with git-hooks. Right now for example I have run-scripts which look like this:
#!/bin/sh # # /etc/service/blogspam.js/run - Runs the blogspam.net API. # # update the repository. git pull --update --quiet # install dependencies, if appropriate. npm install # launche exec node server.js
It seems the only thing that differs is the name of the directory and the remote git clone URL.
With a bit of scripting magic I'm sure you could push applications to a virgin Debian installation and have it do the right thing.
I think the only obvious thing I'm missing is a list of Debian dependencies. Perhaps adding soemthing like the packages.json file I could add an extra step:
apt-get update -qq apt-get install --yes --force-yes $(cat packages.apt)
Making deployments easy is a good thing, and consistency helps..
Tags: github, node, pass, random 2 comments
http://www.nux.ro
Steve, have you looked at Docker yet? From what I read in your post it seems the kind of thing that would get you interested.