Files
dokku/Makefile

56 lines
1.7 KiB
Makefile
Raw Normal View History

GITRECEIVE_URL ?= https://raw.github.com/progrium/gitreceive/master/gitreceive
SSHCOMMAND_URL ?= https://raw.github.com/progrium/sshcommand/master/sshcommand
PLUGINHOOK_URL ?= https://s3.amazonaws.com/progrium-pluginhook/pluginhook_0.1.0_amd64.deb
STACK_URL ?= github.com/progrium/buildstep
2013-07-02 03:20:29 -05:00
all: dependencies stack install plugins
install:
2013-06-15 15:02:44 -07:00
cp dokku /usr/local/bin/dokku
cp receiver /home/git/receiver
2013-06-30 11:02:40 -05:00
mkdir -p /var/lib/dokku/plugins
cp -r plugins/* /var/lib/dokku/plugins
plugins: pluginhook docker
2013-07-02 23:02:42 +02:00
dokku plugins-install
dependencies: gitreceive sshcommand pluginhook docker stack
2013-06-10 01:02:57 -07:00
gitreceive:
2013-06-11 20:40:48 -07:00
wget -qO /usr/local/bin/gitreceive ${GITRECEIVE_URL}
chmod +x /usr/local/bin/gitreceive
test -f /home/git/receiver || gitreceive init
sshcommand:
2013-06-11 20:40:48 -07:00
wget -qO /usr/local/bin/sshcommand ${SSHCOMMAND_URL}
chmod +x /usr/local/bin/sshcommand
sshcommand create dokku /usr/local/bin/dokku
2013-06-30 10:37:32 -05:00
pluginhook:
2013-06-30 10:41:47 -05:00
wget -qO /tmp/pluginhook_0.1.0_amd64.deb ${PLUGINHOOK_URL}
dpkg -i /tmp/pluginhook_0.1.0_amd64.deb
docker: aufs
egrep -i "^docker" /etc/group || groupadd docker
usermod -aG docker git
usermod -aG docker dokku
curl https://get.docker.io/gpg | apt-key add -
echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y lxc-docker
sleep 2 # give docker a moment i guess
aufs:
lsmod | grep aufs || modprobe aufs || apt-get install -y linux-image-extra-`uname -r`
stack:
@docker images | grep progrium/buildstep || docker build -t progrium/buildstep ${STACK_URL}
2013-06-30 10:37:32 -05:00
2013-06-10 23:37:23 -07:00
count:
2013-06-30 17:56:02 -05:00
@echo "Core lines:"
@cat receiver dokku bootstrap.sh | wc -l
@echo "Plugin lines:"
@find plugins -type f | xargs cat | wc -l
@echo "Test lines:"
2013-07-02 23:02:42 +02:00
@find tests -type f | xargs cat | wc -l