Compare commits

...

36 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
aa74315389 Release 0.6.4 2016-06-29 01:27:16 -04:00
Jose Diaz-Gonzalez
b7bb766f53 Merge pull request #2279 from dokku/2278_mh-checks-disabled-bug
only attempt to stop a checks-disabled container if it is actually running
2016-06-29 01:15:24 -04:00
Michael Hobbs
ae972cf3cd only attempt to stop a checks-disabled container if it is actually running. closes #2278 2016-06-28 20:32:04 -07:00
Jose Diaz-Gonzalez
b20a91d24f Merge pull request #2272 from dokku/2177-document-env
Add documentation surrounding when the /app/.env file is populated
2016-06-28 20:27:12 -04:00
Jose Diaz-Gonzalez
bd8ca6ca5c Merge pull request #2271 from dokku/2106-purge-dokku-user
Handle purging the dokku user, group, and logs directory during `apt-get purge`
2016-06-28 20:27:03 -04:00
Michael Hobbs
6543f5d11c Merge pull request #2275 from sseemayer/master
Prefer file import in certs:add if files given
2016-06-27 10:13:25 -07:00
Stefan Seemayer
f0000a18ba Prefer file import in certs:add if files given
Fixes dokku/dokku-letsencrypt#67

Change the certs:add command to use a file import without trying to
detect a piped-in tarball if server.crt and server.key files were passed
in as arguments and those files exist.

Fixes hangs on certificate imports by filename when the check for a
STDIN pipe fails e.g. when running dokku remotely using a SSH command.
2016-06-27 16:09:05 +02:00
Michael Hobbs
80d13234f9 Merge pull request #2270 from guillaumewuip/better_apps_destroy
Allow apps:destroy when not in a project
2016-06-26 14:23:57 -07:00
Jose Diaz-Gonzalez
f6c1ad1b8f Add documentation surrounding when the /app/.env file is populated
Closes #2177

[ci skip]
2016-06-26 17:13:46 -04:00
Jose Diaz-Gonzalez
2f5fce36e4 Handle purging the dokku user, group, and logs directory during apt-get purge
Closes #2106

[ci skip]
2016-06-26 16:56:23 -04:00
Guillaume Wuip
8d14d15acc Fix obvious missing "git" 2016-06-26 21:09:31 +02:00
Guillaume Wuip
3cc1b42160 Fix has_dokku_remote
`git remote show <remote>` seems to really check if the remote is a git repo
whereas we just want to know if a remote named "dokku" is present
2016-06-26 21:06:42 +02:00
Guillaume Wuip
2a76f7c3b3 Allow apps:destroy when not in a project 2016-06-26 14:33:20 +02:00
Jose Diaz-Gonzalez
2b019aef2f Release 0.6.3 2016-06-25 00:16:36 -04:00
Jose Diaz-Gonzalez
7dc6d449bd Minor re-ordering of commands to match our existing doc structure
[ci skip]
2016-06-24 23:57:10 -04:00
Jose Diaz-Gonzalez
a7ec68e107 Move around doc section a bit to clarify what is available.
[ci skip]
2016-06-24 23:38:13 -04:00
Michael Hobbs
3192f9b724 [ci skip] fix missing backtick 2016-06-24 20:30:26 -07:00
Jose Diaz-Gonzalez
3decb4e780 Merge pull request #2266 from dokku/mh-proxy-docs
update docs with info about proxy port mapping default behavior
2016-06-24 23:28:00 -04:00
Jose Diaz-Gonzalez
a1ae7d76f4 Clarify proxy documentation
- note that the port changes on every deploy when the proxy is disabled
- make it clear that the proxy is being disabled for the app
- note that the nginx-vhosts plugin supports the proxy plugin mapping
- minor formatting changes

[ci skip]
2016-06-24 23:22:58 -04:00
Jose Diaz-Gonzalez
47dfde16f5 Use $ to signify bash command prompts
[ci skip]
2016-06-24 23:21:23 -04:00
Jose Diaz-Gonzalez
99632b7141 Link directly to proxy port mapping section
[ci skip]
2016-06-24 23:08:27 -04:00
Jose Diaz-Gonzalez
424827d813 Move ports management section to new section
This clarifies what was added when, and also sets a bit of a divide between the sections.

[ci skip]
2016-06-24 23:07:44 -04:00
Jose Diaz-Gonzalez
b7d1f54bd5 Fix header
[ci skip]
2016-06-24 23:07:05 -04:00
Michael Hobbs
bc93e5da17 [ci skip] update docs with info about proxy port mapping default behavior 2016-06-24 15:06:27 -07:00
Jose Diaz-Gonzalez
71a8142ed9 Merge pull request #2264 from troy/sponsor-links
Use Markdown for sponsors page, so it's clickable from GitHub
2016-06-23 12:45:53 -04:00
Troy Davis
688cb910dd Add newline 2016-06-23 09:45:23 -07:00
Troy Davis
d3b4c49d17 Make sponsors page clickable from GitHub w/Markdown 2016-06-23 09:42:41 -07:00
Jose Diaz-Gonzalez
25422a4a2a Merge pull request #2262 from dokku/josegonzalez-patch-1
Document that REV is optional in the receive-app trigger
2016-06-22 14:40:06 -04:00
Jose Diaz-Gonzalez
62143b1fa1 Document that REV is optional
[ci skip]
2016-06-22 14:39:52 -04:00
Jose Diaz-Gonzalez
a522adfecb Merge pull request #2261 from dokku/josegonzalez-patch-1
Drop apparmor requirement to support systemd systems
2016-06-22 14:37:55 -04:00
Jose Diaz-Gonzalez
83f4df3017 Drop apparmor requirement to support systemd systems
On Debian Jessie, apparmor conflicts with systemd. As we only required it for lxc-docker, dropping the requirement is the best course of action.
2016-06-22 12:16:12 -04:00
Jose Diaz-Gonzalez
3df37bcc99 Merge pull request #2260 from dokku/remove-port-mapping-tuple
Add ability to remove a specific port mapping tuple
2016-06-21 02:09:29 -04:00
Jose Diaz-Gonzalez
4b0163103e Add docs for removing a specific proxy tuple
[ci skip]
2016-06-20 23:19:44 -04:00
Jose Diaz-Gonzalez
bd7deae883 Add ability to remove a specific port mapping tuple
This allows users to specify port 80 after an application has had domain added. Normally, when we first add an extra domain, the following tuple is added:

    http:80:5000

A user might then want to remap port 80 to another port, such as port 8080:

    dokku proxy:ports-add APP http:80:8080

The application would then have the following proxy map:

    http:80:5000 http:80:8080

As nginx vhosts are resolved in FIFO order, the "correct" upstream of 8080 would basically be ignored. The workaround would be to remove the original port mapping, but the following:

    dokku proxy:ports-remove APP 80

Would remove *both* entries and then re-add the default of `http:80:5000`. Thus it was not possible to use the porcelain to correct the port mapping and a user would have to fall back to using the following hack to fix their mapping:

    dokku config:set APP DOKKU_PROXY_PORT_MAP='http:80:8080'

You can now use the previous syntax *as well as* the following to remove a port mapping:

    dokku proxy:ports-remove APP http:80:5000
2016-06-20 23:17:55 -04:00
Jose Diaz-Gonzalez
d4cf23ec07 Merge pull request #2258 from dokku/2257_mh-domains-regex
support domains that start with digits per RFC1123
2016-06-20 22:47:12 -04:00
Michael Hobbs
98ef078d33 support domains that start with digits per RFC1123. closes #2257 2016-06-20 15:01:48 -07:00
55 changed files with 288 additions and 121 deletions

View File

@@ -1,5 +1,46 @@
# History # History
## 0.6.4
Included in this release are a couple of bug fixes for existing features.
Thanks to all the contributors who helped with this release!
### Bug Fixes
- #2275: @sseemayer Prefer file import in certs:add if files given
- #2279: @michaelshobbs Only attempt to stop a checks-disabled container if it is actually running
### New Features
- #2270: @guillaumewuip Allow apps:destroy when not in a project
- #2271: @josegonzalez Handle purging the dokku user, group, and logs directory during `apt-get purge`
### Documentation
- #2272: @josegonzalez Add documentation surrounding when the /app/.env file is populated
## 0.6.3
This release is mostly a documentation release.
Thanks to all the contributors who helped with this release!
### Bug Fixes
- #2258: @michaelshobbs Support domains that start with digits per RFC1123
### New Features
- #2260: @josegonzalez Add ability to remove a specific port mapping tuple
- #2261: @josegonzalez Drop apparmor requirement to support systemd systems
### Documentation
- #2262: @josegonzalez Document that REV is optional in the receive-app trigger
- #2264: @troy Use Markdown for sponsors page, so it's clickable from GitHub
- #2266: @michaelshobbs Add documentation surrounding proxy port mapping
## 0.6.2 ## 0.6.2
This release is a minor bugfix for the web setup, and also reverts a previous addition to the persistent storage. Please see the pull requests for more details. This release is a minor bugfix for the web setup, and also reverts a previous addition to the persistent storage. Please see the pull requests for more details.

View File

@@ -13,8 +13,8 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
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.6.2/bootstrap.sh wget https://raw.githubusercontent.com/dokku/dokku/v0.6.4/bootstrap.sh
sudo DOKKU_TAG=v0.6.2 bash bootstrap.sh sudo DOKKU_TAG=v0.6.4 bash bootstrap.sh
### Upgrading ### Upgrading

View File

@@ -1,2 +0,0 @@
Deis http://deis.io
DigitalOcean https://www.digitalocean.com/

3
SPONSORS.md Normal file
View File

@@ -0,0 +1,3 @@
[Deis](http://deis.io)
[DigitalOcean](https://www.digitalocean.com/)

View File

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

View File

@@ -33,6 +33,14 @@ client_help_msg() {
exit 20 # exit with specific status. only used in units tests for now exit 20 # exit with specific status. only used in units tests for now
} }
is_git_repo() {
git rev-parse &>/dev/null
}
has_dokku_remote() {
git remote show | grep dokku
}
if [[ -z $DOKKU_HOST ]]; then if [[ -z $DOKKU_HOST ]]; then
if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then
DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^dokku" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true) DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^dokku" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true)
@@ -81,7 +89,7 @@ if [[ ! -z $DOKKU_HOST ]]; then
fi fi
;; ;;
apps:destroy) apps:destroy)
git remote remove dokku is_git_repo && has_dokku_remote && git remote remove dokku
;; ;;
esac esac

4
debian/control vendored
View File

@@ -1,11 +1,11 @@
Package: dokku Package: dokku
Version: 0.6.2 Version: 0.6.4
Section: web Section: web
Priority: optional Priority: optional
Architecture: amd64 Architecture: amd64
Depends: locales, git, make, curl, gcc, man-db, sshcommand, gliderlabs-sigil, 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, gliderlabs-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, dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf Pre-Depends: nginx, dnsutils, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com> Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
Dokku is an extensible, open source Platform as a Service Dokku is an extensible, open source Platform as a Service

6
debian/postrm vendored
View File

@@ -8,6 +8,7 @@ fi
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}" readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}" readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
readonly DOKKU_LOGS_DIR="${DOKKU_LOGS_DIR:="/var/log/dokku"}"
main() { main() {
if [[ -f /etc/systemd/system/dokku-installer.conf ]] || [[ -f /etc/init/dokku-installer.conf ]]; then if [[ -f /etc/systemd/system/dokku-installer.conf ]] || [[ -f /etc/init/dokku-installer.conf ]]; then
@@ -40,6 +41,11 @@ main() {
find ${DOKKU_ROOT} -type d -empty -delete find ${DOKKU_ROOT} -type d -empty -delete
fi fi
rm -rf "${DOKKU_LOGS_DIR}"
deluser dokku || true
delgroup dokku || true
db_purge db_purge
fi fi
} }

View File

@@ -13,6 +13,12 @@
- You can now configure host -> container proxy port mappings - You can now configure host -> container proxy port mappings
- The UI is handled by the [proxy](/dokku/proxy/) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes. - The UI is handled by the [proxy](/dokku/proxy/) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
- Default port mappings
- buildpack apps will be set to `http:80:5000` and will also include `https:443:5000` if SSL is enabled.
- dockerfile apps with explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on each exposed port that proxies to the same port of the deployed application container.
- You may override this behavior with the [`proxy:ports-*` commands](/dokku/proxy/) or by directly setting `DOKKU_PROXY_PORT_MAP` with the `config:set` command
- dockerfile apps without explicitly exposed ports will behave the same as a buildpack app
- NOTE: These defaults **are not** automatically changed on subsequent pushes and must be manipulated with the aforementioned commands
## calling the dokku binary ## calling the dokku binary

View File

@@ -2,10 +2,10 @@
<browserconfig> <browserconfig>
<msapplication> <msapplication>
<tile> <tile>
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-70x70.png"/> <square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-150x150.png"/> <square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-310x310.png"/> <square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-310x150.png"/> <wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.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.6.2\/docs\/assets\/favicons\/android-chrome-36x36.png", "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.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.6.2\/docs\/assets\/favicons\/android-chrome-48x48.png", "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.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.6.2\/docs\/assets\/favicons\/android-chrome-72x72.png", "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.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.6.2\/docs\/assets\/favicons\/android-chrome-96x96.png", "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.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.6.2\/docs\/assets\/favicons\/android-chrome-144x144.png", "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.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.6.2\/docs\/assets\/favicons\/android-chrome-192x192.png", "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.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.6.2/docs/assets/dokku.png); background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.6.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.6.2/docs/assets/gplaypattern.png); background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/gplaypattern.png);
padding: 45px 0; padding: 45px 0;
text-align: center; text-align: center;
} }

View File

@@ -3,6 +3,6 @@
"0.3.26", "0.3.26",
"0.4.14", "0.4.14",
"0.5.8", "0.5.8",
"0.6.2" "0.6.4"
] ]
} }

View File

@@ -13,6 +13,8 @@ config:unset (<app>|--global) KEY1 [KEY2 ...] Unset one or more conf
The variables are available both at run time and during the application build/compilation step for buildpack-based deploys. For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860). The variables are available both at run time and during the application build/compilation step for buildpack-based deploys. For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
For buildpack deploys, Dokku will create a `/app/.env` file that can be used for legacy buildpacks. Note that this is *not* updated when `config:set` or `config:unset` is called, and is only written during a `deploy` or `ps:rebuild`. Developers are encouraged to instead read from the application environment directly, as the proper values will be available then.
> Note: Global `ENV` files are sourced before app-specific `ENV` files. This means that app-specific variables will take precedence over global variables. Configuring your global `ENV` file is manual, and should be considered potentially dangerous as configuration applies to all applications. > Note: Global `ENV` files are sourced before app-specific `ENV` files. This means that app-specific variables will take precedence over global variables. Configuring your global `ENV` file is manual, and should be considered potentially dangerous as configuration applies to all applications.
You can set multiple environment variables at once: You can set multiple environment variables at once:

View File

@@ -4,6 +4,7 @@ Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.co
- Use `dokku config:set` to set the `BUILDPACK_URL` environment variable. - Use `dokku config:set` to set the `BUILDPACK_URL` environment variable.
- Add `BUILDPACK_URL` to a committed `.env` file in the root of your repository. - Add `BUILDPACK_URL` to a committed `.env` file in the root of your repository.
- See the [environment variable documentation](/dokku/configuration-management/) for more details.
- Create a `.buildpacks` file in the root of your repository. - Create a `.buildpacks` file in the root of your repository.
## Specifying a custom buildpack ## Specifying a custom buildpack

View File

@@ -14,21 +14,21 @@ tags:destroy <app> <tag> Remove app image tag
Example: Example:
``` ```
root@dokku:~# dokku tags node-js-app $ dokku tags node-js-app
=====> Image tags for dokku/node-js-app =====> Image tags for dokku/node-js-app
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
root@dokku:~# dokku tags:create node-js-app v0.9.0 $ dokku tags:create node-js-app v0.9.0
=====> Added v0.9.0 tag to dokku/node-js-app =====> Added v0.9.0 tag to dokku/node-js-app
root@dokku:~# dokku tags node-js-app $ dokku tags node-js-app
=====> Image tags for dokku/node-js-app =====> Image tags for dokku/node-js-app
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
dokku/node-js-app v0.9.0 936a42f25901 About a minute ago 1.025 GB dokku/node-js-app v0.9.0 936a42f25901 About a minute ago 1.025 GB
root@dokku:~# dokku tags:deploy node-js-app v0.9.0 $ dokku tags:deploy node-js-app v0.9.0
-----> Releasing node-js-app (dokku/node-js-app:v0.9.0)... -----> Releasing node-js-app (dokku/node-js-app:v0.9.0)...
-----> Deploying node-js-app (dokku/node-js-app:v0.9.0)... -----> Deploying node-js-app (dokku/node-js-app:v0.9.0)...
-----> Running pre-flight checks -----> Running pre-flight checks

View File

@@ -54,7 +54,7 @@ If you decide to obtain a CA signed certficate, you can import that certificate
The `certs:info` command will simply inspect the install SSL cert and print out details. NOTE: The server-wide certificate will be inspect if installed and no app-specific certificate exists. The `certs:info` command will simply inspect the install SSL cert and print out details. NOTE: The server-wide certificate will be inspect if installed and no app-specific certificate exists.
``` ```
root@dokku:~/dokku# dokku certs:info node-js-app $ dokku certs:info node-js-app
-----> Fetching SSL Endpoint info for node-js-app... -----> Fetching SSL Endpoint info for node-js-app...
-----> Certificate details: -----> Certificate details:
=====> Common Name(s): =====> Common Name(s):

View File

@@ -725,7 +725,7 @@ APP="$1"; verify_app_name "$APP"
- Description: Allows you to customize what occurs when an app is received. Normally just triggers an application build. - Description: Allows you to customize what occurs when an app is received. Normally just triggers an application build.
- Invoked by: `dokku git-hook`, `dokku ps:rebuild` - Invoked by: `dokku git-hook`, `dokku ps:rebuild`
- Arguments: `$APP $REV` - Arguments: `$APP $REV` (`$REV` may not be included in cases where a repository is not pushed)
- Example: - Example:
```shell ```shell

View File

@@ -66,7 +66,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.6.2-2 (Mon Feb 22 23:20:37 CET 2016)" # wait for "==> build-arch: ==> Finished making: dokku 0.6.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,30 +10,30 @@
<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.6.2/docs/assets/favicons/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-144x144.png"> <link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-152x152.png"> <link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-180x180.png"> <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192"> <link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/manifest.json"> <link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon.ico"> <link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.6.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.6.2/docs/assets/favicons/mstile-144x144.png"> <meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/browserconfig.xml"> <meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.6.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.6.2/docs/assets/style.css" rel="stylesheet"> <link href="https://cdn.rawgit.com/dokku/dokku/v0.6.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>
</style> </style>
@@ -95,12 +95,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.6.2/bootstrap.sh</span> <span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.6.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.6.2 bash bootstrap.sh</span> <span class="command">sudo DOKKU_TAG=v0.6.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>

View File

@@ -21,8 +21,8 @@ To install the latest stable version of dokku, you can run the following shell c
```shell ```shell
# for debian systems, installs dokku via apt-get # for debian systems, installs dokku via apt-get
wget https://raw.githubusercontent.com/dokku/dokku/v0.6.2/bootstrap.sh wget https://raw.githubusercontent.com/dokku/dokku/v0.6.4/bootstrap.sh
sudo DOKKU_TAG=v0.6.2 bash bootstrap.sh sudo DOKKU_TAG=v0.6.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.

View File

@@ -227,3 +227,7 @@ See the [ssl documentation](/dokku/deployment/ssl-configuration/).
## Disabling Nginx ## Disabling Nginx
See the [proxy documentation](/dokku/proxy/). See the [proxy documentation](/dokku/proxy/).
## Managing Proxy Port mappings
See the [proxy documentation](/dokku/proxy/#proxy-port-mapping).

View File

@@ -1,9 +1,6 @@
# Proxy plugin # Proxy plugin
> New as of 0.5.0 > New as of 0.5.0, Enhanced in 0.6.0
> Port handling functionality is new as of 0.6.0
As of dokku 0.5.0, the proxy functionality has been decoupled from the nginx-vhosts plugin into the proxy plugin. In the future this will allow other proxy software (HAproxy for example) to be used instead of nginx.
``` ```
proxy <app> Show proxy settings for app proxy <app> Show proxy settings for app
@@ -12,27 +9,72 @@ proxy:enable <app>
proxy:ports <app> List proxy port mappings for app proxy:ports <app> List proxy port mappings for app
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] Set proxy port mappings for app proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] Set proxy port mappings for app
proxy:ports-clear <app> Clear all proxy port mappings for app proxy:ports-clear <app> Clear all proxy port mappings for app
proxy:ports-remove <app> <host-port> [<host-port>...] Unset proxy port mappings for app proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] Unset proxy port mappings for app
proxy:set <app> <proxy-type> Set proxy type for app proxy:set <app> <proxy-type> Set proxy type for app
``` ```
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
## Container network interface binding ## Container network interface binding
By default, the deployed docker container running your app's web process will bind to the internal docker network interface (i.e. `docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CONTAINER_ID`). This behavior can be modified per app by disabling the proxy (i.e. `dokku proxy:disable <app>`). In this case, the container will bind to an external interface (i.e. 0.0.0.0) and your app container will be directly accessible by other hosts on your network. > New as of 0.5.0
> If a proxy is disabled, dokku will bind your container's port to a random port on the host, e.g. `0.0.0.0:32771->5000/tcp`. By default, the deployed docker container running your app's web process will bind to the internal docker network interface (i.e. `docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CONTAINER_ID`). This behavior can be modified per app by disabling the proxy (i.e. `dokku proxy:disable <app>`). In this case, the container will bind to an external interface (i.e. `0.0.0.0`) and your app container will be directly accessible by other hosts on your network.
> If a proxy is disabled, dokku will bind your container's port to a random port on the host for every deploy, e.g. `0.0.0.0:32771->5000/tcp`.
```shell ```shell
# container bound to docker interface # container bound to docker interface
root@dokku:~/dokku# docker ps $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1b88d8aec3d1 dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute node-js-app.web.1 1b88d8aec3d1 dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute node-js-app.web.1
root@dokku:~/dokku# docker inspect --format '{{ .NetworkSettings.IPAddress }}' node-js-app.web.1 # internal IP address for the container
$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' node-js-app.web.1
172.17.0.6 172.17.0.6
# disable the proxy so it listens on a host ip address
$ dokku proxy:disable node-js-app
# container bound to all interfaces # container bound to all interfaces
root@dokku:/home/dokku# docker ps $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d6499edb0edb dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute 0.0.0.0:49153->5000/tcp node-js-app.web.1 d6499edb0edb dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute 0.0.0.0:49153->5000/tcp node-js-app.web.1
``` ```
## Proxy port mapping
> New as of 0.6.0
You can now configure `host -> container` port mappings with the `proxy:ports-*` commands. This mapping is currently supported by the built-in nginx-vhosts plugin.
```shell
$ dokku proxy:ports node-js-app
-----> Port mappings for node-js-app
-----> scheme host port container port
http 80 5000
$ curl http://node-js-app.dokku.me
Hello World!
$ curl http://node-js-app.dokku.me:8080
curl: (7) Failed to connect to node-js-app.dokku.me port 8080: Connection refused
$ dokku proxy:ports-add node-js-app http:8080:5000
-----> Setting config vars
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
-----> Configuring node-js-app.dokku.me...(using built-in template)
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
Reloading nginx
$ curl http://node-js-app.dokku.me
Hello World!
$ curl http://node-js-app.dokku.me:8080
Hello World!
```
By default, buildpack apps and dockerfile apps **without** explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on port `80` (and additionally a listener on 443 if ssl is enabled) that will proxy to the application container on port `5000`. Dockerfile apps **with** explicitly exposed ports will be configured with a listener on each exposed port and will proxy to that same port of the deployed application container.
> NOTE: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `proxy:ports-*` syntax detailed above.

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.6.2/docs/assets/favicons/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-144x144.png"> <link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-152x152.png"> <link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-180x180.png"> <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192"> <link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/manifest.json"> <link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon.ico"> <link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.6.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.6.2/docs/assets/favicons/mstile-144x144.png"> <meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/browserconfig.xml"> <meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.6.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.6.2/docs/assets/style.css" rel="stylesheet"> <link href="https://cdn.rawgit.com/dokku/dokku/v0.6.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

@@ -7,7 +7,7 @@ __Solution:__
Most of the time it's caused by some defaults newer versions of nginx set. To make sure that's the issue you're having run the following: Most of the time it's caused by some defaults newer versions of nginx set. To make sure that's the issue you're having run the following:
``` ```
root@dockerapps:/home/git# nginx $ nginx -t
nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32 nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
``` ```
@@ -27,9 +27,9 @@ A value of 64 would allow domains with up to 64 characters. Set it to 128 if you
Save the file and try stopping nginx and starting it again: Save the file and try stopping nginx and starting it again:
``` ```
root@dockerapps:~/dokku# /etc/init.d/nginx stop $ /etc/init.d/nginx stop
* Stopping nginx nginx [ OK ] * Stopping nginx nginx [ OK ]
root@dockerapps:~/dokku# /etc/init.d/nginx start $ /etc/init.d/nginx start
* Starting nginx nginx [ OK ] * Starting nginx nginx [ OK ]
``` ```
@@ -65,14 +65,14 @@ __Solution (Less solution, more helpful troubleshooting steps):__
Find the failed phase's container image (*077581956a92* in this example) Find the failed phase's container image (*077581956a92* in this example)
``` ```
root@dokku:~# docker ps -a | grep build $ docker ps -a | grep build
94d9515e6d93 077581956a92 "/build" 29 minutes ago Exited (0) 25 minutes ago cocky_bell 94d9515e6d93 077581956a92 "/build" 29 minutes ago Exited (0) 25 minutes ago cocky_bell
``` ```
Start a new container with the failed image and poke around (i.e. ensure you can access the internet from within the container or attempt the failed command, if known) Start a new container with the failed image and poke around (i.e. ensure you can access the internet from within the container or attempt the failed command, if known)
``` ```
root@dokku:~# docker run -ti 077581956a92 /bin/bash $ docker run -ti 077581956a92 /bin/bash
root@9763ab86e1b4:/# curl -s -S icanhazip.com root@9763ab86e1b4:/# curl -s -S icanhazip.com
192.168.0.1 192.168.0.1
curl http://s3pository.heroku.com/node/v0.10.30/node-v0.10.30-linux-x64.tar.gz -o node-v0.10.30-linux-x64.tar.gz curl http://s3pository.heroku.com/node/v0.10.30/node-v0.10.30-linux-x64.tar.gz -o node-v0.10.30-linux-x64.tar.gz
@@ -84,7 +84,7 @@ __Solution (Less solution, more helpful troubleshooting steps):__
Additionally we've seen issues if changing networks that have different DNS resolvers. In this case, you can run the following to update your resolv.conf Additionally we've seen issues if changing networks that have different DNS resolvers. In this case, you can run the following to update your resolv.conf
``` ```
root@dokku:~# resolvconf -u $ resolvconf -u
``` ```
Please see https://github.com/dokku/dokku/issues/841 and https://github.com/dokku/dokku/issues/649 Please see https://github.com/dokku/dokku/issues/841 and https://github.com/dokku/dokku/issues/649

View File

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

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core events logging plugin" description = "dokku core events logging plugin"
version = "0.6.2" version = "0.6.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.6.2" version = "0.6.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.6.2" version = "0.6.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.6.2" version = "0.6.4"
[plugin.config] [plugin.config]

View File

@@ -34,9 +34,12 @@ certs_set() {
verify_app_name "$2" verify_app_name "$2"
local APP="$2"; local CRT_FILE="$3"; local KEY_FILE="$4"; local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls" local APP="$2"; local CRT_FILE="$3"; local KEY_FILE="$4"; local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
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_file_import "$CRT_FILE" "$KEY_FILE"; then
# importing from file
true
elif is_tar_import; then
local CERTS_SET_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_certs_set.XXXX") local CERTS_SET_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_certs_set.XXXX")
pushd "$CERTS_SET_TMP_WORK_DIR" &> /dev/null pushd "$CERTS_SET_TMP_WORK_DIR" &> /dev/null
trap 'popd &> /dev/null || true; rm -rf $CERTS_SET_TMP_WORK_DIR > /dev/null' RETURN trap 'popd &> /dev/null || true; rm -rf $CERTS_SET_TMP_WORK_DIR > /dev/null' RETURN
@@ -61,6 +64,10 @@ certs_set() {
else else
local KEY_FILE=$KEY_FILE_SEARCH local KEY_FILE=$KEY_FILE_SEARCH
fi fi
else
dokku_log_fail "Tar archive containing server.crt and server.key expected on stdin"
fi fi
mkdir -p "$APP_SSL_PATH" mkdir -p "$APP_SSL_PATH"

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_proctype_checks_skipped "$APP" "$PROC_TYPE")" == "true" ]]; then if [[ "$(is_app_proctype_checks_skipped "$APP" "$DOKKU_APP_CONTAINER_TYPE")" == "true" ]]; then
dokku_log_info2_quiet "Zero downtime checks for app ($APP) have been skipped. moving on..." dokku_log_info2_quiet "Zero downtime checks for app ($APP) have been skipped. moving on..."
exit 0 exit 0
fi fi

View File

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

View File

@@ -288,7 +288,7 @@ copy_from_image() {
} }
get_app_container_ids() { get_app_container_ids() {
declare desc="returns list of docker container ids for given app/container_type" declare desc="returns list of docker container ids for given app and optional container_type"
local APP="$1"; local CONTAINER_TYPE="$2" local APP="$1"; local CONTAINER_TYPE="$2"
verify_app_name "$APP" verify_app_name "$APP"
[[ -f $DOKKU_ROOT/$APP/CONTAINER ]] && DOKKU_CIDS+=$(< "$DOKKU_ROOT/$APP/CONTAINER") [[ -f $DOKKU_ROOT/$APP/CONTAINER ]] && DOKKU_CIDS+=$(< "$DOKKU_ROOT/$APP/CONTAINER")
@@ -315,15 +315,15 @@ get_app_container_ids() {
} }
get_app_running_container_ids() { get_app_running_container_ids() {
declare desc="return list of running docker container ids for given apps" declare desc="return list of running docker container ids for given app and optional container_type"
local APP=$1 local APP="$1" CONTAINER_TYPE="$2"
verify_app_name "$APP" verify_app_name "$APP"
! (is_deployed "$APP") && dokku_log_fail "App $APP has not been deployed" ! (is_deployed "$APP") && dokku_log_fail "App $APP has not been deployed"
local CIDS=$(get_app_container_ids "$APP") local CIDS=$(get_app_container_ids "$APP" "$CONTAINER_TYPE")
for CID in $CIDS; do for CID in $CIDS; do
local APP_CONTAINER_STATUS=$(docker inspect -f '{{.State.Running}}' "$CID" || true) local APP_CONTAINER_STATUS=$(docker inspect -f '{{.State.Running}}' "$CID" 2>/dev/null || true)
[[ "$APP_CONTAINER_STATUS" == "true" ]] && local APP_RUNNING_CONTAINER_IDS+="$CID " [[ "$APP_CONTAINER_STATUS" == "true" ]] && local APP_RUNNING_CONTAINER_IDS+="$CID "
done done
@@ -540,7 +540,7 @@ dokku_deploy_cmd() {
if [[ "$(is_app_proctype_checks_disabled "$APP" "$PROC_TYPE")" == "true" ]]; then if [[ "$(is_app_proctype_checks_disabled "$APP" "$PROC_TYPE")" == "true" ]]; then
dokku_log_info1 "zero downtime is disabled for app ($APP.$PROC_TYPE). stopping currently running containers" dokku_log_info1 "zero downtime is disabled for app ($APP.$PROC_TYPE). stopping currently running containers"
local cid proctype_oldids="$(get_app_container_ids "$APP" "$PROC_TYPE")" local cid proctype_oldids="$(get_app_running_container_ids "$APP" "$PROC_TYPE")"
for cid in $proctype_oldids; do for cid in $proctype_oldids; do
dokku_log_info2 "stopping $APP.$PROC_TYPE ($cid)" dokku_log_info2 "stopping $APP.$PROC_TYPE ($cid)"
# shellcheck disable=SC2086 # shellcheck disable=SC2086
@@ -1057,7 +1057,7 @@ strip_inline_comments() {
is_valid_hostname() { is_valid_hostname() {
declare desc="return 0 if argument is a valid hostname; else return 1" declare desc="return 0 if argument is a valid hostname; else return 1"
local hostname_string="$1"; local hostname_regex='^(([a-zA-Z\*](-?[a-zA-Z0-9])*)\.)*[a-zA-Z\*](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}$' local hostname_string="$1"; local hostname_regex='^(([a-zA-Z0-9\*](-?[a-zA-Z0-9])*)\.)*[a-zA-Z\*](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}$'
if [[ $hostname_string =~ $hostname_regex ]]; then if [[ $hostname_string =~ $hostname_regex ]]; then
return 0 return 0
else else

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core common plugin" description = "dokku core common plugin"
version = "0.6.2" version = "0.6.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.6.2" version = "0.6.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.6.2" version = "0.6.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.6.2" version = "0.6.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.6.2" version = "0.6.4"
[plugin.config] [plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core git plugin" description = "dokku core git plugin"
version = "0.6.2" version = "0.6.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.6.2" version = "0.6.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.6.2" version = "0.6.4"
[plugin.config] [plugin.config]

View File

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

View File

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

View File

@@ -13,7 +13,7 @@ case "$1" in
proxy:ports <app>, List proxy port mappings for app proxy:ports <app>, List proxy port mappings for app
proxy:ports-clear <app>, Clear all proxy port mappings for app proxy:ports-clear <app>, Clear all proxy port mappings for app
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...], Set proxy port mappings for app proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...], Set proxy port mappings for app
proxy:ports-remove <app> <host-port> [<host-port>...], Unset proxy port mappings for app proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...], Unset proxy port mappings for app
proxy:set <app> <proxy-type>, Set proxy type for app proxy:set <app> <proxy-type>, Set proxy type for app
help_content help_content
} }

View File

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

View File

@@ -9,13 +9,19 @@ proxy_ports_remove_cmd() {
local cmd="proxy:ports-remove" local cmd="proxy:ports-remove"
local APP="$2"; verify_app_name "$APP" local APP="$2"; verify_app_name "$APP"
local PROXY_PORT_MAP="$(config_get "$APP" DOKKU_PROXY_PORT_MAP || true)" local PROXY_PORT_MAP="$(config_get "$APP" DOKKU_PROXY_PORT_MAP || true)"
local RE_PORT='^[0-9]+$'
shift 2 shift 2
local INPUT_PORTS="$*" local INPUT_PORTS="$*"
if [[ -n "$INPUT_PORTS" ]]; then if [[ -n "$INPUT_PORTS" ]]; then
local port local port
PROXY_PORT_MAP=" $PROXY_PORT_MAP "
for port in $INPUT_PORTS; do for port in $INPUT_PORTS; do
PROXY_PORT_MAP="$(sed -r "s/[[:alnum:]]+:$port:[[:alnum:]]+//g" <<< "$PROXY_PORT_MAP")" if [[ "$port" =~ $RE_PORT ]]; then
PROXY_PORT_MAP="$(sed -r "s/[[:alnum:]]+:$port:[[:alnum:]]+//g" <<< "$PROXY_PORT_MAP")"
else
PROXY_PORT_MAP="$(sed -r "s/ $port / /g" <<< "$PROXY_PORT_MAP")"
fi
done done
PROXY_PORT_MAP="$(echo "$PROXY_PORT_MAP" | xargs)" PROXY_PORT_MAP="$(echo "$PROXY_PORT_MAP" | xargs)"
PROXY_PORT_MAP="$(merge_dedupe_list "$PROXY_PORT_MAP" " ")" PROXY_PORT_MAP="$(merge_dedupe_list "$PROXY_PORT_MAP" " ")"

View File

@@ -1,4 +1,4 @@
[plugin] [plugin]
description = "dokku core ps plugin" description = "dokku core ps plugin"
version = "0.6.2" version = "0.6.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.6.2" version = "0.6.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.6.2" version = "0.6.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.6.2" version = "0.6.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.6.2" version = "0.6.4"
[plugin.config] [plugin.config]

View File

@@ -172,3 +172,32 @@ teardown() {
echo "status: "$status echo "status: "$status
assert_output "web,notifications" assert_output "web,notifications"
} }
@test "(checks) checks:disable -> app start with missing containers" {
run bash -c "dokku ps:scale $TEST_APP worker=1"
echo "output: "$output
echo "status: "$status
assert_success
deploy_app
run bash -c "dokku checks:disable $TEST_APP worker"
echo "output: "$output
echo "status: "$status
assert_success
run bash -c "dokku ps:stop $TEST_APP"
echo "output: "$output
echo "status: "$status
assert_success
run bash -c "dokku cleanup"
echo "output: "$output
echo "status: "$status
assert_success
run bash -c "dokku ps:start $TEST_APP"
echo "output: "$output
echo "status: "$status
assert_success
}

View File

@@ -31,10 +31,14 @@ teardown() {
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
assert_success assert_success
run dokku domains:add $TEST_APP 2.app.dokku.me
echo "output: "$output
echo "status: "$status
assert_success
} }
@test "(domains) domains:add (multiple)" { @test "(domains) domains:add (multiple)" {
run dokku domains:add $TEST_APP www.test.app.dokku.me test.app.dokku.me run dokku domains:add $TEST_APP 2.app.dokku.me www.test.app.dokku.me test.app.dokku.me
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
assert_success assert_success

View File

@@ -64,7 +64,7 @@ assert_external_port() {
} }
@test "(proxy) proxy:ports (list/add/remove/clear)" { @test "(proxy) proxy:ports (list/add/remove/clear)" {
run dokku proxy:ports-add $TEST_APP http:8080:5000 https:8443:5000 run dokku proxy:ports-add $TEST_APP http:8080:5000 https:8443:5000 http:1234:5001
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
assert_success assert_success
@@ -72,13 +72,23 @@ assert_external_port() {
run /bin/bash -c "dokku --quiet proxy:ports $TEST_APP | xargs" run /bin/bash -c "dokku --quiet proxy:ports $TEST_APP | xargs"
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
assert_output "http 8080 5000 https 8443 5000" assert_output "http 1234 5001 http 8080 5000 https 8443 5000"
run /bin/bash -c "dokku proxy:ports-remove $TEST_APP 8080" run /bin/bash -c "dokku proxy:ports-remove $TEST_APP 8080"
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
assert_success assert_success
run /bin/bash -c "dokku --quiet proxy:ports $TEST_APP | xargs"
echo "output: "$output
echo "status: "$status
assert_output "http 1234 5001 https 8443 5000"
run /bin/bash -c "dokku proxy:ports-remove $TEST_APP http:1234:5001"
echo "output: "$output
echo "status: "$status
assert_success
run /bin/bash -c "dokku --quiet proxy:ports $TEST_APP | xargs" run /bin/bash -c "dokku --quiet proxy:ports $TEST_APP | xargs"
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status