diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000000000..dc4fb10db --- /dev/null +++ b/AUTHORS @@ -0,0 +1,4 @@ +# This file lists all individuals having contributed content to the repository. +# If you're submitting a patch, please add your name here in alphabetical order as part of the patch. +# +Jeff Lindsay \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..d1ea3bead --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright (C) 2013 Jeff Lindsay + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Makefile b/Makefile index 5bb6160e1..e1df43ef8 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,13 @@ all: install -install: +install: submodule cp receiver /home/git/receiver cp deploystep /home/git/deploystep + cp buildstep/buildstep /home/git/buildstep cp nginx-app-conf /home/git/nginx-app-conf - cp nginx-reloader.conf /etc/init/nginx-reloader.conf \ No newline at end of file + cp nginx-reloader.conf /etc/init/nginx-reloader.conf + +submodule: + git submodule init + git submodule update \ No newline at end of file diff --git a/README.md b/README.md index 058fb584e..728b679b4 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,8 @@ 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, BUILDSTEP_REPO and DOKKU_REPO environment variables -may be set to override the defaults (see the bootstrap.sh script for how these apply): - -Example: +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: $ wget j.mp/dokku-bootstrap $ chmod +x bootstrap.sh @@ -73,9 +71,9 @@ To update the deploy step (this is updated less frequently): More frequently, the build step is updated. This is where the app "stack" lives and where buildpacks are supported. You can update this by running: - $ cd ~/buildstep + $ cd ~/dokku/buildstep $ git pull origin master - $ make + $ make build Nothing needs to be restarted. Changes will take effect on the next push / deployment. @@ -101,10 +99,6 @@ Looking to keep codebase as simple and hackable as possible, so try to keep your * **Multitenancy.** It's ready for it, but again, probably for Super Dokku. * **Client app.** Given the constraints, running commands remotely via SSH is fine. -## Contributors - - * Jeff Lindsay - ## License MIT \ No newline at end of file diff --git a/bootstrap.sh b/bootstrap.sh index 9f208f18f..65bc08a12 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,43 +1,24 @@ # Repository locations - set environment variables to override defaults # e.g. DOKKU_REPO=https://github.com/yourusername/dokku.git bootstrap.sh GITRECEIVE_URL=${GITRECEIVE_URL:-"https://raw.github.com/progrium/gitreceive/master/gitreceive"} -BUILDSTEP_REPO=${BUILDSTEP_REPO:-"https://github.com/progrium/buildstep.git"} DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"} -# Docker and base dependencies -apt-get install -y linux-image-extra-`uname -r` -apt-get install -y software-properties-common +apt-get install -y linux-image-extra-`uname -r` software-properties-common add-apt-repository -y ppa:dotcloud/lxc-docker -apt-get update -apt-get install -y lxc-docker -apt-get install -y git ruby nginx make +apt-get update && apt-get install -y lxc-docker git ruby nginx make -# gitreceive -cd /usr/local/bin -wget ${GITRECEIVE_URL} -chmod +x gitreceive +wget -o /usr/local/bin/gitreceive ${GITRECEIVE_URL} +chmod +x /usr/local/bin/gitreceive gitreceive init -# buildstep -cd ~ -git clone ${BUILDSTEP_REPO} -cd buildstep -cp buildstep /home/git/buildstep -make +cd ~ && git clone ${DOKKU_REPO} +cd dokku && make install +cd buildstep && make build -# dokku (this!) -cd ~ -git clone ${DOKKU_REPO} -cd dokku -make install - -stop nginx-reloader start nginx-reloader - -# configure and start nginx -echo "include /home/git/*/nginx.conf;" > /etc/nginx/conf.d/dokku.conf /etc/init.d/nginx start +echo "include /home/git/*/nginx.conf;" > /etc/nginx/conf.d/dokku.conf echo $HOSTNAME > /home/git/DOMAIN echo diff --git a/deploystep b/deploystep index 2e2ff8200..01f1ad708 100755 --- a/deploystep +++ b/deploystep @@ -1,9 +1,7 @@ #!/bin/bash APP="$1"; CONTAINER="$2" -if [[ -f "$HOME/DOMAIN" ]]; then - DOMAIN=$(< "$HOME/DOMAIN") -fi +[[ -f "$HOME/DOMAIN" ]] && DOMAIN=$(< "$HOME/DOMAIN") if [[ ! -f "$HOME/$APP/PORT" ]]; then # First deploy