lots of cleanup

This commit is contained in:
Jeff Lindsay
2013-06-10 01:02:57 -07:00
parent e8a134a945
commit 08575f5603
6 changed files with 31 additions and 42 deletions

4
AUTHORS Normal file
View File

@@ -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 <progrium@gmail.com>

7
LICENSE Normal file
View File

@@ -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.

View File

@@ -1,8 +1,13 @@
all: install all: install
install: install: submodule
cp receiver /home/git/receiver cp receiver /home/git/receiver
cp deploystep /home/git/deploystep cp deploystep /home/git/deploystep
cp buildstep/buildstep /home/git/buildstep
cp nginx-app-conf /home/git/nginx-app-conf cp nginx-app-conf /home/git/nginx-app-conf
cp nginx-reloader.conf /etc/init/nginx-reloader.conf cp nginx-reloader.conf /etc/init/nginx-reloader.conf
submodule:
git submodule init
git submodule update

View File

@@ -52,10 +52,8 @@ You're done!
## Advanced installation (for development) ## Advanced installation (for development)
The bootstrap script allows source URLs to be overridden to include customizations from your own 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 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): may be set to override the defaults (see the bootstrap.sh script for how these apply). Example:
Example:
$ wget j.mp/dokku-bootstrap $ wget j.mp/dokku-bootstrap
$ chmod +x bootstrap.sh $ 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 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: are supported. You can update this by running:
$ cd ~/buildstep $ cd ~/dokku/buildstep
$ git pull origin master $ git pull origin master
$ make $ make build
Nothing needs to be restarted. Changes will take effect on the next push / deployment. 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. * **Multitenancy.** It's ready for it, but again, probably for Super Dokku.
* **Client app.** Given the constraints, running commands remotely via SSH is fine. * **Client app.** Given the constraints, running commands remotely via SSH is fine.
## Contributors
* Jeff Lindsay <progrium@gmail.com>
## License ## License
MIT MIT

View File

@@ -1,43 +1,24 @@
# Repository locations - set environment variables to override defaults # Repository locations - set environment variables to override defaults
# e.g. DOKKU_REPO=https://github.com/yourusername/dokku.git bootstrap.sh # e.g. DOKKU_REPO=https://github.com/yourusername/dokku.git bootstrap.sh
GITRECEIVE_URL=${GITRECEIVE_URL:-"https://raw.github.com/progrium/gitreceive/master/gitreceive"} 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"} DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"}
# Docker and base dependencies apt-get install -y linux-image-extra-`uname -r` software-properties-common
apt-get install -y linux-image-extra-`uname -r`
apt-get install -y software-properties-common
add-apt-repository -y ppa:dotcloud/lxc-docker add-apt-repository -y ppa:dotcloud/lxc-docker
apt-get update apt-get update && apt-get install -y lxc-docker git ruby nginx make
apt-get install -y lxc-docker
apt-get install -y git ruby nginx make
# gitreceive wget -o /usr/local/bin/gitreceive ${GITRECEIVE_URL}
cd /usr/local/bin chmod +x /usr/local/bin/gitreceive
wget ${GITRECEIVE_URL}
chmod +x gitreceive
gitreceive init gitreceive init
# buildstep cd ~ && git clone ${DOKKU_REPO}
cd ~ cd dokku && make install
git clone ${BUILDSTEP_REPO} cd buildstep && make build
cd buildstep
cp buildstep /home/git/buildstep
make
# dokku (this!)
cd ~
git clone ${DOKKU_REPO}
cd dokku
make install
stop nginx-reloader
start 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 /etc/init.d/nginx start
echo "include /home/git/*/nginx.conf;" > /etc/nginx/conf.d/dokku.conf
echo $HOSTNAME > /home/git/DOMAIN echo $HOSTNAME > /home/git/DOMAIN
echo echo

View File

@@ -1,9 +1,7 @@
#!/bin/bash #!/bin/bash
APP="$1"; CONTAINER="$2" APP="$1"; CONTAINER="$2"
if [[ -f "$HOME/DOMAIN" ]]; then [[ -f "$HOME/DOMAIN" ]] && DOMAIN=$(< "$HOME/DOMAIN")
DOMAIN=$(< "$HOME/DOMAIN")
fi
if [[ ! -f "$HOME/$APP/PORT" ]]; then if [[ ! -f "$HOME/$APP/PORT" ]]; then
# First deploy # First deploy