mirror of
https://github.com/dokku/dokku.git
synced 2025-12-28 16:06:40 +01:00
Merge pull request #77 from asm89/bootstrap
Tune bootstrap/install script and documentation for advanced installation
This commit is contained in:
18
Makefile
18
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
|
||||
@find tests -type f | xargs cat | wc -l
|
||||
|
||||
21
README.md
21
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
|
||||
|
||||
12
dokku
12
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<<EOF | pluginhook commands help | sort
|
||||
help Print the list of commands
|
||||
plugins Print active plugins
|
||||
plugins-install Install active plugins
|
||||
EOF
|
||||
;;
|
||||
|
||||
@@ -62,4 +66,4 @@ EOF
|
||||
pluginhook commands "$@"
|
||||
;;
|
||||
|
||||
esac
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user