2013-06-09 20:41:09 -07:00
|
|
|
DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"}
|
2013-06-17 19:55:45 -07:00
|
|
|
DOKKU_STACK=${DOKKU_STACK:-"http://s3.amazonaws.com/progrium-dokku/progrium_buildstep.tgz"}
|
2013-06-09 16:08:35 -07:00
|
|
|
|
2013-06-10 01:02:57 -07:00
|
|
|
apt-get install -y linux-image-extra-`uname -r` software-properties-common
|
2013-06-08 03:26:12 -07:00
|
|
|
add-apt-repository -y ppa:dotcloud/lxc-docker
|
2013-06-10 01:02:57 -07:00
|
|
|
apt-get update && apt-get install -y lxc-docker git ruby nginx make
|
2013-06-08 03:26:12 -07:00
|
|
|
|
2013-06-10 01:02:57 -07:00
|
|
|
cd ~ && git clone ${DOKKU_REPO}
|
|
|
|
|
cd dokku && make install
|
2013-06-17 19:55:45 -07:00
|
|
|
if [[ $DOKKU_STACK ]]; then
|
|
|
|
|
curl "$DOKKU_STACK" | gunzip -cd | docker import - progrium/buildstep
|
|
|
|
|
else
|
|
|
|
|
cd buildstep && make build
|
|
|
|
|
fi
|
2013-06-08 03:26:12 -07:00
|
|
|
|
2013-06-08 03:58:59 -07:00
|
|
|
/etc/init.d/nginx start
|
2013-06-11 20:40:59 -07:00
|
|
|
start nginx-reloader
|
2013-06-08 03:58:59 -07:00
|
|
|
|
2013-06-11 20:16:07 -07:00
|
|
|
[[ $(dig +short $HOSTNAME) ]] && HOSTFILE=DOMAIN || HOSTFILE=HOSTNAME
|
|
|
|
|
echo $HOSTNAME > /home/git/$HOSTFILE
|
2013-06-09 20:46:33 -07:00
|
|
|
|
2013-06-09 20:41:09 -07:00
|
|
|
echo
|
2013-06-08 03:26:12 -07:00
|
|
|
echo "Be sure to upload a public key for your user:"
|
2013-06-11 20:40:59 -07:00
|
|
|
echo " cat ~/.ssh/id_rsa.pub | ssh root@$HOSTNAME \"gitreceive upload-key progrium\""
|