lots of cleanup
This commit is contained in:
4
AUTHORS
Normal file
4
AUTHORS
Normal 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
7
LICENSE
Normal 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.
|
||||
9
Makefile
9
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
|
||||
cp nginx-reloader.conf /etc/init/nginx-reloader.conf
|
||||
|
||||
submodule:
|
||||
git submodule init
|
||||
git submodule update
|
||||
14
README.md
14
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 <progrium@gmail.com>
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
35
bootstrap.sh
35
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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user