mirror of
https://github.com/dokku/dokku.git
synced 2025-12-28 16:06:40 +01:00
To be consistent with usual makefile usage and to not surprise people too much, only do permanent changes to the system when explicitely prompted to do so via "make install" instead of on any "make" or "make all" invocation, which is usually used for *building*, not *installing* things.
59 lines
1.7 KiB
Makefile
59 lines
1.7 KiB
Makefile
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
|
|
|
|
all:
|
|
# Type "make install" to install.
|
|
|
|
install: dependencies stack copyfiles plugins
|
|
|
|
copyfiles:
|
|
cp dokku /usr/local/bin/dokku
|
|
cp receiver /home/git/receiver
|
|
mkdir -p /var/lib/dokku/plugins
|
|
cp -r plugins/* /var/lib/dokku/plugins
|
|
|
|
plugins: pluginhook docker
|
|
dokku plugins-install
|
|
|
|
dependencies: gitreceive sshcommand pluginhook docker stack
|
|
|
|
gitreceive:
|
|
wget -qO /usr/local/bin/gitreceive ${GITRECEIVE_URL}
|
|
chmod +x /usr/local/bin/gitreceive
|
|
test -f /home/git/receiver || gitreceive init
|
|
|
|
sshcommand:
|
|
wget -qO /usr/local/bin/sshcommand ${SSHCOMMAND_URL}
|
|
chmod +x /usr/local/bin/sshcommand
|
|
sshcommand create dokku /usr/local/bin/dokku
|
|
|
|
pluginhook:
|
|
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}
|
|
|
|
count:
|
|
@echo "Core lines:"
|
|
@cat receiver dokku bootstrap.sh | wc -l
|
|
@echo "Plugin lines:"
|
|
@find plugins -type f | xargs cat | wc -l
|
|
@echo "Test lines:"
|
|
@find tests -type f | xargs cat | wc -l
|