Compare commits
57 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f328a9940b | ||
|
|
1ef5b92910 | ||
|
|
1dd07aeda9 | ||
|
|
1628f60553 | ||
|
|
970f4489d4 | ||
|
|
997cec4b9b | ||
|
|
127b7a15b5 | ||
|
|
bbf310147e | ||
|
|
858240874c | ||
|
|
7bddd8751e | ||
|
|
0540c254d0 | ||
|
|
6caed369d7 | ||
|
|
9da47d84e0 | ||
|
|
6450f9332a | ||
|
|
722564b2da | ||
|
|
a93e180a89 | ||
|
|
8cbc36fd22 | ||
|
|
8d84721882 | ||
|
|
c739c770f7 | ||
|
|
d01961424d | ||
|
|
e114ab3f20 | ||
|
|
ebd185a798 | ||
|
|
eb4e5957cd | ||
|
|
429eb4af83 | ||
|
|
fb88783f9d | ||
|
|
aa2f02b1d2 | ||
|
|
9dfe14fe33 | ||
|
|
71b040cabe | ||
|
|
4a310dc53f | ||
|
|
e7e249d1d3 | ||
|
|
af97275139 | ||
|
|
9ce7470b87 | ||
|
|
8a4b2f9a2e | ||
|
|
823b5c27da | ||
|
|
7e1516bdf5 | ||
|
|
3eb9a50921 | ||
|
|
6ed457d1f7 | ||
|
|
3b076f6f01 | ||
|
|
45551c3c5b | ||
|
|
8c31c8105e | ||
|
|
9ccbc834b5 | ||
|
|
2c409687d5 | ||
|
|
6c51115e14 | ||
|
|
088ee071ca | ||
|
|
c245ba3a5d | ||
|
|
8cf20db7e1 | ||
|
|
8c39685ef6 | ||
|
|
20dfd20416 | ||
|
|
12ca7adcd1 | ||
|
|
a4e8efedc8 | ||
|
|
d86ed5d6ee | ||
|
|
668dc0e7a5 | ||
|
|
f5b454e110 | ||
|
|
aefd5bb251 | ||
|
|
8b8df9e093 | ||
|
|
cdd62b09d3 | ||
|
|
107697dc95 |
64
HISTORY.md
64
HISTORY.md
@@ -1,5 +1,69 @@
|
||||
# History
|
||||
|
||||
## 0.5.4
|
||||
|
||||
This release continues on our tradition of making bugfixes in patch releases. Also note that we now release dokku with `sshcommand` version `0.4.0`, which should increase usability of that package quite a bit.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2055: @tobru Move nginx include to server section
|
||||
- #2060: @michaelshobbs Filter restart policies from exec-app-json containers
|
||||
- #2061: @znz Fix ignored settings in the CHECKS file
|
||||
- #2065: @michaelshobbs Fix pre/post deploy support for dockerfile apps
|
||||
|
||||
### New Features
|
||||
|
||||
- #2052: @josegonzalez Use upstream releases when creating deb packages. Closes #2048
|
||||
- #2068: @josegonzalez Use latest sshcommand when installing via debian
|
||||
- #2070: @josegonzalez Upgrade sshcommand to 0.4.0
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2049: @mmlkrx Fix typo in deployment-tasks.md
|
||||
- #2051: @plieningerweb Clarify installation instructions in docs
|
||||
- #2058: @michaelshobbs Remove references to global TLS certs
|
||||
- #2072: @michaelshobbs Note that we only support one EXPOSE port per line in dockerfiles
|
||||
|
||||
## 0.5.3
|
||||
|
||||
This release sorts out a few minor bugs introduced in the 0.5.0 release.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2030: @josegonzalez Fix setting of APPS in checks command when $1 is left unspecified
|
||||
- #2035: @stesie Fix ps_restart to not exit early
|
||||
- #2042: @michaelshobbs Ensure CHECKS file has trailing newline
|
||||
- #2046: @michaelshobbs Strip inline comments and trailing whitespace from CHECKS and Procfile
|
||||
- #2047: @michaelshobbs Remove deprecated mktemp args and name vars more clearly
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2032: @josegonzalez Fix upstream positioning in docs. Closes #2031
|
||||
- #2039: @christiangenco Clarify upgrading documentation
|
||||
- #2043: @michaelshobbs Clarify dockerfile port exposure documentation
|
||||
- #2045: @u2mejc Reword dockerfiles docs to clarify EXPOSE handling in 0.5.x
|
||||
|
||||
## 0.5.2
|
||||
|
||||
This is a packaging fix release.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2027: @michaelshobbs Add sigil to debian control file
|
||||
|
||||
## 0.5.1
|
||||
|
||||
That was quick! This is a bugfix release to fix issues in the packaging and release phases of dokku.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2023: @josegonzalez Fix sigil packaging
|
||||
- #2024: @josegonzalez Delete bad symlinks without confirmation
|
||||
|
||||
## 0.5.0
|
||||
|
||||
This is our largest, most feature-packed release in the history of the dokku project. Lots of delicious things, including:
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
DOKKU_VERSION = master
|
||||
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/master/sshcommand
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.4.0/sshcommand
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.2.1/plugn_0.2.1_linux_x86_64.tgz
|
||||
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v0.4.0/sigil_0.4.0_Linux_x86_64.tgz
|
||||
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
|
||||
|
||||
@@ -10,8 +10,8 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. S
|
||||
|
||||
To install the latest stable release, you can run the following commands as a user that has access to `sudo`:
|
||||
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.5.0 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh
|
||||
|
||||
### Upgrading
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.5.0'
|
||||
VERSION = 'v0.5.4'
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
|
||||
64
deb.mk
64
deb.mk
@@ -13,23 +13,21 @@ PLUGN_REPO_NAME ?= dokku/plugn
|
||||
PLUGN_VERSION ?= 0.2.1
|
||||
PLUGN_ARCHITECTURE = amd64
|
||||
PLUGN_PACKAGE_NAME = plugn_$(PLUGN_VERSION)_$(PLUGN_ARCHITECTURE).deb
|
||||
PLUGN_URL = https://github.com/dokku/plugn/releases/download/v$(PLUGN_VERSION)/plugn_$(PLUGN_VERSION)_linux_x86_64.tgz
|
||||
|
||||
SSHCOMMAND_DESCRIPTION = 'Turn SSH into a thin client specifically for your app'
|
||||
SSHCOMMAND_REPO_NAME ?= dokku/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.1.0
|
||||
SSHCOMMAND_VERSION ?= 0.4.0
|
||||
SSHCOMMAND_ARCHITECTURE = amd64
|
||||
SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v$(SSHCOMMAND_VERSION)/sshcommand
|
||||
|
||||
SIGIL_DESCRIPTION = 'Standalone string interpolator and template processor'
|
||||
SIGIL_REPO_NAME ?= gliderlabs/sigil
|
||||
SIGIL_VERSION ?= 0.4.0
|
||||
SIGIL_ARCHITECTURE = amd64
|
||||
SIGIL_PACKAGE_NAME = sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb
|
||||
|
||||
GOROOT = /usr/local/go
|
||||
GOBIN = /usr/local/go/bin/go
|
||||
GOPATH = /home/vagrant/gocode
|
||||
GOTARBALL = go1.5.3.linux-amd64.tar.gz
|
||||
SIGIL_URL = https://github.com/gliderlabs/sigil/releases/download/v$(SIGIL_VERSION)/sigil_$(SIGIL_VERSION)_Linux_x86_64.tgz
|
||||
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-plugn deb-setup deb-sshcommand deb-sigil
|
||||
|
||||
@@ -47,27 +45,16 @@ install-from-deb:
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -yy dokku
|
||||
|
||||
golang:
|
||||
ifeq (,$(wildcard /tmp/$(GOTARBALL)))
|
||||
@echo "-> Installing golang"
|
||||
mkdir -p /tmp/build/usr/local/bin $(GOPATH)
|
||||
sudo apt-get clean
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install -qq -y git mercurial > /dev/null 2>&1
|
||||
sudo wget -nv -O /tmp/$(GOTARBALL) https://storage.googleapis.com/golang/$(GOTARBALL)
|
||||
sudo tar -C /usr/local -xzf /tmp/$(GOTARBALL)
|
||||
endif
|
||||
|
||||
deb-all: deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil
|
||||
mv /tmp/*.deb .
|
||||
@echo "Done"
|
||||
|
||||
deb-setup:
|
||||
@echo "-> Updating deb repository and installing build requirements"
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git ruby-dev ruby1.9.1 > /dev/null 2>&1
|
||||
command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
ssh -o StrictHostKeyChecking=no git@github.com || true
|
||||
@sudo apt-get update -qq > /dev/null
|
||||
@sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git ruby-dev ruby1.9.1 > /dev/null 2>&1
|
||||
@command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
@ssh -o StrictHostKeyChecking=no git@github.com || true
|
||||
|
||||
deb-herokuish: deb-setup
|
||||
rm -rf /tmp/tmp /tmp/build $(HEROKUISH_PACKAGE_NAME)
|
||||
@@ -123,54 +110,47 @@ deb-dokku: deb-setup
|
||||
dpkg-deb --build /tmp/build "/vagrant/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-plugn: deb-setup golang
|
||||
deb-plugn: deb-setup
|
||||
rm -rf /tmp/tmp /tmp/build $(PLUGN_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
|
||||
|
||||
@echo "-> Cloning repository"
|
||||
git clone -q "https://github.com/$(PLUGN_REPO_NAME).git" /tmp/tmp/plugn > /dev/null
|
||||
rm -rf /tmp/tmp/plugn/.git /tmp/tmp/plugn/.gitignore
|
||||
@echo "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/plugn-$(PLUGN_VERSION).tgz $(PLUGN_URL)
|
||||
cd /tmp/tmp/ && tar zxf /tmp/tmp/plugn-$(PLUGN_VERSION).tgz
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH):/tmp/tmp/plugn && go get github.com/dokku/plugn
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH):/tmp/tmp/plugn && cd /home/vagrant/gocode/src/github.com/dokku/plugn && make deps
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH):/tmp/tmp/plugn && cd /home/vagrant/gocode/src/github.com/dokku/plugn && rm -f plugn && go build -o plugn
|
||||
mv /home/vagrant/gocode/src/github.com/dokku/plugn/plugn /tmp/build/usr/local/bin/plugn
|
||||
cp /tmp/tmp/plugn /tmp/build/usr/local/bin/plugn && chmod +x /tmp/build/usr/local/bin/plugn
|
||||
|
||||
@echo "-> Creating $(PLUGN_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n plugn -v $(PLUGN_VERSION) -a $(PLUGN_ARCHITECTURE) -p $(PLUGN_PACKAGE_NAME) --url "https://github.com/$(PLUGN_REPO_NAME)" --description $(PLUGN_DESCRIPTION) --license 'MIT License' .
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-sshcommand: deb-setup
|
||||
deb-sshcommand:
|
||||
rm -rf /tmp/tmp /tmp/build $(SSHCOMMAND_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
|
||||
|
||||
@echo "-> Cloning repository"
|
||||
git clone -q "https://github.com/$(SSHCOMMAND_REPO_NAME).git" /tmp/tmp/sshcommand > /dev/null
|
||||
rm -rf /tmp/tmp/sshcommand/.git /tmp/tmp/sshcommand/.gitignore
|
||||
@echo "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) $(SSHCOMMAND_URL)
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
mkdir -p "/tmp/build/usr/local/bin"
|
||||
cp /tmp/tmp/sshcommand/sshcommand /tmp/build/usr/local/bin/sshcommand
|
||||
cp /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) /tmp/build/usr/local/bin/sshcommand
|
||||
chmod +x /tmp/build/usr/local/bin/sshcommand
|
||||
|
||||
@echo "-> Creating $(SSHCOMMAND_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n sshcommand -v $(SSHCOMMAND_VERSION) -a $(SSHCOMMAND_ARCHITECTURE) -p $(SSHCOMMAND_PACKAGE_NAME) --url "https://github.com/$(SSHCOMMAND_REPO_NAME)" --description $(SSHCOMMAND_DESCRIPTION) --license 'MIT License' .
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-sigil: deb-setup golang
|
||||
deb-sigil: deb-setup
|
||||
rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
|
||||
|
||||
@echo "-> Cloning repository"
|
||||
git clone -q "https://github.com/$(SIGIL_REPO_NAME).git" /tmp/tmp/sigil > /dev/null
|
||||
rm -rf /tmp/tmp/sigil/.git /tmp/tmp/sigil/.gitignore
|
||||
@echo "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/sigil-$(SIGIL_VERSION).tgz $(SIGIL_URL)
|
||||
cd /tmp/tmp/ && tar zxf /tmp/tmp/sigil-$(SIGIL_VERSION).tgz
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH):/tmp/tmp/sigil && go get github.com/gliderlabs/sigil
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH):/tmp/tmp/sigil && cd /home/vagrant/gocode/src/github.com/gliderlabs/sigil && make deps
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH):/tmp/tmp/sigil && cd /home/vagrant/gocode/src/github.com/gliderlabs/sigil && rm -f sigil && go build -o sigil
|
||||
mv /home/vagrant/gocode/src/github.com/gliderlabs/sigil/sigil /tmp/build/usr/local/bin/sigil
|
||||
cp /tmp/tmp/sigil /tmp/build/usr/local/bin/sigil && chmod +x /tmp/build/usr/local/bin/sigil
|
||||
|
||||
@echo "-> Creating $(SIGIL_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n sigil -v $(SIGIL_VERSION) -a $(SIGIL_ARCHITECTURE) -p $(SIGIL_PACKAGE_NAME) --url "https://github.com/$(SIGIL_REPO_NAME)" --description $(SIGIL_DESCRIPTION) --license 'MIT License' .
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -1,9 +1,9 @@
|
||||
Package: dokku
|
||||
Version: 0.5.0
|
||||
Version: 0.5.4
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, make, curl, gcc, man-db, sshcommand, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties
|
||||
Depends: locales, git, make, curl, gcc, man-db, sshcommand, sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties
|
||||
Recommends: herokuish
|
||||
Pre-Depends: nginx (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
|
||||
1
debian/postinst
vendored
1
debian/postinst
vendored
@@ -43,6 +43,7 @@ case "$1" in
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/plugins plugn enable $plugin
|
||||
fi
|
||||
done
|
||||
find -L ${DOKKU_LIB_ROOT} -type l -delete
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins
|
||||
|
||||
echo "Install all core plugins"
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.0\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.0\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.0\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.0\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.0\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.0\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -36,13 +36,13 @@ h1 {
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -163,6 +163,9 @@ h1 {
|
||||
.featurette-heading .text-muted {
|
||||
font-weight: 300;
|
||||
}
|
||||
.featurette img {
|
||||
width: 400px;
|
||||
}
|
||||
.slack-channel {
|
||||
background-color: #EEF1F7;
|
||||
font-size: 16px;
|
||||
@@ -485,8 +488,16 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
font-size: 50px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.featurette-heading {
|
||||
margin-top: 120px;
|
||||
@media (max-width: 992px) {
|
||||
.featurette img {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.featurette img {
|
||||
width: 300px;
|
||||
}
|
||||
.featurette-heading {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
"max-versions": [
|
||||
"0.3.26",
|
||||
"0.4.14",
|
||||
"0.5.0"
|
||||
"0.5.4"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ Simply place an `app.json` file in the root of your repository or for dockerfile
|
||||
"scripts": {
|
||||
"dokku": {
|
||||
"predeploy": "touch /app/predeploy.test",
|
||||
"postdeploy": "curl https://some.external.api.service.com/deployment?state=succuss"
|
||||
"postdeploy": "curl https://some.external.api.service.com/deployment?state=success"
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
|
||||
@@ -11,16 +11,13 @@ To use a dockerfiles for deployment, commit a valid `Dockerfile` to the root of
|
||||
|
||||
## Exposed ports
|
||||
|
||||
By default, Dokku will extract the first `EXPOSE` tcp port and use said port with nginx to proxy your app to that port. For applications that have multiple ports exposed, you may override this port via the following command:
|
||||
> Changed as of 0.5.0
|
||||
|
||||
```shell
|
||||
# replace APP with the name of your application
|
||||
dokku config:set APP DOKKU_DOCKERFILE_PORT=8000
|
||||
```
|
||||
Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port per line) and setup nginx to proxy the same port numbers to listen publicly. If you would like to change the exposed port, you should do so within your `Dockerfile` and app.
|
||||
|
||||
Dokku will not expose other ports on your application without a [custom docker-option](/dokku/docker-options/).
|
||||
> NOTE: Nginx does not support proxying UDP. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`
|
||||
|
||||
If you do not have a port explicitly exposed, Dokku will automatically expose port `5000` for your application.
|
||||
If you do not explicitly `EXPOSE` a port in your `Dockerfile`, dokku will configure the nginx proxy to listen on port 80 (and 443 for TLS) and forward traffic to your app listening on port 5000 inside the container. Just like buildpack apps, you can also use the `$PORT` environment variable in your app to maintain portability.
|
||||
|
||||
## Customizing the run command
|
||||
|
||||
|
||||
@@ -64,34 +64,6 @@ root@dokku:~/dokku# dokku certs:info node-js-app
|
||||
|
||||
The `certs:remove` command only works on app-specific certificates. It will `rm` the app-specific tls directory, rebuild the nginx configuration, and reload nginx.
|
||||
|
||||
## Global Certification
|
||||
|
||||
Global certificate management is a manual process. To enable TLS connections for all your applications at once you will need a wildcard TLS certificate.
|
||||
|
||||
To enable TLS across all apps, you can run the following commands:
|
||||
|
||||
```shell
|
||||
mkdir -p /home/dokku/tls
|
||||
cp server.crt /home/dokku/tls/server.crt
|
||||
cp server.key /home/dokku/tls/server.key
|
||||
```
|
||||
|
||||
Next, you will want to enable the certificates by editing `/etc/nginx/conf.d/dokku.conf` and uncommenting these two lines (remove the `#`):
|
||||
|
||||
```
|
||||
ssl_certificate /home/dokku/tls/server.crt;
|
||||
ssl_certificate_key /home/dokku/tls/server.key;
|
||||
```
|
||||
|
||||
The settings will take affect at the next deploy. If you would like to propagate the change to all apps immediately, you can also run the following command:
|
||||
|
||||
```shell
|
||||
dokku ps:restartall
|
||||
```
|
||||
|
||||
Once TLS is enabled, the application will be accessible by `https://` (redirection from `http://` is applied as well).
|
||||
|
||||
> Note: TLS will not be enabled unless the application's VHOST matches the certificate's name. (i.e. if you have a cert for `*.example.com` TLS won't be enabled for `something.example.org` or `example.net`)
|
||||
|
||||
## HSTS Header
|
||||
|
||||
@@ -106,6 +78,12 @@ Your application has access to the HTTP headers `X-Forwarded-Proto`, `X-Forwarde
|
||||
If your server runs behind an HTTP/S load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application by using the following [nginx custom template](/dokku/nginx/#customizing-the-nginx-configuration)
|
||||
|
||||
```shell
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
|
||||
server {
|
||||
listen [::]:{{ .NGINX_PORT }};
|
||||
listen {{ .NGINX_PORT }};
|
||||
@@ -128,12 +106,6 @@ server {
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ The workflow looks like this:
|
||||
```shell
|
||||
# having dokku-arch in ../dokku-arch
|
||||
vagrant up build-arch
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.5.0-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.5.4-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
|
||||
153
docs/home.html
153
docs/home.html
@@ -10,32 +10,70 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
.team-members img {
|
||||
-moz-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
-webkit-border-radius: 3px;
|
||||
-webkit-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
border-radius: 3px;
|
||||
border: 8px solid white;
|
||||
box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
display: block;
|
||||
height: 200px;
|
||||
margin: 20px auto 20px auto;
|
||||
}
|
||||
.team-members .fund-link {
|
||||
display: block;
|
||||
font-size: 80%;
|
||||
}
|
||||
.team-member {
|
||||
min-height: 320px;
|
||||
}
|
||||
.team-member-image img:last-child { display: none }
|
||||
.team-member-image:hover img:first-child { display: none; }
|
||||
.team-member-image:hover img:last-child { display: inline-block; }
|
||||
|
||||
.featurette img {
|
||||
width: 400px;
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.featurette img {
|
||||
width: 300px;
|
||||
}
|
||||
.featurette-heading {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
.featurette img {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -92,12 +130,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.5.0/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.5.0 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
@@ -170,11 +208,21 @@
|
||||
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://www.digitalocean.com/features/one-click-apps/dokku/" target="_blank">DigitalOcean</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/linode/" target="_blank">Linode</a> instructions.<p>
|
||||
<p>Still no love? <a href="https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md" target="_blank">Contributions welcome</a>!</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid slack-channel">
|
||||
Have a question? Join us in our public slack channel!
|
||||
|
||||
<div class="inline-container">
|
||||
<a class="button slack-button" href="https://glider-slackin.herokuapp.com/">
|
||||
<img src="/assets/slack-logo.png" alt="Slack Logo">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container marketing">
|
||||
<!-- START THE FEATURETTES -->
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<div class="row featurette">
|
||||
<div class="col-md-7">
|
||||
<h2 class="featurette-heading">Own Your PaaS. <span class="text-muted">Infrastructure at a fraction of the cost.</span></h2>
|
||||
@@ -208,21 +256,62 @@
|
||||
<img class="featurette-image img-responsive center-block" alt="Extend Logo" src="./assets/extend.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="container-fluid slack-channel">
|
||||
Have a question? Join us in our public slack channel!
|
||||
<div class="container-fluid slack-channel team-members">
|
||||
<h3>Meet the core team</h3>
|
||||
|
||||
<div class="inline-container">
|
||||
<a class="button slack-button" href="https://glider-slackin.herokuapp.com/">
|
||||
<img src="/assets/slack-logo.png" alt="Slack Logo">
|
||||
</a>
|
||||
<div class="row">
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-2 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/progrium-hidden.jpg" alt="Jeff Lindsay">
|
||||
<img src="./assets/team/progrium.jpg" alt="Jeff Lindsay">
|
||||
</div>
|
||||
Jeff Lindsay
|
||||
<a class="fund-link" href="https://www.patreon.com/progrium">Sponsor people they sponsor</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-0 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/josegonzalez-hidden.jpg" alt="Morris Jobke">
|
||||
<img src="./assets/team/josegonzalez.jpg" alt="Morris Jobke">
|
||||
</div>
|
||||
Jose Diaz-Gonzalez
|
||||
<a class="fund-link" href="http://www.amazon.com/registry/wishlist/36RYHSXCFYDTG/">Buy him something nice</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-2 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/u2mejc-hidden.jpg" alt="Justin Clark">
|
||||
<img src="./assets/team/u2mejc.jpg" alt="Justin Clark">
|
||||
</div>
|
||||
Justin Clark
|
||||
<a class="fund-link" href="http://smile.amazon.com/registry/wishlist/3SCPXMNI2EIYV">Feed his dog greenie treats!</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-0 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/flink-hidden.jpg" alt="Loïc Guitaut">
|
||||
<img src="./assets/team/flink.jpg" alt="Loïc Guitaut">
|
||||
</div>
|
||||
Loïc Guitaut
|
||||
<a class="fund-link" href="https://watsi.org/fund-treatments">Help fund a treatment on watsi</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-2 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/michaelshobbs-hidden.jpg" alt="Michael Hobbs">
|
||||
<img src="./assets/team/michaelshobbs.jpg" alt="Michael Hobbs">
|
||||
</div>
|
||||
Michael Hobbs
|
||||
<a class="fund-link" href="https://gratipay.com/~michaelshobbs/">Fund on gratipay</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-0 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/morrisjobke-hidden.jpg" alt="Morris Jobke">
|
||||
<img src="./assets/team/morrisjobke.jpg" alt="Morris Jobke">
|
||||
</div>
|
||||
Morris Jobke
|
||||
<a class="fund-link" href="">Get him an ebook</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="container">
|
||||
<footer>
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.5.0/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.5.0 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"># => Go to your server's IP and follow the web installer</span>
|
||||
|
||||
@@ -15,18 +15,23 @@ Dokku is designed for usage on a fresh installation of Ubuntu, and should instal
|
||||
|
||||
### Installing the latest stable version
|
||||
|
||||
#### 1. Install dokku
|
||||
|
||||
To install the latest stable version of dokku, you can run the following shell commands:
|
||||
|
||||
```shell
|
||||
# installs dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.5.0 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
#### 2. Setup SSH key and Virtualhost Settings
|
||||
|
||||
Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings. Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure dokku via the web admin.
|
||||
|
||||
#### 3. Deploy your first application
|
||||
Once you save your settings, the web admin will self-terminate and you should be able to run or deploy to the dokku installation.
|
||||
|
||||
### Installing via other methods
|
||||
|
||||
@@ -20,6 +20,11 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider
|
||||
|
||||
### Example Custom Template
|
||||
```
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
server {
|
||||
listen [::]:{{ .NGINX_PORT }};
|
||||
listen {{ .NGINX_PORT }};
|
||||
@@ -42,12 +47,6 @@ server {
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -200,4 +199,4 @@ See the [ssl documentation](/dokku/deployment/ssl-configuration/).
|
||||
|
||||
## Disabling Nginx
|
||||
|
||||
See the [proxy documentation](/dokku/deployment/proxy/).
|
||||
See the [proxy documentation](/dokku/proxy/).
|
||||
|
||||
@@ -10,26 +10,26 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400:sans-serif|Open+Sans:400:sans-serif" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -43,7 +43,7 @@
|
||||
</script>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
@@ -12,6 +12,10 @@ Migration guides contain information regarding the new features introduced in ea
|
||||
|
||||
## General Information
|
||||
|
||||
Upgrading is not advised on running apps. Stop them before with `dokku ps:stop <app>`.
|
||||
|
||||
Before using `apt-get install`, run `apt-get update` to download the latest packages.
|
||||
|
||||
If dokku was installed via a debian package, you can upgrade dokku via the following command:
|
||||
|
||||
```shell
|
||||
@@ -37,7 +41,7 @@ sudo DOKKU_BRANCH=master make install
|
||||
sudo make install
|
||||
```
|
||||
|
||||
All changes will take effect upon next application deployment. To trigger a rebuild of every application, simply run the following command:
|
||||
All changes will take effect upon next application deployment. To trigger a rebuild and restart every application, simply run the following command:
|
||||
|
||||
```shell
|
||||
dokku ps:rebuildall
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
get_phase_script() {
|
||||
declare desc="extracts app.json from app image and returns the appropriate json key/value"
|
||||
local IMAGE="$1"; local PHASE_SCRIPT_KEY="$2"
|
||||
local TMP_WORK_DIR=$(mktemp -d -t "dokku_get_phase_script.XXXX")
|
||||
local APP_JSON_FILE="$TMP_WORK_DIR/app.json"
|
||||
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM
|
||||
local GET_PHASE_SCRIPT_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_get_phase_script.XXXX")
|
||||
local APP_JSON_FILE="$GET_PHASE_SCRIPT_TMP_WORK_DIR/app.json"
|
||||
trap 'rm -rf "$GET_PHASE_SCRIPT_TMP_WORK_DIR" > /dev/null' RETURN INT TERM
|
||||
|
||||
copy_from_image "$IMAGE" "/app/app.json" "$TMP_WORK_DIR" 2>/dev/null || true
|
||||
copy_from_image "$IMAGE" "/app/app.json" "$GET_PHASE_SCRIPT_TMP_WORK_DIR" 2>/dev/null || true
|
||||
|
||||
if [[ -f "$APP_JSON_FILE" ]];then
|
||||
local VALUE=$(get_json_value "scripts.dokku.${PHASE_SCRIPT_KEY}" < "$APP_JSON_FILE")
|
||||
@@ -26,24 +27,50 @@ execute_script() {
|
||||
local SCRIPT_CMD=$(get_phase_script "$IMAGE" "$PHASE_SCRIPT_KEY" 2>/dev/null)
|
||||
if [[ -n "$SCRIPT_CMD" ]];then
|
||||
dokku_log_info1 "Running '$SCRIPT_CMD' in app container"
|
||||
local COMMAND="export HOME=/app ; "
|
||||
local COMMAND+=" cd \$HOME ; "
|
||||
local COMMAND+=" for file in /app/.profile.d/*; do source \$file; done ; "
|
||||
local COMMAND+=" echo restoring installation cache... ; "
|
||||
local COMMAND+=" rm -rf /tmp/cache || true ; "
|
||||
local COMMAND+=" ln -sf /cache /tmp/cache || true ; "
|
||||
local COMMAND+=" $SCRIPT_CMD ; RC=\$? ;"
|
||||
local COMMAND+=" echo removing installation cache... ; "
|
||||
local COMMAND+=" rm -f /tmp/cache || true ; "
|
||||
local COMMAND+=" exit \$RC "
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP")
|
||||
local COMMAND
|
||||
COMMAND="set -eo pipefail; [[ \$DOKKU_TRACE ]] && set -x ; "
|
||||
COMMAND+=" if [[ -d '/app' ]]; then "
|
||||
COMMAND+=" export HOME=/app ; "
|
||||
COMMAND+=" cd \$HOME ; "
|
||||
COMMAND+=" fi ; "
|
||||
COMMAND+=" if [[ -d '/app/.profile.d' ]]; then "
|
||||
COMMAND+=" for file in /app/.profile.d/*; do source \$file; done ; "
|
||||
COMMAND+=" fi ; "
|
||||
COMMAND+=" if [[ -d '/cache' ]]; then "
|
||||
COMMAND+=" echo restoring installation cache... ; "
|
||||
COMMAND+=" rm -rf /tmp/cache ; "
|
||||
COMMAND+=" ln -sf /cache /tmp/cache ; "
|
||||
COMMAND+=" fi ; "
|
||||
COMMAND+=" $SCRIPT_CMD ;"
|
||||
COMMAND+=" if [[ -d '/cache' ]]; then "
|
||||
COMMAND+=" echo removing installation cache... ; "
|
||||
COMMAND+=" rm -f /tmp/cache ; "
|
||||
COMMAND+=" fi "
|
||||
|
||||
local CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP")
|
||||
# strip --restart args from DOCKER_ARGS
|
||||
local DOCKER_ARGS=$(sed -e "s/--restart=[[:graph:]]\+[[:blank:]]\?//g" <<< "$DOCKER_ARGS")
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
local id=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_DIR:/cache" $DOCKER_ARGS "$IMAGE" /bin/bash -c "$COMMAND")
|
||||
test "$(docker wait "$id")" -eq 0 || (dokku_container_log_verbose_quiet "$id"; exit 1)
|
||||
dokku_container_log_verbose_quiet "$id"
|
||||
if [[ "$PHASE_SCRIPT_KEY" != "postdeploy" ]];then
|
||||
docker commit "$id" "$IMAGE" > /dev/null
|
||||
local id=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_DIR:/cache" $DOCKER_ARGS "$IMAGE" /bin/bash -c "$COMMAND")
|
||||
if test "$(docker wait "$id")" -eq 0; then
|
||||
dokku_container_log_verbose_quiet "$id"
|
||||
if [[ "$PHASE_SCRIPT_KEY" != "postdeploy" ]];then
|
||||
if ! is_image_herokuish_based "$IMAGE"; then
|
||||
local DOKKU_DOCKERFILE_ENTRYPOINT=$(config_get "$APP" DOKKU_DOCKERFILE_ENTRYPOINT)
|
||||
local DOKKU_DOCKERFILE_CMD=$(config_get "$APP" DOKKU_DOCKERFILE_CMD)
|
||||
[[ -n "$DOKKU_DOCKERFILE_ENTRYPOINT" ]] && local DOCKER_COMMIT_ENTRYPOINT_CHANGE_ARG="--change='$DOKKU_DOCKERFILE_ENTRYPOINT'"
|
||||
[[ -n "$DOKKU_DOCKERFILE_CMD" ]] && local DOCKER_COMMIT_CMD_CHANGE_ARG="--change='$DOKKU_DOCKERFILE_CMD'"
|
||||
|
||||
local DOCKER_COMMIT_ARGS="$DOCKER_COMMIT_ENTRYPOINT_CHANGE_ARG $DOCKER_COMMIT_CMD_CHANGE_ARG"
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
eval docker commit $DOCKER_COMMIT_ARGS "$id" "$IMAGE" > /dev/null
|
||||
fi
|
||||
else
|
||||
dokku_container_log_verbose_quiet "$id"
|
||||
dokku_log_fail "execution of '$SCRIPT_CMD' failed!"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.5.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -37,6 +37,12 @@ dokku_build_cmd() {
|
||||
# extract first port from Dockerfile
|
||||
local DOCKERFILE_PORTS=$(get_dockerfile_exposed_ports Dockerfile)
|
||||
[[ -n "$DOCKERFILE_PORTS" ]] && config_set --no-restart "$APP" DOKKU_DOCKERFILE_PORTS="$DOCKERFILE_PORTS"
|
||||
|
||||
# extract ENTRYPOINT/CMD from Dockerfile
|
||||
local DOCKERFILE_ENTRYPOINT=$(extract_directive_from_dockerfile Dockerfile ENTRYPOINT)
|
||||
[[ -n "$DOCKERFILE_ENTRYPOINT" ]] && config_set --no-restart "$APP" DOKKU_DOCKERFILE_ENTRYPOINT="$DOCKERFILE_ENTRYPOINT"
|
||||
local DOCKERFILE_CMD=$(extract_directive_from_dockerfile Dockerfile CMD)
|
||||
[[ -n "$DOCKERFILE_CMD" ]] && config_set --no-restart "$APP" DOKKU_DOCKERFILE_CMD="$DOCKERFILE_CMD"
|
||||
plugn trigger pre-build-dockerfile "$APP"
|
||||
|
||||
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
|
||||
|
||||
@@ -20,13 +20,13 @@ dokku_deploy_cmd() {
|
||||
local DOKKU_DEFAULT_DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG")
|
||||
local DOKKU_IS_APP_PROXY_ENABLED="$(is_app_proxy_enabled "$APP")"
|
||||
|
||||
local line
|
||||
local line; local PROC_TYPE; local PROC_COUNT; local CONTAINER_INDEX
|
||||
while read -r line || [[ -n "$line" ]]; do
|
||||
[[ "$line" =~ ^#.* ]] && continue
|
||||
local TRIM=${line%#*}
|
||||
local PROC_TYPE=${TRIM%%=*}
|
||||
local PROC_COUNT=${TRIM#*=}
|
||||
local CONTAINER_INDEX=1
|
||||
line="$(strip_inline_comments "$line")"
|
||||
PROC_TYPE=${line%%=*}
|
||||
PROC_COUNT=${line#*=}
|
||||
CONTAINER_INDEX=1
|
||||
|
||||
while [[ $CONTAINER_INDEX -le $PROC_COUNT ]]; do
|
||||
local id=""; local port=""; local ipaddr=""
|
||||
@@ -43,7 +43,6 @@ dokku_deploy_cmd() {
|
||||
|
||||
if [[ -z "$DOKKU_HEROKUISH" ]]; then
|
||||
local DOKKU_DOCKERFILE_PORTS=($(config_get "$APP" DOKKU_DOCKERFILE_PORTS || true))
|
||||
local DOKKU_DOCKERFILE_PORT=$(config_get "$APP" DOKKU_DOCKERFILE_PORT || true)
|
||||
local DOKKU_DOCKERFILE_START_CMD=$(config_get "$APP" DOKKU_DOCKERFILE_START_CMD || true)
|
||||
local DOKKU_PROCFILE_START_CMD=$(get_cmd_from_procfile "$APP" "$PROC_TYPE")
|
||||
local START_CMD=${DOKKU_DOCKERFILE_START_CMD:-$DOKKU_PROCFILE_START_CMD}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core build-env plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -38,9 +38,9 @@ certs_set() {
|
||||
is_file_import "$CRT_FILE" "$KEY_FILE" || is_tar_import || dokku_log_fail "Tar archive containing server.crt and server.key expected on stdin"
|
||||
|
||||
if is_tar_import; then
|
||||
local TEMP_DIR=$(mktemp -d -t "dokku_certs_set.XXXX")
|
||||
pushd "$TEMP_DIR" &> /dev/null
|
||||
trap 'popd &> /dev/null || true; rm -rf $TEMP_DIR > /dev/null' RETURN
|
||||
local CERTS_SET_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_certs_set.XXXX")
|
||||
pushd "$CERTS_SET_TMP_WORK_DIR" &> /dev/null
|
||||
trap 'popd &> /dev/null || true; rm -rf $CERTS_SET_TMP_WORK_DIR > /dev/null' RETURN
|
||||
tar xvf - <&0
|
||||
|
||||
local CRT_FILE_SEARCH=$(find . -not -path '*/\.*' -type f -name "*.crt")
|
||||
|
||||
@@ -12,9 +12,9 @@ certs_generate_cmd() {
|
||||
local APP="$2"; local DOMAIN="$3"; local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
|
||||
|
||||
if [[ ! -f "$APP_SSL_PATH/server.key" ]] && [[ ! -f "$APP_SSL_PATH/server.crt" ]]; then
|
||||
local TMP_WORK_DIR=$(mktemp -d -t "dokku_certs.XXXXXXXXX")
|
||||
pushd "$TMP_WORK_DIR" > /dev/null
|
||||
trap 'popd &> /dev/null || true; rm -rf "$TMP_WORK_DIR" > /dev/null' INT TERM EXIT
|
||||
local CERTS_GENERATE_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_certs.XXXXXXXXX")
|
||||
pushd "$CERTS_GENERATE_TMP_WORK_DIR" > /dev/null
|
||||
trap 'popd &> /dev/null || true; rm -rf "$CERTS_GENERATE_TMP_WORK_DIR" > /dev/null' INT TERM EXIT
|
||||
|
||||
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
|
||||
openssl rsa -passin pass:x -in server.pass.key -out server.key
|
||||
@@ -23,7 +23,7 @@ certs_generate_cmd() {
|
||||
|
||||
mkdir -p "$APP_SSL_PATH"
|
||||
dokku_log_info1 "Installing certificate and key..."
|
||||
mv -f "$TMP_WORK_DIR/server.key" "$TMP_WORK_DIR/server.crt" "$APP_SSL_PATH"
|
||||
mv -f "$CERTS_GENERATE_TMP_WORK_DIR/server.key" "$CERTS_GENERATE_TMP_WORK_DIR/server.crt" "$APP_SSL_PATH"
|
||||
chmod 750 "$APP_SSL_PATH"
|
||||
chmod 640 "$APP_SSL_PATH/server.key" "$APP_SSL_PATH/server.crt"
|
||||
[[ -n "$DOMAIN" ]] && (domains_add "$APP" "$DOMAIN" || nginx_build_config "$APP")
|
||||
|
||||
@@ -58,7 +58,7 @@ checks_check_deploy() {
|
||||
eval "$(config_export global)"
|
||||
eval "$(config_export app "$APP")"
|
||||
|
||||
if [[ "$(is_app_checks_enabled "$APP")" == "false" ]];then
|
||||
if [[ "$(is_app_checks_enabled "$APP")" == "false" ]]; then
|
||||
dokku_log_info2_quiet "Zero downtime checks for app ($APP) have been disabled. moving on..."
|
||||
exit 0
|
||||
fi
|
||||
@@ -74,24 +74,24 @@ checks_check_deploy() {
|
||||
# docker cp exits with status 1 when run as non-root user when it tries to chown the file
|
||||
# after successfully copying the file. Thus, we suppress stderr.
|
||||
# ref: https://github.com/dotcloud/docker/issues/3986
|
||||
local TMPDIR=$(mktemp -d /tmp/dokku_CHECKS.XXXXX)
|
||||
docker cp $DOKKU_APP_CONTAINER_ID:/app/CHECKS "$TMPDIR" 2> /dev/null || true
|
||||
local CHECK_DEPLOY_TMP_WORK_DIR=$(mktemp -d /tmp/dokku_CHECKS.XXXXX)
|
||||
docker cp $DOKKU_APP_CONTAINER_ID:/app/CHECKS "$CHECK_DEPLOY_TMP_WORK_DIR" 2> /dev/null || true
|
||||
|
||||
local FILENAME=${TMPDIR}/CHECKS
|
||||
local FILENAME=${CHECK_DEPLOY_TMP_WORK_DIR}/CHECKS
|
||||
|
||||
cleanup() {
|
||||
declare desc="cleans up TMPDIR and print container output"
|
||||
checks_check_deploy_cleanup() {
|
||||
declare desc="cleans up CHECK_DEPLOY_TMP_WORK_DIR and print container output"
|
||||
local id="$1"
|
||||
rm -rf "$TMPDIR"
|
||||
rm -rf "$CHECK_DEPLOY_TMP_WORK_DIR" &> /dev/null || true
|
||||
if [[ $id ]]; then
|
||||
dokku_log_info2_quiet "$APP $DOKKU_APP_CONTAINER_TYPE container output:"
|
||||
dokku_container_log_verbose_quiet "$id"
|
||||
dokku_log_info2_quiet "end $APP $DOKKU_APP_CONTAINER_TYPE container output"
|
||||
fi
|
||||
}
|
||||
trap 'cleanup $DOKKU_APP_CONTAINER_ID' RETURN INT TERM EXIT
|
||||
trap 'checks_check_deploy_cleanup $DOKKU_APP_CONTAINER_ID' RETURN INT TERM EXIT
|
||||
|
||||
if [[ ! -s "${TMPDIR}/CHECKS" ]] || [[ "$DOKKU_APP_CONTAINER_TYPE" != "web" ]]; then
|
||||
if [[ ! -s "${CHECK_DEPLOY_TMP_WORK_DIR}/CHECKS" ]] || [[ "$DOKKU_APP_CONTAINER_TYPE" != "web" ]]; then
|
||||
# We allow custom check for web instances only
|
||||
if [[ "$DOKKU_APP_CONTAINER_TYPE" == "web" ]]; then
|
||||
dokku_log_verbose "For more efficient zero downtime deployments, create a file CHECKS."
|
||||
@@ -101,7 +101,7 @@ checks_check_deploy() {
|
||||
dokku_log_verbose "Non web container detected: Running default container check..."
|
||||
fi
|
||||
|
||||
rm -rf "$TMPDIR"
|
||||
rm -rf "$CHECK_DEPLOY_TMP_WORK_DIR" &> /dev/null || true
|
||||
|
||||
# simple default check to see if the container stuck around
|
||||
local DOKKU_DEFAULT_CHECKS_WAIT="${DOKKU_DEFAULT_CHECKS_WAIT:-10}"
|
||||
@@ -115,18 +115,24 @@ checks_check_deploy() {
|
||||
dokku_log_fail "App container failed to start!!"
|
||||
fi
|
||||
|
||||
trap - EXIT
|
||||
dokku_log_info1 "Default container check successful!" && exit 0
|
||||
fi
|
||||
|
||||
# ensure CHECKS file has trailing newline
|
||||
if [[ "$(tail -c1 "$FILENAME")" != "" ]]; then
|
||||
echo "" >> "$FILENAME"
|
||||
fi
|
||||
|
||||
# Reads name/value pairs, sets the WAIT and TIMEOUT variables
|
||||
exec < "$FILENAME"
|
||||
local LINE
|
||||
while read -r LINE; do
|
||||
local line; local NAME; local VALUE
|
||||
while read -r line; do
|
||||
line=$(strip_inline_comments "$line")
|
||||
# Name/value pair
|
||||
if [[ "$LINE" =~ ^.+= ]]; then
|
||||
local TRIM=${LINE%#*}
|
||||
local NAME=${TRIM%=*}
|
||||
local VALUE=${TRIM#*=}
|
||||
if [[ "$line" =~ ^.+= ]]; then
|
||||
NAME=${line%=*}
|
||||
VALUE=${line#*=}
|
||||
[[ "$NAME" = "WAIT" ]] && local WAIT=$VALUE
|
||||
[[ "$NAME" = "TIMEOUT" ]] && local TIMEOUT=$VALUE
|
||||
[[ "$NAME" = "ATTEMPTS" ]] && local ATTEMPTS=$VALUE
|
||||
@@ -150,8 +156,8 @@ checks_check_deploy() {
|
||||
local CURL_OPTIONS="-q --compressed --fail --location --max-time $TIMEOUT"
|
||||
|
||||
# Set X-Forwarded-Proto header if TLS is enabled.
|
||||
local SSL="$DOKKU_ROOT/$APP/tls"; local WILDCARD_SSL="$DOKKU_ROOT/tls"
|
||||
if [[ -e "$SSL/server.crt" && -e "$SSL/server.key" ]] || [[ -e "$WILDCARD_SSL/server.crt" && -e "$WILDCARD_SSL/server.key" ]]; then
|
||||
local SSL="$DOKKU_ROOT/$APP/tls"
|
||||
if [[ -e "$SSL/server.crt" && -e "$SSL/server.key" ]]; then
|
||||
local CURL_OPTIONS+=" -H X-Forwarded-Proto:https"
|
||||
fi
|
||||
|
||||
@@ -226,6 +232,7 @@ checks_check_deploy() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap - EXIT
|
||||
dokku_log_info1 "All checks successful!"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.5.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -6,11 +6,10 @@ source "$PLUGIN_AVAILABLE_PATH/checks/functions"
|
||||
checks_main_cmd() {
|
||||
declare desc="displays app zero-downtime status"
|
||||
local cmd="checks"
|
||||
local ALL_APPS=$(dokku_apps)
|
||||
local APPS=$(dokku_apps)
|
||||
if [[ -n "$1" ]]; then
|
||||
local APP="$1"
|
||||
local APPS="$1"
|
||||
fi
|
||||
local APPS=${APP:="$ALL_APPS"}
|
||||
|
||||
dokku_col_log_info1_quiet "App Name" "Zero-Downtime Status"
|
||||
local app
|
||||
|
||||
@@ -311,16 +311,17 @@ get_app_running_container_ids() {
|
||||
get_cmd_from_procfile() {
|
||||
declare desc="parse cmd from app Procfile"
|
||||
local APP=$1; local PROC_TYPE=$2; local DOKKU_PROCFILE="$DOKKU_ROOT/$APP/DOKKU_PROCFILE"
|
||||
local name; local command;
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -f $DOKKU_PROCFILE ]]; then
|
||||
local line; local name; local command
|
||||
while read line || [[ -n "$line" ]]; do
|
||||
if [[ -z "$line" ]] || [[ "$line" == "#"* ]]; then
|
||||
continue
|
||||
fi
|
||||
local name="${line%%:*}"
|
||||
local command="${line#*:[[:space:]]}"
|
||||
line=$(strip_inline_comments "$line")
|
||||
name="${line%%:*}"
|
||||
command="${line#*:[[:space:]]}"
|
||||
[[ "$name" == "$PROC_TYPE" ]] && echo "$command" && break
|
||||
done < "$DOKKU_PROCFILE"
|
||||
fi
|
||||
@@ -570,6 +571,13 @@ get_dockerfile_exposed_ports() {
|
||||
echo "$DOCKERFILE_PORTS"
|
||||
}
|
||||
|
||||
extract_directive_from_dockerfile() {
|
||||
declare desc="return requested directive from passed file path"
|
||||
local FILE_PATH="$1"; local SEARCH_STRING="$2"
|
||||
local FOUND_LINE=$(egrep "^${SEARCH_STRING} " "$FILE_PATH" | tail -n1) || true
|
||||
echo "$FOUND_LINE"
|
||||
}
|
||||
|
||||
get_app_raw_tcp_ports() {
|
||||
declare desc="extracts raw tcp port numbers from DOCKERFILE_PORTS config variable"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
@@ -689,3 +697,11 @@ get_json_keys() {
|
||||
cat | python -c 'import json,sys;obj=json.load(sys.stdin);print " ".join(obj'"${JSON_NODE}"'.keys())';
|
||||
fi
|
||||
}
|
||||
|
||||
strip_inline_comments() {
|
||||
declare desc="removes bash-style comment from input line"
|
||||
local line="$1"
|
||||
local stripped_line="${line%[[:space:]]#*}"
|
||||
|
||||
echo "$stripped_line"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.5.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core config plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core docker-options plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core domains plugin"
|
||||
version = "0.5.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core enter plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -10,17 +10,17 @@ git_build_app_repo() {
|
||||
local APP="$1"; local REV="$2"
|
||||
|
||||
# clean up after ourselves
|
||||
local TMP_WORK_DIR=$(mktemp -d -t "dokku_git.XXXX")
|
||||
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
|
||||
local GIT_BUILD_APP_REPO_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_git.XXXX")
|
||||
trap 'rm -rf "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
|
||||
|
||||
|
||||
# git clone - this method creates a new git repository and adds the primary
|
||||
# repo as a remote, then does a fetch depth=1 to avoid cloning
|
||||
# the entire repo
|
||||
local TMP_TAG="dokku/$REV"
|
||||
chmod 755 "$TMP_WORK_DIR"
|
||||
chmod 755 "$GIT_BUILD_APP_REPO_TMP_WORK_DIR"
|
||||
unset GIT_DIR GIT_WORK_TREE
|
||||
pushd "$TMP_WORK_DIR" > /dev/null
|
||||
pushd "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" > /dev/null
|
||||
[[ ! -d "$DOKKU_ROOT/$APP" ]] && apps_create "$APP"
|
||||
GIT_DIR="$DOKKU_ROOT/$APP" git tag -d "$TMP_TAG" &> /dev/null || true
|
||||
GIT_DIR="$DOKKU_ROOT/$APP" git tag "$TMP_TAG" "$REV" &> /dev/null
|
||||
@@ -34,11 +34,11 @@ git_build_app_repo() {
|
||||
find -name .git -prune -exec rm -rf {} \; > /dev/null
|
||||
|
||||
if [[ -f Dockerfile ]] && [[ "$([[ -f .env ]] && grep -q BUILDPACK_URL .env; echo $?)" != "0" ]] && [[ ! -f ".buildpacks" ]] && [[ -z $(config_get "$APP" BUILDPACK_URL || true) ]]; then
|
||||
plugn trigger pre-receive-app "$APP" "dockerfile" "$TMP_WORK_DIR" "$REV"
|
||||
dokku receive "$APP" "dockerfile" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
|
||||
plugn trigger pre-receive-app "$APP" "dockerfile" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV"
|
||||
dokku receive "$APP" "dockerfile" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
|
||||
else
|
||||
plugn trigger pre-receive-app "$APP" "herokuish" "$TMP_WORK_DIR" "$REV"
|
||||
dokku receive "$APP" "herokuish" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
|
||||
plugn trigger pre-receive-app "$APP" "herokuish" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV"
|
||||
dokku receive "$APP" "herokuish" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core git plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core logs plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core named containers plugin"
|
||||
version = "0.4.0.1"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -155,11 +155,11 @@ nginx_build_config() {
|
||||
local PASSED_LISTEN_IP_PORT=true
|
||||
fi
|
||||
|
||||
local TMPDIR=$(mktemp -d /tmp/dokku_nginx_template.XXXXX)
|
||||
local NGINX_CONF=$(mktemp -p "${TMPDIR}" -t "nginx.conf.XXXXXX")
|
||||
local CUSTOM_NGINX_TEMPLATE="$TMPDIR/$NGINX_TEMPLATE_NAME"
|
||||
local NGINX_BUILD_CONFIG_TMP_WORK_DIR=$(mktemp -d /tmp/dokku_nginx_template.XXXXX)
|
||||
local NGINX_CONF=$(mktemp --tmpdir="${NGINX_BUILD_CONFIG_TMP_WORK_DIR}" "nginx.conf.XXXXXX")
|
||||
local CUSTOM_NGINX_TEMPLATE="$NGINX_BUILD_CONFIG_TMP_WORK_DIR/$NGINX_TEMPLATE_NAME"
|
||||
# shellcheck disable=SC2086
|
||||
trap 'rm -rf $NGINX_CONF $TMPDIR > /dev/null' RETURN INT TERM EXIT
|
||||
trap 'rm -rf $NGINX_CONF $NGINX_BUILD_CONFIG_TMP_WORK_DIR > /dev/null' RETURN INT TERM EXIT
|
||||
|
||||
get_custom_nginx_template "$APP" "$CUSTOM_NGINX_TEMPLATE"
|
||||
if [[ -f "$CUSTOM_NGINX_TEMPLATE" ]]; then
|
||||
|
||||
@@ -33,8 +33,6 @@ ssl_session_timeout 10m;
|
||||
|
||||
ssl_ciphers EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
|
||||
|
||||
# ssl_certificate $DOKKU_ROOT/tls/server.crt;
|
||||
# ssl_certificate_key $DOKKU_ROOT/tls/server.key;
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core nginx-vhosts plugin"
|
||||
version = "0.5.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -26,8 +26,8 @@ server {
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
|
||||
}
|
||||
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
|
||||
{{ if $.DOKKU_APP_LISTENERS }}
|
||||
upstream {{ $.APP }}-{{ $port }} {
|
||||
{{ range $.DOKKU_APP_LISTENERS | split " " }} server {{ . }}:{{ $port }};{{ end }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core plugin plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core proxy plugin"
|
||||
version = "0.5.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -44,8 +44,8 @@ generate_scale_file() {
|
||||
if [[ ! -f $DOKKU_SCALE_FILE ]]; then
|
||||
dokku_log_info1_quiet "DOKKU_SCALE file not found in app image. Generating one based on Procfile..."
|
||||
|
||||
local TMP_WORK_DIR=$(mktemp -d -t "dokku_scale.XXXX")
|
||||
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN
|
||||
local GENERATE_SCALE_FILE_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_scale.XXXX")
|
||||
trap 'rm -rf "$GENERATE_SCALE_FILE_TMP_WORK_DIR" > /dev/null' RETURN
|
||||
|
||||
if [[ -f $DOKKU_PROCFILE ]]; then
|
||||
while read -r line || [[ -n "$line" ]]; do
|
||||
@@ -128,9 +128,11 @@ ps_restart() {
|
||||
local APP="$1"; verify_app_name "$APP"
|
||||
local IMAGE_TAG=$(get_running_image_tag "$APP")
|
||||
|
||||
! (is_deployed "$APP") && echo "App $APP has not been deployed" && exit 0
|
||||
|
||||
release_and_deploy "$APP" "$IMAGE_TAG"
|
||||
if is_deployed "$APP"; then
|
||||
release_and_deploy "$APP" "$IMAGE_TAG"
|
||||
else
|
||||
echo "App $APP has not been deployed"
|
||||
fi
|
||||
}
|
||||
|
||||
ps_scale() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ps plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core shell plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core storage plugin"
|
||||
version = "0.5.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tags plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tar plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.5.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -11,12 +11,12 @@ tar_build_locked_cmd() {
|
||||
shift 2
|
||||
|
||||
# clean up after ourselves
|
||||
local TMP_WORK_DIR=$(mktemp -d -t "dokku_tar.XXXX")
|
||||
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
|
||||
local TAR_BUILD_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_tar.XXXX")
|
||||
trap 'rm -rf "$TAR_BUILD_TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
|
||||
|
||||
# extract tar file
|
||||
chmod 755 "$TMP_WORK_DIR"
|
||||
pushd "$TMP_WORK_DIR" > /dev/null
|
||||
chmod 755 "$TAR_BUILD_TMP_WORK_DIR"
|
||||
pushd "$TAR_BUILD_TMP_WORK_DIR" > /dev/null
|
||||
|
||||
# Detect a common prefix that all files in the tar have, and strip off each directory found in it
|
||||
local COMMON_PREFIX=$(tar -tf "$DOKKU_ROOT/$APP/src.tar" | sed -e 'N;s/^\(.*\).*\n\1.*$/\1\n\1/;D')
|
||||
@@ -24,15 +24,15 @@ tar_build_locked_cmd() {
|
||||
|
||||
dokku_log_info1_quiet "Striping $BOGUS_PARTS worth of directories from tarball"
|
||||
|
||||
tar -x -C "$TMP_WORK_DIR" -f "$DOKKU_ROOT/$APP/src.tar" --strip-components="$BOGUS_PARTS"
|
||||
chmod -R u+r "$TMP_WORK_DIR"
|
||||
tar -x -C "$TAR_BUILD_TMP_WORK_DIR" -f "$DOKKU_ROOT/$APP/src.tar" --strip-components="$BOGUS_PARTS"
|
||||
chmod -R u+r "$TAR_BUILD_TMP_WORK_DIR"
|
||||
|
||||
if [[ -f Dockerfile ]] && [[ "$([[ -f .env ]] && grep -q BUILDPACK_URL .env; echo $?)" != "0" ]] && [[ ! -f ".buildpacks" ]]; then
|
||||
plugn trigger pre-receive-app "$APP" "dockerfile" "$TMP_WORK_DIR"
|
||||
dokku receive "$APP" "dockerfile" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
|
||||
plugn trigger pre-receive-app "$APP" "dockerfile" "$TAR_BUILD_TMP_WORK_DIR"
|
||||
dokku receive "$APP" "dockerfile" "$TAR_BUILD_TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
|
||||
else
|
||||
plugn trigger pre-receive-app "$APP" "herokuish" "$TMP_WORK_DIR"
|
||||
dokku receive "$APP" "herokuish" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
|
||||
plugn trigger pre-receive-app "$APP" "herokuish" "$TAR_BUILD_TMP_WORK_DIR"
|
||||
dokku receive "$APP" "herokuish" "$TAR_BUILD_TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
WAIT=2 # wait 2 seconds
|
||||
TIMEOUT=5 # set timeout to 5 seconds
|
||||
ATTEMPTS=2 # try 2 times
|
||||
|
||||
/ Hello World!
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
WAIT=2 # wait 2 seconds
|
||||
TIMEOUT=5 # set timeout to 5 seconds
|
||||
ATTEMPTS=2 # try 2 times
|
||||
|
||||
/ nodejs/express
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
WAIT=2 # wait 2 seconds
|
||||
TIMEOUT=5 # set timeout to 5 seconds
|
||||
ATTEMPTS=2 # try 2 times
|
||||
|
||||
/ Hello World!
|
||||
|
||||
38
tests/apps/dockerfile/app.json
Normal file
38
tests/apps/dockerfile/app.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "Sample node.js express app",
|
||||
"description": "Used in dokku's test suite",
|
||||
"keywords": [
|
||||
"nodejs",
|
||||
"express",
|
||||
"testing"
|
||||
],
|
||||
"website": "http://dokku.viewdocs.io/dokku/",
|
||||
"repository": "https://github.com/dokku/dokku",
|
||||
"logo": "https://raw.githubusercontent.com/dokku/dokku/master/docs/assets/dokku.png",
|
||||
"scripts": {
|
||||
"dokku": {
|
||||
"predeploy": "touch /app/predeploy.test",
|
||||
"postdeploy": "touch /app/postdeploy.test"
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"SECRET_TOKEN": {
|
||||
"description": "A secret key for verifying the integrity of signed cookies.",
|
||||
"value": "secret"
|
||||
},
|
||||
"WEB_CONCURRENCY": {
|
||||
"description": "The number of processes to run.",
|
||||
"generator": "echo 5"
|
||||
}
|
||||
},
|
||||
"image": "gliderlabs/herokuish",
|
||||
"addons": [
|
||||
"dokku-postgres",
|
||||
"dokku-redis"
|
||||
],
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "https://github.com/heroku/heroku-buildpack-nodejs"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1 +1,5 @@
|
||||
/ nodejs/express
|
||||
WAIT=2 # wait 2 seconds
|
||||
TIMEOUT=5 # set timeout to 5 seconds
|
||||
ATTEMPTS=2 # try 2 times
|
||||
|
||||
/ nodejs/express
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
# Procfile for development using the new threaded worker (scheduler, twitter stream and delayed job)
|
||||
cron: node worker.js
|
||||
web: node web.js
|
||||
web: node web.js # testing inline comment
|
||||
worker: node worker.js
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ succeeded() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
TMP=$(mktemp -d -t "$TARGET.XXXXX")
|
||||
TMP=$(mktemp -d "/tmp/$TARGET.XXXXX")
|
||||
rmdir "$TMP" && cp -r "$(dirname "$SELF")/$APP" "$TMP"
|
||||
|
||||
pushd "$TMP" &> /dev/null || exit 1
|
||||
|
||||
@@ -12,7 +12,7 @@ teardown() {
|
||||
|
||||
deploy_app_tar() {
|
||||
APP_TYPE="$1"; APP_TYPE=${APP_TYPE:="nodejs-express"}
|
||||
TMP=$(mktemp -d -t "dokku.me.XXXXX")
|
||||
TMP=$(mktemp -d "/tmp/dokku.me.XXXXX")
|
||||
|
||||
rmdir "$TMP" && cp -r "./tests/apps/$APP_TYPE" "$TMP"
|
||||
pushd "$TMP" &> /dev/null || exit 1
|
||||
|
||||
@@ -8,7 +8,7 @@ setup() {
|
||||
}
|
||||
|
||||
teardown() {
|
||||
rm -rf /home/dokku/$TEST_APP/tls /home/dokku/tls
|
||||
rm -rf /home/dokku/$TEST_APP/tls
|
||||
destroy_app
|
||||
dokku config:unset --global DOKKU_RM_CONTAINER
|
||||
rm -f "$DOCKERFILE"
|
||||
|
||||
@@ -7,7 +7,7 @@ setup() {
|
||||
}
|
||||
|
||||
teardown() {
|
||||
rm -rf /home/dokku/$TEST_APP/tls /home/dokku/tls
|
||||
rm -rf /home/dokku/$TEST_APP/tls
|
||||
destroy_app
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ assert_http_redirect() {
|
||||
deploy_app() {
|
||||
local APP_TYPE="$1"; local APP_TYPE=${APP_TYPE:="nodejs-express"}
|
||||
local GIT_REMOTE="$2"; local GIT_REMOTE=${GIT_REMOTE:="dokku@dokku.me:$TEST_APP"}
|
||||
local CUSTOM_TEMPLATE="$3"; local TMP=$(mktemp -d -t "dokku.me.XXXXX")
|
||||
local CUSTOM_TEMPLATE="$3"; local TMP=$(mktemp -d "/tmp/dokku.me.XXXXX")
|
||||
local CUSTOM_PATH="$4"
|
||||
|
||||
rmdir "$TMP" && cp -r "./tests/apps/$APP_TYPE" "$TMP"
|
||||
@@ -200,7 +200,7 @@ deploy_app() {
|
||||
}
|
||||
|
||||
setup_client_repo() {
|
||||
local TMP=$(mktemp -d -t "dokku.me.XXXXX")
|
||||
local TMP=$(mktemp -d "/tmp/dokku.me.XXXXX")
|
||||
rmdir "$TMP" && cp -r ./tests/apps/nodejs-express "$TMP"
|
||||
cd "$TMP" || exit 1
|
||||
git init
|
||||
|
||||
Reference in New Issue
Block a user