Compare commits

...

57 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
f328a9940b Release 0.5.4 2016-04-05 03:09:29 -04:00
Jose Diaz-Gonzalez
1ef5b92910 Merge pull request #2072 from dokku/2071_mh-clarify-dockerfile-expose
note that we only support one EXPOSE port per line in dockerfiles
2016-04-04 15:36:08 -04:00
Michael Hobbs
1dd07aeda9 [ci skip] note that we only support one EXPOSE port per line in dockerfiles. closes #2071 2016-04-04 12:34:56 -07:00
Jose Diaz-Gonzalez
1628f60553 Merge pull request #2070 from dokku/upgrade-sshcommand
Upgrade sshcommand
2016-04-03 23:37:27 -04:00
Jose Diaz-Gonzalez
970f4489d4 Upgrade to sshcommand 0.4.0 2016-04-03 20:22:03 -04:00
Jose Diaz-Gonzalez
997cec4b9b Upgrade to sshcommand 0.3.0 2016-04-03 20:21:01 -04:00
Jose Diaz-Gonzalez
127b7a15b5 Merge pull request #2068 from dokku/sshcommand-packaging
Use latest sshcommand when installing via debian
2016-04-02 23:03:11 -04:00
Jose Diaz-Gonzalez
bbf310147e Upgrade sshcommand to 0.2.0 2016-04-02 22:22:50 -04:00
Jose Diaz-Gonzalez
858240874c Update packaging to use released sshcommand version 2016-04-02 22:20:39 -04:00
Jose Diaz-Gonzalez
7bddd8751e Use released sshcommand
This is what we actually give users who install via the preferred method, and thus we shouldn't be running tests from master.
2016-04-02 22:20:26 -04:00
Jose Diaz-Gonzalez
0540c254d0 Merge pull request #2065 from dokku/2062_mh-app-json-exit-on-error
fix pre/post deploy support for dockerfile apps
2016-04-02 05:12:07 -04:00
Michael Hobbs
6caed369d7 set pipefail on pre/post deploy tasks. fix pre/post deploy support for dockerfile apps. closes #2062 2016-04-01 14:06:35 -07:00
Jose Diaz-Gonzalez
9da47d84e0 Merge pull request #2060 from dokku/mh-filter-restart-exec-json
filter restart policies from exec-app-json containers
2016-04-01 13:13:42 -04:00
Michael Hobbs
6450f9332a Merge pull request #2061 from znz/fix-settings-in-checks-file
Fix ignored settings in the CHECKS file
2016-03-31 22:43:29 -07:00
Kazuhiro NISHIYAMA
722564b2da Fix ignored settings in the CHECKS file 2016-04-01 13:55:25 +09:00
Michael Hobbs
a93e180a89 filter restart policies from exec-app-json containers 2016-03-31 15:29:04 -07:00
Jose Diaz-Gonzalez
8cbc36fd22 Merge pull request #2058 from dokku/2057_mh-remove-global-tls-refs
remove references to global TLS certs
2016-03-31 13:02:16 -04:00
Michael Hobbs
8d84721882 Merge pull request #2055 from vshn/fix_include
move include to server section
2016-03-31 07:54:48 -07:00
Michael Hobbs
c739c770f7 remove references to global TLS certs. closes #2057 2016-03-31 07:52:19 -07:00
Tobias Brunner
d01961424d move include to server section
This replicates the behaviour of location.config and makes the
letsencrypt plugin usable again for Dockerfile deployments
2016-03-31 09:43:44 +02:00
Jose Diaz-Gonzalez
e114ab3f20 Merge pull request #2052 from dokku/2048-upstream-packaging
Use upstream releases when creating deb packages. Closes #2048
2016-03-30 19:48:18 -04:00
Jose Diaz-Gonzalez
ebd185a798 Merge pull request #2051 from plieningerweb/patch-1
Fix installation instructions in docs
2016-03-30 15:45:57 -04:00
Jose Diaz-Gonzalez
eb4e5957cd Use upstream releases when creating deb packages. Closes #2048
- drop golang dependency
- use wget to retrieve upstream dependency

[ci skip]
2016-03-30 15:45:32 -04:00
plieningerweb
429eb4af83 Fix installation instructions in docs
Clearly stress the fact, that there are more steps than only running the bash commands. You also have to navigate to the website and finish the configuration.
2016-03-30 19:19:58 +02:00
Jose Diaz-Gonzalez
fb88783f9d Merge pull request #2049 from mmlkrx/patch-1
Fix typo in deployment-tasks.md
2016-03-30 02:39:09 -04:00
Matthias Loker
aa2f02b1d2 Fix typo in deployment-tasks.md 2016-03-30 08:31:14 +02:00
Jose Diaz-Gonzalez
9dfe14fe33 Release 0.5.3 2016-03-30 01:24:14 -04:00
Jose Diaz-Gonzalez
71b040cabe Merge pull request #2030 from dokku/2029-fix-variable-iteration
Fix setting of APPS when $1 is left unspecified
2016-03-30 01:09:36 -04:00
Jose Diaz-Gonzalez
4a310dc53f Merge pull request #2047 from dokku/2040_mh-mktemp-cleanup
remove deprecated mktemp args and name vars more clearly
2016-03-30 00:15:04 -04:00
Jose Diaz-Gonzalez
e7e249d1d3 Ensure we release the trap avoid running cleanup twice 2016-03-29 23:31:03 -04:00
Jose Diaz-Gonzalez
af97275139 Rename the cleanup command to make it more readable in logging output 2016-03-29 23:29:41 -04:00
Michael Hobbs
9ce7470b87 remove deprecated mktemp args and name vars more clearly 2016-03-29 19:46:46 -07:00
Michael Hobbs
8a4b2f9a2e Merge pull request #2046 from dokku/2044_mh-support-inline-comments
strip inline comments from CHECKS and Procfile
2016-03-29 18:17:56 -07:00
Jose Diaz-Gonzalez
823b5c27da Merge pull request #2045 from dokku/u2mejc-issue2028
Reword dockerfiles.md to clarify EXPOSE handling in 0.5.x
2016-03-29 19:26:13 -04:00
Michael Hobbs
7e1516bdf5 strip inline comments from CHECKS and Procfile. closes #2044 2016-03-29 16:22:00 -07:00
Justin Clark
3eb9a50921 Reword dockerfiles.md to clarify EXPOSE handling in 0.5.x 2016-03-29 15:56:30 -07:00
Michael Hobbs
6ed457d1f7 Merge pull request #2042 from dokku/2037_mh-checks-newline
ensure CHECKS file has trailing newline
2016-03-29 15:56:07 -07:00
Jose Diaz-Gonzalez
3b076f6f01 Merge pull request #2043 from dokku/2028_mh-clarify-dockerfile-ports
clarify dockerfile port exposure. remove reference to DOKKU_DOCKERFILE_PORT
2016-03-29 14:44:20 -04:00
Michael Hobbs
45551c3c5b clarify dockerfile port exposure. remove reference to DOKKU_DOCKERFILE_PORT. closes #2028 2016-03-29 11:31:14 -07:00
Michael Hobbs
8c31c8105e ensure CHECKS file has trailing newline. closes #2037 2016-03-29 11:10:48 -07:00
Jose Diaz-Gonzalez
9ccbc834b5 Merge pull request #2039 from christiangenco/patch-2
Update upgrading.md
2016-03-29 13:18:28 -04:00
Christian Genco
2c409687d5 Update upgrading.md 2016-03-28 21:09:37 -05:00
Michael Hobbs
6c51115e14 Merge pull request #2035 from stesie/patch-1
Fix ps_restart to not exit early
2016-03-28 13:01:17 -07:00
Stefan Siegl
088ee071ca Fix ps_restart to not exit
ps_restartall_cmd calls ps_restart from a loop, if ps_restart exits because of a not deployed app further apps might not be restarted.
2016-03-28 20:34:17 +02:00
Jose Diaz-Gonzalez
c245ba3a5d Merge pull request #2032 from dokku/upstream-docs
Fix upstream positioning in docs. Closes #2031
2016-03-28 03:18:41 -04:00
Jose Diaz-Gonzalez
8cf20db7e1 Fix upstream positioning in docs. Closes #2031
[ci skip]
2016-03-28 03:18:03 -04:00
Jose Diaz-Gonzalez
8c39685ef6 Fix setting of APPS when $1 is left unspecified
Closes #2029
2016-03-28 01:50:58 -04:00
Jose Diaz-Gonzalez
20dfd20416 Fix proxy link
[ci skip]
2016-03-27 20:48:08 -04:00
Jose Diaz-Gonzalez
12ca7adcd1 Release 0.5.2 2016-03-27 17:09:36 -04:00
Jose Diaz-Gonzalez
a4e8efedc8 Merge pull request #2027 from dokku/2025_mh-sigil-deb-dep
add sigil to debian control file
2016-03-27 17:01:49 -04:00
Michael Hobbs
d86ed5d6ee [ci skip] add sigil to debian control file. closes #2025 2016-03-27 10:30:06 -07:00
Jose Diaz-Gonzalez
668dc0e7a5 Release 0.5.1 2016-03-26 19:54:25 -04:00
Jose Diaz-Gonzalez
f5b454e110 Merge pull request #2024 from dokku/delete-bad-symlinks
Delete bad symlinks without confirmation
2016-03-26 19:33:13 -04:00
Jose Diaz-Gonzalez
aefd5bb251 Delete bad symlinks without confirmation
[ci skip]
2016-03-26 19:28:09 -04:00
Jose Diaz-Gonzalez
8b8df9e093 Merge pull request #2023 from dokku/sigil-packaging
Sigil packaging
2016-03-26 19:20:13 -04:00
Jose Diaz-Gonzalez
cdd62b09d3 Correctly build sigil using the sigil makefile
[ci skip]
2016-03-26 19:19:32 -04:00
Jose Diaz-Gonzalez
107697dc95 Clone proper sigil tag for packaging
[ci skip]
2016-03-26 19:19:12 -04:00
68 changed files with 516 additions and 286 deletions

View File

@@ -1,5 +1,69 @@
# History # 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 ## 0.5.0
This is our largest, most feature-packed release in the history of the dokku project. Lots of delicious things, including: This is our largest, most feature-packed release in the history of the dokku project. Lots of delicious things, including:

View File

@@ -1,6 +1,6 @@
DOKKU_VERSION = master 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 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 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 STACK_URL ?= https://github.com/gliderlabs/herokuish.git

View File

@@ -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`: 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 wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh
sudo DOKKU_TAG=v0.5.0 bash bootstrap.sh sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh
### Upgrading ### Upgrading

View File

@@ -9,7 +9,7 @@ import subprocess
import sys import sys
import threading import threading
VERSION = 'v0.5.0' VERSION = 'v0.5.4'
hostname = '' hostname = ''
try: try:

64
deb.mk
View File

@@ -13,23 +13,21 @@ PLUGN_REPO_NAME ?= dokku/plugn
PLUGN_VERSION ?= 0.2.1 PLUGN_VERSION ?= 0.2.1
PLUGN_ARCHITECTURE = amd64 PLUGN_ARCHITECTURE = amd64
PLUGN_PACKAGE_NAME = plugn_$(PLUGN_VERSION)_$(PLUGN_ARCHITECTURE).deb 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_DESCRIPTION = 'Turn SSH into a thin client specifically for your app'
SSHCOMMAND_REPO_NAME ?= dokku/sshcommand SSHCOMMAND_REPO_NAME ?= dokku/sshcommand
SSHCOMMAND_VERSION ?= 0.1.0 SSHCOMMAND_VERSION ?= 0.4.0
SSHCOMMAND_ARCHITECTURE = amd64 SSHCOMMAND_ARCHITECTURE = amd64
SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb 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_DESCRIPTION = 'Standalone string interpolator and template processor'
SIGIL_REPO_NAME ?= gliderlabs/sigil SIGIL_REPO_NAME ?= gliderlabs/sigil
SIGIL_VERSION ?= 0.4.0 SIGIL_VERSION ?= 0.4.0
SIGIL_ARCHITECTURE = amd64 SIGIL_ARCHITECTURE = amd64
SIGIL_PACKAGE_NAME = sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb SIGIL_PACKAGE_NAME = sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb
SIGIL_URL = https://github.com/gliderlabs/sigil/releases/download/v$(SIGIL_VERSION)/sigil_$(SIGIL_VERSION)_Linux_x86_64.tgz
GOROOT = /usr/local/go
GOBIN = /usr/local/go/bin/go
GOPATH = /home/vagrant/gocode
GOTARBALL = go1.5.3.linux-amd64.tar.gz
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-plugn deb-setup deb-sshcommand deb-sigil .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 apt-get update -qq > /dev/null
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -yy dokku 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 deb-all: deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil
mv /tmp/*.deb . mv /tmp/*.deb .
@echo "Done" @echo "Done"
deb-setup: deb-setup:
@echo "-> Updating deb repository and installing build requirements" @echo "-> Updating deb repository and installing build requirements"
sudo apt-get update -qq > /dev/null @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 @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 @command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
ssh -o StrictHostKeyChecking=no git@github.com || true @ssh -o StrictHostKeyChecking=no git@github.com || true
deb-herokuish: deb-setup deb-herokuish: deb-setup
rm -rf /tmp/tmp /tmp/build $(HEROKUISH_PACKAGE_NAME) 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" dpkg-deb --build /tmp/build "/vagrant/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
mv *.deb /tmp mv *.deb /tmp
deb-plugn: deb-setup golang deb-plugn: deb-setup
rm -rf /tmp/tmp /tmp/build $(PLUGN_PACKAGE_NAME) rm -rf /tmp/tmp /tmp/build $(PLUGN_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
@echo "-> Cloning repository" @echo "-> Downloading package"
git clone -q "https://github.com/$(PLUGN_REPO_NAME).git" /tmp/tmp/plugn > /dev/null wget -q -O /tmp/tmp/plugn-$(PLUGN_VERSION).tgz $(PLUGN_URL)
rm -rf /tmp/tmp/plugn/.git /tmp/tmp/plugn/.gitignore cd /tmp/tmp/ && tar zxf /tmp/tmp/plugn-$(PLUGN_VERSION).tgz
@echo "-> Copying files into place" @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 cp /tmp/tmp/plugn /tmp/build/usr/local/bin/plugn && chmod +x /tmp/build/usr/local/bin/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
@echo "-> Creating $(PLUGN_PACKAGE_NAME)" @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' . 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 mv *.deb /tmp
deb-sshcommand: deb-setup deb-sshcommand:
rm -rf /tmp/tmp /tmp/build $(SSHCOMMAND_PACKAGE_NAME) rm -rf /tmp/tmp /tmp/build $(SSHCOMMAND_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
@echo "-> Cloning repository" @echo "-> Downloading package"
git clone -q "https://github.com/$(SSHCOMMAND_REPO_NAME).git" /tmp/tmp/sshcommand > /dev/null wget -q -O /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) $(SSHCOMMAND_URL)
rm -rf /tmp/tmp/sshcommand/.git /tmp/tmp/sshcommand/.gitignore
@echo "-> Copying files into place" @echo "-> Copying files into place"
mkdir -p "/tmp/build/usr/local/bin" 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 chmod +x /tmp/build/usr/local/bin/sshcommand
@echo "-> Creating $(SSHCOMMAND_PACKAGE_NAME)" @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' . 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 mv *.deb /tmp
deb-sigil: deb-setup golang deb-sigil: deb-setup
rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME) rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
@echo "-> Cloning repository" @echo "-> Downloading package"
git clone -q "https://github.com/$(SIGIL_REPO_NAME).git" /tmp/tmp/sigil > /dev/null wget -q -O /tmp/tmp/sigil-$(SIGIL_VERSION).tgz $(SIGIL_URL)
rm -rf /tmp/tmp/sigil/.git /tmp/tmp/sigil/.gitignore cd /tmp/tmp/ && tar zxf /tmp/tmp/sigil-$(SIGIL_VERSION).tgz
@echo "-> Copying files into place" @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 cp /tmp/tmp/sigil /tmp/build/usr/local/bin/sigil && chmod +x /tmp/build/usr/local/bin/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
@echo "-> Creating $(SIGIL_PACKAGE_NAME)" @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' . 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
View File

@@ -1,9 +1,9 @@
Package: dokku Package: dokku
Version: 0.5.0 Version: 0.5.4
Section: web Section: web
Priority: optional Priority: optional
Architecture: amd64 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 Recommends: herokuish
Pre-Depends: nginx (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf Pre-Depends: nginx (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com> Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>

1
debian/postinst vendored
View File

@@ -43,6 +43,7 @@ case "$1" in
PLUGIN_PATH=${DOKKU_LIB_ROOT}/plugins plugn enable $plugin PLUGIN_PATH=${DOKKU_LIB_ROOT}/plugins plugn enable $plugin
fi fi
done done
find -L ${DOKKU_LIB_ROOT} -type l -delete
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins
echo "Install all core plugins" echo "Install all core plugins"

View File

@@ -2,10 +2,10 @@
<browserconfig> <browserconfig>
<msapplication> <msapplication>
<tile> <tile>
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.0/docs/assets/favicons/mstile-70x70.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.0/docs/assets/favicons/mstile-150x150.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.0/docs/assets/favicons/mstile-310x310.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.0/docs/assets/favicons/mstile-310x150.png"/> <wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-310x150.png"/>
<TileColor>#da532c</TileColor> <TileColor>#da532c</TileColor>
</tile> </tile>
</msapplication> </msapplication>

View File

@@ -2,37 +2,37 @@
"name": "Dokku", "name": "Dokku",
"icons": [ "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", "sizes": "36x36",
"type": "image\/png", "type": "image\/png",
"density": "0.75" "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", "sizes": "48x48",
"type": "image\/png", "type": "image\/png",
"density": "1.0" "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", "sizes": "72x72",
"type": "image\/png", "type": "image\/png",
"density": "1.5" "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", "sizes": "96x96",
"type": "image\/png", "type": "image\/png",
"density": "2.0" "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", "sizes": "144x144",
"type": "image\/png", "type": "image\/png",
"density": "3.0" "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", "sizes": "192x192",
"type": "image\/png", "type": "image\/png",
"density": "4.0" "density": "4.0"

View File

@@ -36,13 +36,13 @@ h1 {
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.header .navbar-brand a { .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; text-indent: 40px;
} }
.blurb { .blurb {
color: #424242; color: #424242;
background-color: #ededed; 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; padding: 45px 0;
text-align: center; text-align: center;
} }
@@ -163,6 +163,9 @@ h1 {
.featurette-heading .text-muted { .featurette-heading .text-muted {
font-weight: 300; font-weight: 300;
} }
.featurette img {
width: 400px;
}
.slack-channel { .slack-channel {
background-color: #EEF1F7; background-color: #EEF1F7;
font-size: 16px; font-size: 16px;
@@ -485,8 +488,16 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
font-size: 50px; font-size: 50px;
} }
} }
@media (min-width: 992px) { @media (max-width: 992px) {
.featurette-heading { .featurette img {
margin-top: 120px; width: 200px;
}
}
@media (min-width: 992px) {
.featurette img {
width: 300px;
}
.featurette-heading {
margin-top: 30px;
} }
} }

View File

@@ -2,6 +2,6 @@
"max-versions": [ "max-versions": [
"0.3.26", "0.3.26",
"0.4.14", "0.4.14",
"0.5.0" "0.5.4"
] ]
} }

View File

@@ -30,7 +30,7 @@ Simply place an `app.json` file in the root of your repository or for dockerfile
"scripts": { "scripts": {
"dokku": { "dokku": {
"predeploy": "touch /app/predeploy.test", "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": { "env": {

View File

@@ -11,16 +11,13 @@ To use a dockerfiles for deployment, commit a valid `Dockerfile` to the root of
## Exposed ports ## 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 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.
# replace APP with the name of your application
dokku config:set APP DOKKU_DOCKERFILE_PORT=8000
```
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 ## Customizing the run command

View File

@@ -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. 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 ## 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) 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 ```shell
upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
server { server {
listen [::]:{{ .NGINX_PORT }}; listen [::]:{{ .NGINX_PORT }};
listen {{ .NGINX_PORT }}; listen {{ .NGINX_PORT }};
@@ -128,12 +106,6 @@ server {
proxy_set_header X-Request-Start $msec; proxy_set_header X-Request-Start $msec;
} }
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf; include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
} }
``` ```

View File

@@ -67,7 +67,7 @@ The workflow looks like this:
```shell ```shell
# having dokku-arch in ../dokku-arch # having dokku-arch in ../dokku-arch
vagrant up build-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 cd ../dokku-arch
git add PKGBUILD .SRCINFO git add PKGBUILD .SRCINFO
git commit -m 'Update to dokku 0.9.9' git commit -m 'Update to dokku 0.9.9'

View File

@@ -10,32 +10,70 @@
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> <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> <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="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.0/docs/assets/favicons/apple-touch-icon-60x60.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.0/docs/assets/favicons/apple-touch-icon-72x72.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.0/docs/assets/favicons/apple-touch-icon-76x76.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.0/docs/assets/favicons/apple-touch-icon-114x114.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.0/docs/assets/favicons/apple-touch-icon-120x120.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.0/docs/assets/favicons/apple-touch-icon-144x144.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.0/docs/assets/favicons/apple-touch-icon-152x152.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.0/docs/assets/favicons/apple-touch-icon-180x180.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.0/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/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.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.0/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-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="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.0/docs/assets/favicons/manifest.json"> <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.0/docs/assets/favicons/favicon.ico"> <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="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku"> <meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c"> <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-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.0/docs/assets/favicons/browserconfig.xml"> <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"> <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://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="/dokku/docs/assets/style.css" rel="stylesheet"> -->
<style> <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> </style>
</head> </head>
<body> <body>
@@ -92,12 +130,12 @@
<p class="line"> <p class="line">
<span class="path"></span> <span class="path"></span>
<span class="prompt">$</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>
<p class="line"> <p class="line">
<span class="path"></span> <span class="path"></span>
<span class="prompt">$</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>
<p class="line"> <p class="line">
<span class="output">&nbsp;# go to your server's IP and follow the web installer</span> <span class="output">&nbsp;# 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>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> <p>Still no love? <a href="https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md" target="_blank">Contributions welcome</a>!</a>
</div> </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 --> <!-- START THE FEATURETTES -->
<hr class="featurette-divider">
<div class="row featurette"> <div class="row featurette">
<div class="col-md-7"> <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> <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"> <img class="featurette-image img-responsive center-block" alt="Extend Logo" src="./assets/extend.png">
</div> </div>
</div> </div>
<hr class="featurette-divider">
</div> </div>
<!-- <div class="container-fluid slack-channel team-members">
<div class="container-fluid slack-channel"> <h3>Meet the core team</h3>
Have a question? Join us in our public slack channel!
<div class="inline-container"> <div class="row">
<a class="button slack-button" href="https://glider-slackin.herokuapp.com/"> <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">
<img src="/assets/slack-logo.png" alt="Slack Logo"> <div class="team-member-image">
</a> <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> </div>
-->
<div class="container"> <div class="container">
<footer> <footer>

View File

@@ -15,12 +15,12 @@
<p class="line"> <p class="line">
<span class="path">~</span> <span class="path">~</span>
<span class="prompt">$</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>
<p class="line"> <p class="line">
<span class="path">~</span> <span class="path">~</span>
<span class="prompt">$</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>
<p class="line"> <p class="line">
<span class="output"># =&gt; Go to your server's IP and follow the web installer</span> <span class="output"># =&gt; Go to your server's IP and follow the web installer</span>

View File

@@ -15,18 +15,23 @@ Dokku is designed for usage on a fresh installation of Ubuntu, and should instal
### Installing the latest stable version ### Installing the latest stable version
#### 1. Install dokku
To install the latest stable version of dokku, you can run the following shell commands: To install the latest stable version of dokku, you can run the following shell commands:
```shell ```shell
# installs dokku via apt-get # installs dokku via apt-get
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.0/bootstrap.sh wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh
sudo DOKKU_TAG=v0.5.0 bash bootstrap.sh sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh
``` ```
The installation process takes about 5-10 minutes, depending upon internet connection speed. 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. 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. 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 ### Installing via other methods

View File

@@ -20,6 +20,11 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider
### Example Custom Template ### Example Custom Template
``` ```
upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
server { server {
listen [::]:{{ .NGINX_PORT }}; listen [::]:{{ .NGINX_PORT }};
listen {{ .NGINX_PORT }}; listen {{ .NGINX_PORT }};
@@ -42,12 +47,6 @@ server {
proxy_set_header X-Request-Start $msec; proxy_set_header X-Request-Start $msec;
} }
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf; 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 ## Disabling Nginx
See the [proxy documentation](/dokku/deployment/proxy/). See the [proxy documentation](/dokku/proxy/).

View File

@@ -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"> <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> <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="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.0/docs/assets/favicons/apple-touch-icon-60x60.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.0/docs/assets/favicons/apple-touch-icon-72x72.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.0/docs/assets/favicons/apple-touch-icon-76x76.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.0/docs/assets/favicons/apple-touch-icon-114x114.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.0/docs/assets/favicons/apple-touch-icon-120x120.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.0/docs/assets/favicons/apple-touch-icon-144x144.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.0/docs/assets/favicons/apple-touch-icon-152x152.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.0/docs/assets/favicons/apple-touch-icon-180x180.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.0/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/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.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.0/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-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="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.0/docs/assets/favicons/manifest.json"> <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.0/docs/assets/favicons/favicon.ico"> <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="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku"> <meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c"> <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-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.0/docs/assets/favicons/browserconfig.xml"> <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"> <meta name="theme-color" content="#ffffff">
<script> <script>
@@ -43,7 +43,7 @@
</script> </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://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="/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"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<style> <style>

View File

@@ -12,6 +12,10 @@ Migration guides contain information regarding the new features introduced in ea
## General Information ## 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: If dokku was installed via a debian package, you can upgrade dokku via the following command:
```shell ```shell
@@ -37,7 +41,7 @@ sudo DOKKU_BRANCH=master make install
sudo 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 ```shell
dokku ps:rebuildall dokku ps:rebuildall

View File

@@ -1,15 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
get_phase_script() { get_phase_script() {
declare desc="extracts app.json from app image and returns the appropriate json key/value" declare desc="extracts app.json from app image and returns the appropriate json key/value"
local IMAGE="$1"; local PHASE_SCRIPT_KEY="$2" local IMAGE="$1"; local PHASE_SCRIPT_KEY="$2"
local TMP_WORK_DIR=$(mktemp -d -t "dokku_get_phase_script.XXXX") local GET_PHASE_SCRIPT_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_get_phase_script.XXXX")
local APP_JSON_FILE="$TMP_WORK_DIR/app.json" local APP_JSON_FILE="$GET_PHASE_SCRIPT_TMP_WORK_DIR/app.json"
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM 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 if [[ -f "$APP_JSON_FILE" ]];then
local VALUE=$(get_json_value "scripts.dokku.${PHASE_SCRIPT_KEY}" < "$APP_JSON_FILE") 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) local SCRIPT_CMD=$(get_phase_script "$IMAGE" "$PHASE_SCRIPT_KEY" 2>/dev/null)
if [[ -n "$SCRIPT_CMD" ]];then if [[ -n "$SCRIPT_CMD" ]];then
dokku_log_info1 "Running '$SCRIPT_CMD' in app container" dokku_log_info1 "Running '$SCRIPT_CMD' in app container"
local COMMAND="export HOME=/app ; " local COMMAND
local COMMAND+=" cd \$HOME ; " COMMAND="set -eo pipefail; [[ \$DOKKU_TRACE ]] && set -x ; "
local COMMAND+=" for file in /app/.profile.d/*; do source \$file; done ; " COMMAND+=" if [[ -d '/app' ]]; then "
local COMMAND+=" echo restoring installation cache... ; " COMMAND+=" export HOME=/app ; "
local COMMAND+=" rm -rf /tmp/cache || true ; " COMMAND+=" cd \$HOME ; "
local COMMAND+=" ln -sf /cache /tmp/cache || true ; " COMMAND+=" fi ; "
local COMMAND+=" $SCRIPT_CMD ; RC=\$? ;" COMMAND+=" if [[ -d '/app/.profile.d' ]]; then "
local COMMAND+=" echo removing installation cache... ; " COMMAND+=" for file in /app/.profile.d/*; do source \$file; done ; "
local COMMAND+=" rm -f /tmp/cache || true ; " COMMAND+=" fi ; "
local COMMAND+=" exit \$RC " COMMAND+=" if [[ -d '/cache' ]]; then "
local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP") 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 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 # 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") 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")
test "$(docker wait "$id")" -eq 0 || (dokku_container_log_verbose_quiet "$id"; exit 1) if test "$(docker wait "$id")" -eq 0; then
dokku_container_log_verbose_quiet "$id" dokku_container_log_verbose_quiet "$id"
if [[ "$PHASE_SCRIPT_KEY" != "postdeploy" ]];then if [[ "$PHASE_SCRIPT_KEY" != "postdeploy" ]];then
docker commit "$id" "$IMAGE" > /dev/null 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
fi fi
} }

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core standard plugin" description = "dokku core standard plugin"
version = "0.5.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -37,6 +37,12 @@ dokku_build_cmd() {
# extract first port from Dockerfile # extract first port from Dockerfile
local DOCKERFILE_PORTS=$(get_dockerfile_exposed_ports Dockerfile) local DOCKERFILE_PORTS=$(get_dockerfile_exposed_ports Dockerfile)
[[ -n "$DOCKERFILE_PORTS" ]] && config_set --no-restart "$APP" DOKKU_DOCKERFILE_PORTS="$DOCKERFILE_PORTS" [[ -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" plugn trigger pre-build-dockerfile "$APP"
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache" [[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"

View File

@@ -20,13 +20,13 @@ dokku_deploy_cmd() {
local DOKKU_DEFAULT_DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG") 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 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 while read -r line || [[ -n "$line" ]]; do
[[ "$line" =~ ^#.* ]] && continue [[ "$line" =~ ^#.* ]] && continue
local TRIM=${line%#*} line="$(strip_inline_comments "$line")"
local PROC_TYPE=${TRIM%%=*} PROC_TYPE=${line%%=*}
local PROC_COUNT=${TRIM#*=} PROC_COUNT=${line#*=}
local CONTAINER_INDEX=1 CONTAINER_INDEX=1
while [[ $CONTAINER_INDEX -le $PROC_COUNT ]]; do while [[ $CONTAINER_INDEX -le $PROC_COUNT ]]; do
local id=""; local port=""; local ipaddr="" local id=""; local port=""; local ipaddr=""
@@ -43,7 +43,6 @@ dokku_deploy_cmd() {
if [[ -z "$DOKKU_HEROKUISH" ]]; then if [[ -z "$DOKKU_HEROKUISH" ]]; then
local DOKKU_DOCKERFILE_PORTS=($(config_get "$APP" DOKKU_DOCKERFILE_PORTS || true)) 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_DOCKERFILE_START_CMD=$(config_get "$APP" DOKKU_DOCKERFILE_START_CMD || true)
local DOKKU_PROCFILE_START_CMD=$(get_cmd_from_procfile "$APP" "$PROC_TYPE") local DOKKU_PROCFILE_START_CMD=$(get_cmd_from_procfile "$APP" "$PROC_TYPE")
local START_CMD=${DOKKU_DOCKERFILE_START_CMD:-$DOKKU_PROCFILE_START_CMD} local START_CMD=${DOKKU_DOCKERFILE_START_CMD:-$DOKKU_PROCFILE_START_CMD}

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core events logging plugin" description = "dokku core events logging plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core apps plugin" description = "dokku core apps plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core build-env plugin" description = "dokku core build-env plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core certificate management plugin" description = "dokku core certificate management plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -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" 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 if is_tar_import; then
local TEMP_DIR=$(mktemp -d -t "dokku_certs_set.XXXX") local CERTS_SET_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_certs_set.XXXX")
pushd "$TEMP_DIR" &> /dev/null pushd "$CERTS_SET_TMP_WORK_DIR" &> /dev/null
trap 'popd &> /dev/null || true; rm -rf $TEMP_DIR > /dev/null' RETURN trap 'popd &> /dev/null || true; rm -rf $CERTS_SET_TMP_WORK_DIR > /dev/null' RETURN
tar xvf - <&0 tar xvf - <&0
local CRT_FILE_SEARCH=$(find . -not -path '*/\.*' -type f -name "*.crt") local CRT_FILE_SEARCH=$(find . -not -path '*/\.*' -type f -name "*.crt")

View File

@@ -12,9 +12,9 @@ certs_generate_cmd() {
local APP="$2"; local DOMAIN="$3"; local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls" 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 if [[ ! -f "$APP_SSL_PATH/server.key" ]] && [[ ! -f "$APP_SSL_PATH/server.crt" ]]; then
local TMP_WORK_DIR=$(mktemp -d -t "dokku_certs.XXXXXXXXX") local CERTS_GENERATE_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_certs.XXXXXXXXX")
pushd "$TMP_WORK_DIR" > /dev/null pushd "$CERTS_GENERATE_TMP_WORK_DIR" > /dev/null
trap 'popd &> /dev/null || true; rm -rf "$TMP_WORK_DIR" > /dev/null' INT TERM EXIT 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 genrsa -des3 -passout pass:x -out server.pass.key 2048
openssl rsa -passin pass:x -in server.pass.key -out server.key openssl rsa -passin pass:x -in server.pass.key -out server.key
@@ -23,7 +23,7 @@ certs_generate_cmd() {
mkdir -p "$APP_SSL_PATH" mkdir -p "$APP_SSL_PATH"
dokku_log_info1 "Installing certificate and key..." 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 750 "$APP_SSL_PATH"
chmod 640 "$APP_SSL_PATH/server.key" "$APP_SSL_PATH/server.crt" chmod 640 "$APP_SSL_PATH/server.key" "$APP_SSL_PATH/server.crt"
[[ -n "$DOMAIN" ]] && (domains_add "$APP" "$DOMAIN" || nginx_build_config "$APP") [[ -n "$DOMAIN" ]] && (domains_add "$APP" "$DOMAIN" || nginx_build_config "$APP")

View File

@@ -58,7 +58,7 @@ checks_check_deploy() {
eval "$(config_export global)" eval "$(config_export global)"
eval "$(config_export app "$APP")" 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..." dokku_log_info2_quiet "Zero downtime checks for app ($APP) have been disabled. moving on..."
exit 0 exit 0
fi 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 # 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. # after successfully copying the file. Thus, we suppress stderr.
# ref: https://github.com/dotcloud/docker/issues/3986 # ref: https://github.com/dotcloud/docker/issues/3986
local TMPDIR=$(mktemp -d /tmp/dokku_CHECKS.XXXXX) local CHECK_DEPLOY_TMP_WORK_DIR=$(mktemp -d /tmp/dokku_CHECKS.XXXXX)
docker cp $DOKKU_APP_CONTAINER_ID:/app/CHECKS "$TMPDIR" 2> /dev/null || true 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() { checks_check_deploy_cleanup() {
declare desc="cleans up TMPDIR and print container output" declare desc="cleans up CHECK_DEPLOY_TMP_WORK_DIR and print container output"
local id="$1" local id="$1"
rm -rf "$TMPDIR" rm -rf "$CHECK_DEPLOY_TMP_WORK_DIR" &> /dev/null || true
if [[ $id ]]; then if [[ $id ]]; then
dokku_log_info2_quiet "$APP $DOKKU_APP_CONTAINER_TYPE container output:" dokku_log_info2_quiet "$APP $DOKKU_APP_CONTAINER_TYPE container output:"
dokku_container_log_verbose_quiet "$id" dokku_container_log_verbose_quiet "$id"
dokku_log_info2_quiet "end $APP $DOKKU_APP_CONTAINER_TYPE container output" dokku_log_info2_quiet "end $APP $DOKKU_APP_CONTAINER_TYPE container output"
fi 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 # We allow custom check for web instances only
if [[ "$DOKKU_APP_CONTAINER_TYPE" == "web" ]]; then if [[ "$DOKKU_APP_CONTAINER_TYPE" == "web" ]]; then
dokku_log_verbose "For more efficient zero downtime deployments, create a file CHECKS." 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..." dokku_log_verbose "Non web container detected: Running default container check..."
fi fi
rm -rf "$TMPDIR" rm -rf "$CHECK_DEPLOY_TMP_WORK_DIR" &> /dev/null || true
# simple default check to see if the container stuck around # simple default check to see if the container stuck around
local DOKKU_DEFAULT_CHECKS_WAIT="${DOKKU_DEFAULT_CHECKS_WAIT:-10}" 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!!" dokku_log_fail "App container failed to start!!"
fi fi
trap - EXIT
dokku_log_info1 "Default container check successful!" && exit 0 dokku_log_info1 "Default container check successful!" && exit 0
fi 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 # Reads name/value pairs, sets the WAIT and TIMEOUT variables
exec < "$FILENAME" exec < "$FILENAME"
local LINE local line; local NAME; local VALUE
while read -r LINE; do while read -r line; do
line=$(strip_inline_comments "$line")
# Name/value pair # Name/value pair
if [[ "$LINE" =~ ^.+= ]]; then if [[ "$line" =~ ^.+= ]]; then
local TRIM=${LINE%#*} NAME=${line%=*}
local NAME=${TRIM%=*} VALUE=${line#*=}
local VALUE=${TRIM#*=}
[[ "$NAME" = "WAIT" ]] && local WAIT=$VALUE [[ "$NAME" = "WAIT" ]] && local WAIT=$VALUE
[[ "$NAME" = "TIMEOUT" ]] && local TIMEOUT=$VALUE [[ "$NAME" = "TIMEOUT" ]] && local TIMEOUT=$VALUE
[[ "$NAME" = "ATTEMPTS" ]] && local ATTEMPTS=$VALUE [[ "$NAME" = "ATTEMPTS" ]] && local ATTEMPTS=$VALUE
@@ -150,8 +156,8 @@ checks_check_deploy() {
local CURL_OPTIONS="-q --compressed --fail --location --max-time $TIMEOUT" local CURL_OPTIONS="-q --compressed --fail --location --max-time $TIMEOUT"
# Set X-Forwarded-Proto header if TLS is enabled. # Set X-Forwarded-Proto header if TLS is enabled.
local SSL="$DOKKU_ROOT/$APP/tls"; local WILDCARD_SSL="$DOKKU_ROOT/tls" local SSL="$DOKKU_ROOT/$APP/tls"
if [[ -e "$SSL/server.crt" && -e "$SSL/server.key" ]] || [[ -e "$WILDCARD_SSL/server.crt" && -e "$WILDCARD_SSL/server.key" ]]; then if [[ -e "$SSL/server.crt" && -e "$SSL/server.key" ]]; then
local CURL_OPTIONS+=" -H X-Forwarded-Proto:https" local CURL_OPTIONS+=" -H X-Forwarded-Proto:https"
fi fi
@@ -226,6 +232,7 @@ checks_check_deploy() {
exit 1 exit 1
fi fi
trap - EXIT
dokku_log_info1 "All checks successful!" dokku_log_info1 "All checks successful!"
} }

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core checks plugin" description = "dokku core checks plugin"
version = "0.5.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -6,11 +6,10 @@ source "$PLUGIN_AVAILABLE_PATH/checks/functions"
checks_main_cmd() { checks_main_cmd() {
declare desc="displays app zero-downtime status" declare desc="displays app zero-downtime status"
local cmd="checks" local cmd="checks"
local ALL_APPS=$(dokku_apps) local APPS=$(dokku_apps)
if [[ -n "$1" ]]; then if [[ -n "$1" ]]; then
local APP="$1" local APPS="$1"
fi fi
local APPS=${APP:="$ALL_APPS"}
dokku_col_log_info1_quiet "App Name" "Zero-Downtime Status" dokku_col_log_info1_quiet "App Name" "Zero-Downtime Status"
local app local app

View File

@@ -311,16 +311,17 @@ get_app_running_container_ids() {
get_cmd_from_procfile() { get_cmd_from_procfile() {
declare desc="parse cmd from app Procfile" declare desc="parse cmd from app Procfile"
local APP=$1; local PROC_TYPE=$2; local DOKKU_PROCFILE="$DOKKU_ROOT/$APP/DOKKU_PROCFILE" local APP=$1; local PROC_TYPE=$2; local DOKKU_PROCFILE="$DOKKU_ROOT/$APP/DOKKU_PROCFILE"
local name; local command;
verify_app_name "$APP" verify_app_name "$APP"
if [[ -f $DOKKU_PROCFILE ]]; then if [[ -f $DOKKU_PROCFILE ]]; then
local line; local name; local command
while read line || [[ -n "$line" ]]; do while read line || [[ -n "$line" ]]; do
if [[ -z "$line" ]] || [[ "$line" == "#"* ]]; then if [[ -z "$line" ]] || [[ "$line" == "#"* ]]; then
continue continue
fi fi
local name="${line%%:*}" line=$(strip_inline_comments "$line")
local command="${line#*:[[:space:]]}" name="${line%%:*}"
command="${line#*:[[:space:]]}"
[[ "$name" == "$PROC_TYPE" ]] && echo "$command" && break [[ "$name" == "$PROC_TYPE" ]] && echo "$command" && break
done < "$DOKKU_PROCFILE" done < "$DOKKU_PROCFILE"
fi fi
@@ -570,6 +571,13 @@ get_dockerfile_exposed_ports() {
echo "$DOCKERFILE_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() { get_app_raw_tcp_ports() {
declare desc="extracts raw tcp port numbers from DOCKERFILE_PORTS config variable" declare desc="extracts raw tcp port numbers from DOCKERFILE_PORTS config variable"
source "$PLUGIN_AVAILABLE_PATH/config/functions" 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())'; cat | python -c 'import json,sys;obj=json.load(sys.stdin);print " ".join(obj'"${JSON_NODE}"'.keys())';
fi fi
} }
strip_inline_comments() {
declare desc="removes bash-style comment from input line"
local line="$1"
local stripped_line="${line%[[:space:]]#*}"
echo "$stripped_line"
}

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core common plugin" description = "dokku core common plugin"
version = "0.5.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core config plugin" description = "dokku core config plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core docker-options plugin" description = "dokku core docker-options plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core domains plugin" description = "dokku core domains plugin"
version = "0.5.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core enter plugin" description = "dokku core enter plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -10,17 +10,17 @@ git_build_app_repo() {
local APP="$1"; local REV="$2" local APP="$1"; local REV="$2"
# clean up after ourselves # clean up after ourselves
local TMP_WORK_DIR=$(mktemp -d -t "dokku_git.XXXX") local GIT_BUILD_APP_REPO_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_git.XXXX")
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT 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 # 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 # repo as a remote, then does a fetch depth=1 to avoid cloning
# the entire repo # the entire repo
local TMP_TAG="dokku/$REV" 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 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" [[ ! -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 -d "$TMP_TAG" &> /dev/null || true
GIT_DIR="$DOKKU_ROOT/$APP" git tag "$TMP_TAG" "$REV" &> /dev/null 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 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 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" plugn trigger pre-receive-app "$APP" "dockerfile" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV"
dokku receive "$APP" "dockerfile" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/" dokku receive "$APP" "dockerfile" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
else else
plugn trigger pre-receive-app "$APP" "herokuish" "$TMP_WORK_DIR" "$REV" plugn trigger pre-receive-app "$APP" "herokuish" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV"
dokku receive "$APP" "herokuish" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/" dokku receive "$APP" "herokuish" "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
fi fi
} }

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core git plugin" description = "dokku core git plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core logs plugin" description = "dokku core logs plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core named containers plugin" description = "dokku core named containers plugin"
version = "0.4.0.1" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -155,11 +155,11 @@ nginx_build_config() {
local PASSED_LISTEN_IP_PORT=true local PASSED_LISTEN_IP_PORT=true
fi fi
local TMPDIR=$(mktemp -d /tmp/dokku_nginx_template.XXXXX) local NGINX_BUILD_CONFIG_TMP_WORK_DIR=$(mktemp -d /tmp/dokku_nginx_template.XXXXX)
local NGINX_CONF=$(mktemp -p "${TMPDIR}" -t "nginx.conf.XXXXXX") local NGINX_CONF=$(mktemp --tmpdir="${NGINX_BUILD_CONFIG_TMP_WORK_DIR}" "nginx.conf.XXXXXX")
local CUSTOM_NGINX_TEMPLATE="$TMPDIR/$NGINX_TEMPLATE_NAME" local CUSTOM_NGINX_TEMPLATE="$NGINX_BUILD_CONFIG_TMP_WORK_DIR/$NGINX_TEMPLATE_NAME"
# shellcheck disable=SC2086 # 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" get_custom_nginx_template "$APP" "$CUSTOM_NGINX_TEMPLATE"
if [[ -f "$CUSTOM_NGINX_TEMPLATE" ]]; then if [[ -f "$CUSTOM_NGINX_TEMPLATE" ]]; then

View File

@@ -33,8 +33,6 @@ ssl_session_timeout 10m;
ssl_ciphers EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; 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 EOF
fi fi

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core nginx-vhosts plugin" description = "dokku core nginx-vhosts plugin"
version = "0.5.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -26,8 +26,8 @@ server {
proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Request-Start $msec; 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 }} {{ if $.DOKKU_APP_LISTENERS }}
upstream {{ $.APP }}-{{ $port }} { upstream {{ $.APP }}-{{ $port }} {
{{ range $.DOKKU_APP_LISTENERS | split " " }} server {{ . }}:{{ $port }};{{ end }} {{ range $.DOKKU_APP_LISTENERS | split " " }} server {{ . }}:{{ $port }};{{ end }}

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core plugin plugin" description = "dokku core plugin plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core proxy plugin" description = "dokku core proxy plugin"
version = "0.5.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -44,8 +44,8 @@ generate_scale_file() {
if [[ ! -f $DOKKU_SCALE_FILE ]]; then if [[ ! -f $DOKKU_SCALE_FILE ]]; then
dokku_log_info1_quiet "DOKKU_SCALE file not found in app image. Generating one based on Procfile..." 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") local GENERATE_SCALE_FILE_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_scale.XXXX")
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN trap 'rm -rf "$GENERATE_SCALE_FILE_TMP_WORK_DIR" > /dev/null' RETURN
if [[ -f $DOKKU_PROCFILE ]]; then if [[ -f $DOKKU_PROCFILE ]]; then
while read -r line || [[ -n "$line" ]]; do while read -r line || [[ -n "$line" ]]; do
@@ -128,9 +128,11 @@ ps_restart() {
local APP="$1"; verify_app_name "$APP" local APP="$1"; verify_app_name "$APP"
local IMAGE_TAG=$(get_running_image_tag "$APP") local IMAGE_TAG=$(get_running_image_tag "$APP")
! (is_deployed "$APP") && echo "App $APP has not been deployed" && exit 0 if is_deployed "$APP"; then
release_and_deploy "$APP" "$IMAGE_TAG"
release_and_deploy "$APP" "$IMAGE_TAG" else
echo "App $APP has not been deployed"
fi
} }
ps_scale() { ps_scale() {

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core ps plugin" description = "dokku core ps plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core shell plugin" description = "dokku core shell plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core storage plugin" description = "dokku core storage plugin"
version = "0.5.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core tags plugin" description = "dokku core tags plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core tar plugin" description = "dokku core tar plugin"
version = "0.4.0" version = "0.5.4"
[plugin.config] [plugin.config]

View File

@@ -11,12 +11,12 @@ tar_build_locked_cmd() {
shift 2 shift 2
# clean up after ourselves # clean up after ourselves
local TMP_WORK_DIR=$(mktemp -d -t "dokku_tar.XXXX") local TAR_BUILD_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_tar.XXXX")
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT trap 'rm -rf "$TAR_BUILD_TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
# extract tar file # extract tar file
chmod 755 "$TMP_WORK_DIR" chmod 755 "$TAR_BUILD_TMP_WORK_DIR"
pushd "$TMP_WORK_DIR" > /dev/null 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 # 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') 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" 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" tar -x -C "$TAR_BUILD_TMP_WORK_DIR" -f "$DOKKU_ROOT/$APP/src.tar" --strip-components="$BOGUS_PARTS"
chmod -R u+r "$TMP_WORK_DIR" chmod -R u+r "$TAR_BUILD_TMP_WORK_DIR"
if [[ -f Dockerfile ]] && [[ "$([[ -f .env ]] && grep -q BUILDPACK_URL .env; echo $?)" != "0" ]] && [[ ! -f ".buildpacks" ]]; then 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" plugn trigger pre-receive-app "$APP" "dockerfile" "$TAR_BUILD_TMP_WORK_DIR"
dokku receive "$APP" "dockerfile" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/" dokku receive "$APP" "dockerfile" "$TAR_BUILD_TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
else else
plugn trigger pre-receive-app "$APP" "herokuish" "$TMP_WORK_DIR" plugn trigger pre-receive-app "$APP" "herokuish" "$TAR_BUILD_TMP_WORK_DIR"
dokku receive "$APP" "herokuish" "$TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/" dokku receive "$APP" "herokuish" "$TAR_BUILD_TMP_WORK_DIR" | sed -u "s/^/"$'\e[1G'"/"
fi fi
} }

View File

@@ -1 +1,5 @@
WAIT=2 # wait 2 seconds
TIMEOUT=5 # set timeout to 5 seconds
ATTEMPTS=2 # try 2 times
/ Hello World! / Hello World!

View File

@@ -1 +1,5 @@
WAIT=2 # wait 2 seconds
TIMEOUT=5 # set timeout to 5 seconds
ATTEMPTS=2 # try 2 times
/ nodejs/express / nodejs/express

View File

@@ -1 +1,5 @@
WAIT=2 # wait 2 seconds
TIMEOUT=5 # set timeout to 5 seconds
ATTEMPTS=2 # try 2 times
/ Hello World! / Hello World!

View 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"
}
]
}

View File

@@ -1 +1,5 @@
/ nodejs/express WAIT=2 # wait 2 seconds
TIMEOUT=5 # set timeout to 5 seconds
ATTEMPTS=2 # try 2 times
/ nodejs/express

View File

@@ -4,7 +4,7 @@
# Procfile for development using the new threaded worker (scheduler, twitter stream and delayed job) # Procfile for development using the new threaded worker (scheduler, twitter stream and delayed job)
cron: node worker.js cron: node worker.js
web: node web.js web: node web.js # testing inline comment
worker: node worker.js worker: node worker.js

View File

@@ -22,7 +22,7 @@ succeeded() {
exit 1 exit 1
} }
TMP=$(mktemp -d -t "$TARGET.XXXXX") TMP=$(mktemp -d "/tmp/$TARGET.XXXXX")
rmdir "$TMP" && cp -r "$(dirname "$SELF")/$APP" "$TMP" rmdir "$TMP" && cp -r "$(dirname "$SELF")/$APP" "$TMP"
pushd "$TMP" &> /dev/null || exit 1 pushd "$TMP" &> /dev/null || exit 1

View File

@@ -12,7 +12,7 @@ teardown() {
deploy_app_tar() { deploy_app_tar() {
APP_TYPE="$1"; APP_TYPE=${APP_TYPE:="nodejs-express"} 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" rmdir "$TMP" && cp -r "./tests/apps/$APP_TYPE" "$TMP"
pushd "$TMP" &> /dev/null || exit 1 pushd "$TMP" &> /dev/null || exit 1

View File

@@ -8,7 +8,7 @@ setup() {
} }
teardown() { teardown() {
rm -rf /home/dokku/$TEST_APP/tls /home/dokku/tls rm -rf /home/dokku/$TEST_APP/tls
destroy_app destroy_app
dokku config:unset --global DOKKU_RM_CONTAINER dokku config:unset --global DOKKU_RM_CONTAINER
rm -f "$DOCKERFILE" rm -f "$DOCKERFILE"

View File

@@ -7,7 +7,7 @@ setup() {
} }
teardown() { teardown() {
rm -rf /home/dokku/$TEST_APP/tls /home/dokku/tls rm -rf /home/dokku/$TEST_APP/tls
destroy_app destroy_app
} }

View File

@@ -176,7 +176,7 @@ assert_http_redirect() {
deploy_app() { deploy_app() {
local APP_TYPE="$1"; local APP_TYPE=${APP_TYPE:="nodejs-express"} 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 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" local CUSTOM_PATH="$4"
rmdir "$TMP" && cp -r "./tests/apps/$APP_TYPE" "$TMP" rmdir "$TMP" && cp -r "./tests/apps/$APP_TYPE" "$TMP"
@@ -200,7 +200,7 @@ deploy_app() {
} }
setup_client_repo() { 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" rmdir "$TMP" && cp -r ./tests/apps/nodejs-express "$TMP"
cd "$TMP" || exit 1 cd "$TMP" || exit 1
git init git init