Add new make targets to build and install dokku debian packages

This commit is contained in:
Jose Diaz-Gonzalez
2015-01-11 18:38:51 -05:00
parent 8c8745ca4c
commit b6767f8efc
6 changed files with 229 additions and 0 deletions

0
debian/conffiles vendored Normal file
View File

10
debian/control vendored Normal file
View File

@@ -0,0 +1,10 @@
Package: dokku
Version: 0.3.12
Section: base
Priority: optional
Architecture: amd64
Depends: locales, git, make, curl, software-properties-common, lxc-docker (>= 1.4.0), gcc, python-software-properties, man-db, buildstep, sshcommand, pluginhook
Pre-Depends: nginx, dnsutils, ruby, ruby-dev, rubygem-rack, rubygem-rack-protection, rubygem-sinatra, rubygem-tilt
Provides: dokku
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
Description: Docker powered mini-Heroku in around 100 lines of Bash

24
debian/postinst vendored Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
set -e
case "$1" in
abort-upgrade|abort-remove|abort-deconfigure)
;;
configure)
mandb
[ ! -x /usr/bin/docker.io ] || ln -sf /usr/bin/docker.io /usr/local/bin/docker
modprobe aufs || echo "WARNING: Restart server to finish installing dokku!"
sshcommand create dokku /usr/local/bin/dokku
egrep -i "^docker" /etc/group || groupadd docker
usermod -aG docker dokku
dokku plugins-install
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0

35
debian/preinst vendored Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/sh
set -e
case "$1" in
install)
INIT_CONF="/etc/init/dokku-installer.conf"
NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf"
touch $INIT_CONF
echo 'start on runlevel [2345]' >> $INIT_CONF
echo 'exec /root/dokku/contrib/dokku-installer.rb selfdestruct' >> $INIT_CONF
touch $NGINX_CONF
echo 'upstream dokku-installer { server 127.0.0.1:2000; }' >> $NGINX_CONF
echo 'server {' >> $NGINX_CONF
echo ' listen 80;' >> $NGINX_CONF
echo ' location / {' >> $NGINX_CONF
echo ' proxy_pass http://dokku-installer;' >> $NGINX_CONF
echo ' }' >> $NGINX_CONF
echo '}' >> $NGINX_CONF
rm /etc/nginx/sites-enabled/*
service nginx reload
service dokku-installer start
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0