Deployment Recipes + GIT on Accelerators + more

Published 03 Apr 2009 | Under

Deployment Recipes

on Joyent

Really like this one,

This is a little useful too if your messing with Joyent Shared Accelerators,

Glad to see deprec is still alive & well, was a major help in building slices, playing with the new release on a vm now,

sudo gem install deprec

...and

How-To ?

so in a nutshell

on your server
ssh joe@mygithub.com

Then create somewhere to host all your git repositories,

mkdir git && cd git

And create your remote repository directory and bare git setup

mkdir awesomeapp.git && cd awesomeapp.git
git --bare init
chmod -x ~/git/*/hooks/*

The last line is really important, without it you'll get these kind of errors when pushing an update from the client to the server.

hooks/update: syntax error at line 40: `allowunannotated=$' unexpected
error: hooks/update exited with error code 2
error: hook declined to update refs/heads/master
on your client

Now on your client, create you git repository, add & commit it.

cd awesomeapp

git init
git add .
git commit -m 'init'

Now create the link to your remote repository,

git remote add origin ssh://joe@mygithub.com/users/home/joe/git/awesomeapp.git

And push your update

git push origin master

...now a word from our sponsor