diff --git a/Makefile b/Makefile index 5495ddebf..0fe77e24d 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,19 @@ -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 -DOCKER_URL = https://launchpad.net/~dotcloud/+archive/lxc-docker/+files/lxc-docker_0.4.2-1_amd64.deb -STACK_URL = https://s3.amazonaws.com/progrium-dokku/progrium_buildstep.tgz +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 +DOCKER_URL ?= https://launchpad.net/~dotcloud/+archive/lxc-docker/+files/lxc-docker_0.4.2-1_amd64.deb +STACK_URL ?= https://s3.amazonaws.com/progrium-dokku/progrium_buildstep.tgz all: dependencies stack install plugins install: cp dokku /usr/local/bin/dokku cp receiver /home/git/receiver - -plugins: pluginhook docker mkdir -p /var/lib/dokku/plugins cp -r plugins/* /var/lib/dokku/plugins - dokku plugins + +plugins: pluginhook docker + dokku plugins-install dependencies: gitreceive sshcommand pluginhook docker stack @@ -47,4 +47,4 @@ count: @echo "Plugin lines:" @find plugins -type f | xargs cat | wc -l @echo "Test lines:" - @find tests -type f | xargs cat | wc -l \ No newline at end of file + @find tests -type f | xargs cat | wc -l diff --git a/README.md b/README.md index 1151059d4..ce742dd08 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,24 @@ You're done! ## Advanced installation (for development) -The bootstrap script allows source URLs to be overridden to include customizations from your own -repositories. The GITRECEIVE_URL and DOKKU_REPO environment variables -may be set to override the defaults (see the bootstrap.sh script for how these apply). Example: +If you plan on developing dokku, the easiest way to install from your own repository is cloning +the repository and calling the install script. Example: + + $ git clone https://github.com/yourusername/dokku.git + $ cd dokku + $ sudo make all + +The `Makefile` allows source URLs to be overridden to include customizations from your own +repositories. The DOCKER_URL, GITRECEIVE_URL, PLUGINHOOK_URL, SSHCOMMAND_URL and STACK_URL +environment variables may be set to override the defaults (see the `Makefile` for how these +apply). Example: + + $ sudo GITRECEIVE_URL=https://raw.github.com/yourusername/gitreceive/master/gitreceive make all + +## Advanced installation (bootstrap a server from your own repository) + +The bootstrap script allows the dokku repository URL to be overridden to bootstrap a host from +your own clone of dokku using the DOKKU_REPO environment variable. Example: $ wget https://raw.github.com/progrium/dokku/master/bootstrap.sh $ chmod +x bootstrap.sh diff --git a/dokku b/dokku index 4e384edcc..2831de942 100755 --- a/dokku +++ b/dokku @@ -13,7 +13,7 @@ case "$1" in echo " $(dokku url $APP)" echo ;; - + build) IMAGE="$2" id=$(cat | docker run -i -a stdin progrium/buildstep /bin/bash -c "mkdir -p /app && tar -xC /app") @@ -24,7 +24,7 @@ case "$1" in test $(docker wait $id) -eq 0 docker commit $id $IMAGE > /dev/null ;; - + deploy) APP="$2"; IMAGE="$3" pluginhook pre-deploy $APP $IMAGE @@ -46,8 +46,11 @@ case "$1" in pluginhook post-deploy $APP $port ;; - plugins) + plugins) ls -1 -d $PLUGIN_PATH/*/ + ;; + + plugins-install) pluginhook install ;; @@ -55,6 +58,7 @@ case "$1" in cat<