Compare commits
144 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2da58ff351 | ||
|
|
af48605054 | ||
|
|
66790e3d82 | ||
|
|
2c201a7d6f | ||
|
|
78d2b3e7d2 | ||
|
|
9b60f0c3c6 | ||
|
|
668437a9e5 | ||
|
|
5f30115796 | ||
|
|
5c6e39d2c0 | ||
|
|
6a9d9f212f | ||
|
|
599bd59c6f | ||
|
|
e4dd40bbcc | ||
|
|
325b9258e4 | ||
|
|
8cef6b2074 | ||
|
|
fe00835aa7 | ||
|
|
ad0d2b1f6d | ||
|
|
c27b0c08ed | ||
|
|
c73094615e | ||
|
|
989ea72490 | ||
|
|
d9e1548683 | ||
|
|
e474d49320 | ||
|
|
e4d916c308 | ||
|
|
e30c01c234 | ||
|
|
9ae9c7ad11 | ||
|
|
ea240f117e | ||
|
|
68fb0e7b98 | ||
|
|
9d74f1ecf2 | ||
|
|
2356dbd594 | ||
|
|
7aa48d3426 | ||
|
|
b8b4f6fedf | ||
|
|
25a2801cb1 | ||
|
|
86ef6ae5d1 | ||
|
|
4e99078ac1 | ||
|
|
7de160b64d | ||
|
|
99030a110c | ||
|
|
ee18909935 | ||
|
|
4f621916a7 | ||
|
|
f89f946c40 | ||
|
|
8e34477c96 | ||
|
|
5940e43c85 | ||
|
|
c1c76362e7 | ||
|
|
a034ec9803 | ||
|
|
2da4f5ef03 | ||
|
|
d7386317fc | ||
|
|
851ca592d5 | ||
|
|
9d584ed145 | ||
|
|
ac1c4dc571 | ||
|
|
32505b14e7 | ||
|
|
1bcd76ffe9 | ||
|
|
565cd5c0e8 | ||
|
|
8597b692ee | ||
|
|
e9447a26d9 | ||
|
|
17a602efe8 | ||
|
|
7b1bc522f6 | ||
|
|
64f83f976e | ||
|
|
cb9efa3322 | ||
|
|
28f83ab0d5 | ||
|
|
be13b0149a | ||
|
|
e73c89abc8 | ||
|
|
7a36ecf196 | ||
|
|
33dd90a091 | ||
|
|
c67a4dcc7d | ||
|
|
546551e6e9 | ||
|
|
bd4aee0864 | ||
|
|
06d18b4cbd | ||
|
|
075de78442 | ||
|
|
3cead25acf | ||
|
|
559347f985 | ||
|
|
613679352b | ||
|
|
d6c7682068 | ||
|
|
4cd847fb27 | ||
|
|
58e3556e0e | ||
|
|
500a6dd73b | ||
|
|
7d3571757d | ||
|
|
26ee0d7ae2 | ||
|
|
13f7727fe3 | ||
|
|
8a14b34446 | ||
|
|
6a39fd70e1 | ||
|
|
fff050c71d | ||
|
|
61327620da | ||
|
|
80cc57caa0 | ||
|
|
55f38414d1 | ||
|
|
96da38a8e4 | ||
|
|
25b144e496 | ||
|
|
478f5e34d3 | ||
|
|
47dfa921cd | ||
|
|
c162f57dbd | ||
|
|
92073eda12 | ||
|
|
bb9b36b291 | ||
|
|
8b93d9bf54 | ||
|
|
7b8cefbadc | ||
|
|
579ffa5a62 | ||
|
|
c6fa061604 | ||
|
|
fd811b020a | ||
|
|
9ae2ab105b | ||
|
|
1a94a62fe3 | ||
|
|
a13a0df35e | ||
|
|
f6bdd948b1 | ||
|
|
1ceee12fc4 | ||
|
|
dbacfed855 | ||
|
|
3ac21ae9a3 | ||
|
|
7985e93e29 | ||
|
|
4230e816df | ||
|
|
ae3aae9af8 | ||
|
|
67d7a64a51 | ||
|
|
cdc327b777 | ||
|
|
3c9a1d488b | ||
|
|
72d46ba64b | ||
|
|
d9feca5606 | ||
|
|
f29f4294c7 | ||
|
|
db94fcb6b4 | ||
|
|
4945bd79ca | ||
|
|
22d053c9d0 | ||
|
|
6482ae164c | ||
|
|
7900a2e97e | ||
|
|
95993955c5 | ||
|
|
6b48b250a7 | ||
|
|
66ad41f814 | ||
|
|
a36d35d752 | ||
|
|
89d1a9751c | ||
|
|
841c8c22d7 | ||
|
|
cb9d98a819 | ||
|
|
a62bae8c7c | ||
|
|
344a63b956 | ||
|
|
0ea44cfafb | ||
|
|
1948a41949 | ||
|
|
50e928b685 | ||
|
|
7352cd05c5 | ||
|
|
94980c8394 | ||
|
|
ba66a42891 | ||
|
|
1ec1a6cd7d | ||
|
|
58eb6f3c54 | ||
|
|
78e106cff2 | ||
|
|
1cf82a6020 | ||
|
|
7938bd08ae | ||
|
|
20312ffa4b | ||
|
|
539b765e21 | ||
|
|
36edeb2401 | ||
|
|
58af2417e2 | ||
|
|
5fc97e9553 | ||
|
|
3e868a41e9 | ||
|
|
2e7dde73ab | ||
|
|
c72d337f69 | ||
|
|
a8c1b728d2 |
@@ -1,6 +1,7 @@
|
||||
# How to contribute
|
||||
|
||||
Dokku loves to welcome your contributions. There are several ways to help out:
|
||||
The Dokku project would love to welcome your contributions. There are
|
||||
several ways to help out:
|
||||
|
||||
* Create an [issue](https://github.com/dokku/dokku/issues) on GitHub, if you
|
||||
have found a bug
|
||||
@@ -8,6 +9,8 @@ Dokku loves to welcome your contributions. There are several ways to help out:
|
||||
* Write patches for open bug/feature issues, preferably with test cases
|
||||
included
|
||||
* Contribute to the [documentation](http://dokku.viewdocs.io/dokku/)
|
||||
* Come up with new ways to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
||||
* Blog about different ways you are using dokku
|
||||
|
||||
There are a few guidelines that we need contributors to follow so that we have
|
||||
a chance of keeping on top of things.
|
||||
|
||||
97
HISTORY.md
@@ -1,5 +1,102 @@
|
||||
# History
|
||||
|
||||
## 0.5.7
|
||||
|
||||
0.5.7 includes quite a few documentation updates, and a few minor changes in how we handle certain edge-cases in day-to-day dokku tasks.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2157: @michaelshobbs test detached container is running
|
||||
- #2170: @jvanbaarsen Do not fail domains:add when adding a duplicated domain
|
||||
- #2171: @tobru Continue to restore applications during boot when any given application does not start
|
||||
- #2173: @michaelshobbs Add test for ps:restore with undeployed app
|
||||
- #2202: @michaelshobbs Attempt to bypass inconsistencies in nginx start behavior
|
||||
|
||||
### New Features
|
||||
|
||||
- #2155: @josegonzalez Add the ability to run containers in detached mode
|
||||
- #2163: @michaelshobbs Support deployment of arbitrary docker images not built by dokku build
|
||||
- #2175: @michaelshobbs Show available types and ids on dokku enter error
|
||||
- #2193: @josegonzalez Upgrade herokuish version built via deb packaging
|
||||
- #2203: Allow specifying NO_INSTALL_RECOMMENDS via DOKKU_NO_INSTALL_RECOMMENDS in bootstrapped installs
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2164: @iloveitaly Adding longtimeout and hostname to dokku plugin list
|
||||
- #2167: @iloveitaly Adding link to rollbar plugin
|
||||
- #2182: @cu12 Add link to FakeSNS plugin
|
||||
- #2183: @Epigene Update nginx docs to mirror generated nginx.conf from core
|
||||
- #2187: @pltchuong Add missing trigger to plugin triggers documentation
|
||||
- #2190: @cu12 Add ElasticMQ plugin to documentation
|
||||
- #2191: @josegonzalez Clarify upgrade docs for bootstrap.sh installations
|
||||
- #2192: @josegonzalez Clarify that the checks are only run against the web process
|
||||
- #2194: @josegonzalez Clarify the role of process types for buildpack deployment
|
||||
- #2195: @josegonzalez Clarify when certain plugin triggers are invoked
|
||||
|
||||
## 0.5.6
|
||||
|
||||
Release 0.5.6 is mostly a documentation release. Please note, however, that we now inject application environment variables into sigil-generated nginx configurations. You can use this to further improve your generated nginx configuration files.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2120: @u2mejc Add apex help_content for certs,nginx,storage,tar plugins
|
||||
- #2122: @michaelshobbs Add 10.0.0.2 so *.dokku.me works
|
||||
- #2145: @michaelshobbs Fix dockerfile-procfile test
|
||||
|
||||
### New Features
|
||||
|
||||
- #2150: @michaelshobbs export app config vars into sigil environment for use in nginx templates
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2099: @ojosdegris Added clarification on configuration via separate files
|
||||
- #2107: @simenbrekken Add CI deployment recipe
|
||||
- #2112: @josegonzalez Alphabetize triggers
|
||||
- #2114: @josegonzalez Add table of contents to sidebar when there is a table of contents
|
||||
- #2115: @josegonzalez Document potential dockerfile/nginx.conf.sigil issues
|
||||
- #2116: @josegonzalez Warn users when there is a low memory condition on installation
|
||||
- #2127: @crisward Added dokku require plugin
|
||||
- #2129: @christiangenco Condense upgrading instructions
|
||||
- #2136: @josegonzalez Use `sleep infinity` for enter cron task
|
||||
- #2142: @Aluxian Add dokku-nginx-cache to the list of plugins
|
||||
|
||||
## 0.5.5
|
||||
|
||||
Release 0.5.5 is mostly a documentation release, further clarifying how our default proxy implementation (nginx) interacts with Dockerfiles. Note that we also updated how ssl certificates interact with application domains, so please check out our domains and ssl documentation.
|
||||
|
||||
We've also added a small section to the [dokku homepage](http://dokku.viewdocs.io/dokku/) that lists the current core team. Feel free to look at their beautiful faces and imagine yourself contributing to Dokku and joining our core team. There are [quite a few ways to contribute](https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md) - even without code/documentation - so feel more than free to jump on the bandwagon!
|
||||
|
||||
Finally, we've started an [Official Dokku Blog](https://dokku.github.io/), where we will post about dokku internals, roadmaps, potential use-cases, etc. An rss feed is available [here](https://dokku.github.io/feed.xml).
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2094: @josegonzalez Create storage directories on install. Closes #2091
|
||||
- #2102: @josegonzalez Only strip .git directory from end of url
|
||||
|
||||
### New Features
|
||||
|
||||
- #2088: @josegonzalez Upgrade herokuish package
|
||||
- #2089: @michaelshobbs Update how ssl and multiple domains interact
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2076: @josegonzalez Add a note to dockerfile deploys concerning ports being exposed as http
|
||||
- #2080: @michaelshobbs Clarify the need for contents of dockerfile when debugging
|
||||
- #2082: @michaelshobbs Add use case example for ssl redirect
|
||||
- #2083: @louisbl Clarify 0.5.0 migration guide about `EXPOSE`
|
||||
- #2084: @louisbl Clarify where to put nginx custom template without `WORKDIR`
|
||||
- #2093: @fwolfst Fix path in storage example
|
||||
- #2098: @josegonzalez Add a blog link to the header area
|
||||
- #2100: @kane-c Fix docs navigation link to domain configuration
|
||||
- #2104: @crisward Added new clone plugin
|
||||
- #2105: @josegonzalez Add a note about how disabling the proxy affects the host port an application is deployed to
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -15,11 +15,11 @@ Output of the following commands
|
||||
(BEWARE: `docker inspect` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
|
||||
- `cat /home/dokku/<app>/nginx.conf` (if applicable):
|
||||
- Link to the exact repository being deployed (if possible/applicable):
|
||||
- If a deploy is failing:
|
||||
- If a deploy is failing or behaving unexpectedly:
|
||||
- Application name
|
||||
- The type of application being deployed (node, php, python, ruby, etc.)
|
||||
- Whether or not you have a `Dockerfile` in the root of your repository
|
||||
- If using buildpacks, which custom buildpacks are in use
|
||||
- If using a `Dockerfile`, the contents of that file
|
||||
- If it exists, the contents of your `Procfile`.
|
||||
- Output of failing dokku commands after running `dokku trace on`
|
||||
(BEWARE: `trace on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
|
||||
|
||||
@@ -10,8 +10,8 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. S
|
||||
|
||||
To install the latest stable release, you can run the following commands as a user that has access to `sudo`:
|
||||
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.5.7 bash bootstrap.sh
|
||||
|
||||
### Upgrading
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
# It also means that we can't run a partially downloaded script.
|
||||
|
||||
ensure-environment() {
|
||||
local FREE_MEMORY
|
||||
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
|
||||
if ! command -v apt-get &>/dev/null; then
|
||||
echo "This installation script requires apt-get. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
@@ -22,6 +23,12 @@ ensure-environment() {
|
||||
echo "This installation script requires that you have a hostname set for the instance. Please set a hostname for 127.0.0.1 in your /etc/hosts"
|
||||
exit 1
|
||||
}
|
||||
|
||||
FREE_MEMORY=$(grep MemTotal /proc/meminfo | awk '{print $2}')
|
||||
if [[ "$FREE_MEMORY" -lt 1003600 ]]; then
|
||||
echo "For dokku to build containers, it is strongly suggested that you have 1024 megabytes or more of free memory"
|
||||
echo "If necessary, please consult this document to setup swap: http://dokku.viewdocs.io/dokku/advanced-installation/#vms-with-less-than-1gb-of-memory"
|
||||
fi
|
||||
}
|
||||
|
||||
install-requirements() {
|
||||
@@ -78,7 +85,7 @@ install-dokku-from-source() {
|
||||
|
||||
install-dokku-from-package() {
|
||||
local DOKKU_CHECKOUT="$1"
|
||||
local NO_INSTALL_RECOMMENDS=""
|
||||
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
||||
|
||||
if [[ -n $DOKKU_DOCKERFILE ]]; then
|
||||
NO_INSTALL_RECOMMENDS=" --no-install-recommends "
|
||||
|
||||
@@ -11,6 +11,8 @@ dependencies:
|
||||
override:
|
||||
- ./tests/ci/parallel_runner.sh setup: { timeout: 300 }
|
||||
- echo "export DOKKU_SKIP_CLEANUP=true" > /home/dokku/.dokkurc/dokku_skip_cleanup
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
||||
- sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
||||
post:
|
||||
- sudo -E make -e lint
|
||||
test:
|
||||
|
||||
@@ -9,7 +9,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.5.4'
|
||||
VERSION = 'v0.5.7'
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
|
||||
2
deb.mk
@@ -1,6 +1,6 @@
|
||||
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
|
||||
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
|
||||
HEROKUISH_VERSION ?= 0.3.9
|
||||
HEROKUISH_VERSION ?= 0.3.13
|
||||
HEROKUISH_ARCHITECTURE = amd64
|
||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
||||
|
||||
|
||||
2
debian/control
vendored
@@ -1,5 +1,5 @@
|
||||
Package: dokku
|
||||
Version: 0.5.4
|
||||
Version: 0.5.7
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
|
||||
6
debian/postinst
vendored
@@ -18,6 +18,10 @@ case "$1" in
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
|
||||
echo "Setting up storage directories"
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/data ${DOKKU_LIB_ROOT}/data/storage
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/data
|
||||
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/available ${DOKKU_LIB_ROOT}/plugins/available
|
||||
@@ -88,7 +92,7 @@ case "$1" in
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ -f "$RET" ]; then
|
||||
sshcommand acl-add dokku default < "$RET"
|
||||
sshcommand acl-add dokku default < "$RET" || true
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
You can always install dokku straight from the latest - potentially unstable - master release via the following bash command:
|
||||
|
||||
```shell
|
||||
wget -qO- https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh | sudo DOKKU_BRANCH=master bash
|
||||
# using a branch results in installing from source
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh
|
||||
sudo DOKKU_BRANCH=master bash bootstrap.sh
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
- Replaced "magic" `NO_VHOST` variable with `domains:enable/disable`
|
||||
- Simplified zero downtime control
|
||||
- `checks:enable/disable`
|
||||
## Dockerfile apps with multiple ports
|
||||
- Dockerfiles with multiple `EXPOSE` clauses will get all **tcp** ports proxied by default (nginx does not support proxying udp)
|
||||
- UDP can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`
|
||||
|
||||
## Dockerfile apps with exposed ports
|
||||
|
||||
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/dokku/deployment/dockerfiles/#exposed-ports)
|
||||
- Note that nginx will proxy the same port numbers to listen publicly
|
||||
- UDP ports can be exposed by disabling the [nginx proxy](/dokku/proxy/) with `dokku proxy:disable myapp`
|
||||
|
||||
@@ -182,11 +182,11 @@ This is in particular useful, then you want to deploy to root domain, as
|
||||
|
||||
## Dokku/Docker Container Management Compatibility
|
||||
|
||||
Dokku is, at its core, a docker container manager. Thus, it does not necessarily play well with other out-of-band processes interacting with the docker daemon. One thing to note as in [issue #1220](https://github.com/dokku/dokku/issues/1220), dokku executes a cleanup function prior to every deployment.
|
||||
Dokku is, at its core, a docker container manager. Thus, it does not necessarily play well with other out-of-band processes interacting with the docker daemon. One thing to note as in [issue #1220](https://github.com/dokku/dokku/issues/1220), dokku executes a cleanup function prior to every deployment.
|
||||
|
||||
As of 0.5.x, this function removes all containers with the label `dokku` where the status is either `dead` or `exited`, as well as all `dangling` images. Previous versions would remove `dead` or `exited` containers, regardless of their label.
|
||||
|
||||
### Adding deploy users
|
||||
## Adding deploy users
|
||||
|
||||
See the [user management documentation](/dokku/deployment/user-management).
|
||||
|
||||
@@ -198,7 +198,7 @@ See the [nginx documentation](/dokku/nginx/#default-site).
|
||||
|
||||
See the [dockerfile documentation](/dokku/deployment/dockerfiles/).
|
||||
|
||||
### Specifying a custom buildpack
|
||||
## Specifying a custom buildpack
|
||||
|
||||
See the [buildpack documentation](/dokku/deployment/buildpacks/).
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.7\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.7\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.7\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.7\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.7\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.7\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
BIN
docs/assets/slack-logo.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
@@ -36,13 +36,13 @@ h1 {
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -178,6 +178,37 @@ h1 {
|
||||
display: inline-block;
|
||||
margin-left: 0.5em
|
||||
}
|
||||
.slack-button {
|
||||
background-image: -webkit-linear-gradient(#FCFCFC, #EAEAEA);
|
||||
background-image: linear-gradient(#FCFCFC, #EAEAEA);
|
||||
border: 1px solid #ddd;
|
||||
padding: 0.25rem 0.5rem;
|
||||
}
|
||||
.slack-button img {
|
||||
height: 1em;
|
||||
}
|
||||
.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; }
|
||||
|
||||
.list-group-item {
|
||||
border: none;
|
||||
font-weight: normal;
|
||||
@@ -199,6 +230,15 @@ a.list-group-item {
|
||||
margin-top: 2em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.table-of-contents {
|
||||
font-size: 0.8em;
|
||||
padding: 1em;
|
||||
margin: 0 0 0.5em 0.5em;
|
||||
}
|
||||
.table-of-contents ul {
|
||||
margin-bottom: 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.anchorjs-link {
|
||||
color: #24cbce;
|
||||
}
|
||||
@@ -488,11 +528,6 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
font-size: 50px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
.featurette img {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.featurette img {
|
||||
width: 300px;
|
||||
@@ -501,3 +536,8 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
.featurette img {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
docs/assets/team/flink-hidden.jpg
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
docs/assets/team/flink.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/assets/team/josegonzalez-hidden.jpg
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
docs/assets/team/josegonzalez.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/assets/team/michaelshobbs-hidden.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
docs/assets/team/michaelshobbs.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
docs/assets/team/morrisjobke-hidden.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
docs/assets/team/morrisjobke.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
docs/assets/team/progrium-hidden.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
docs/assets/team/progrium.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/assets/team/u2mejc-hidden.jpg
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
docs/assets/team/u2mejc.jpg
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
@@ -2,6 +2,6 @@
|
||||
"max-versions": [
|
||||
"0.3.26",
|
||||
"0.4.14",
|
||||
"0.5.4"
|
||||
"0.5.7"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ dokku config:set <app> DOKKU_WAIT_TO_RETIRE=120
|
||||
|
||||
If your application needs a longer period to boot up - perhaps to load data into memory, or because of slow boot time - you may also use dokku's `checks` functionality to more precisely check whether an application can serve traffic or not.
|
||||
|
||||
Checks are run against the detected `web` process from your application's `Procfile`. For non-web processes, dokku will fallback to the aforementioned process uptime check.
|
||||
|
||||
To specify checks, add a `CHECKS` file to the root of your project directory. The `CHECKS` file should be plain text and may contain:
|
||||
|
||||
* Check instructions
|
||||
@@ -277,3 +279,10 @@ To dokku@dokku.example.com:myapp
|
||||
! [remote rejected] dokku -> master (pre-receive hook declined)
|
||||
error: failed to push some refs to 'dokku@dokku.example.com:myapp'
|
||||
````
|
||||
|
||||
### Configuring docker stop timeout
|
||||
|
||||
[By default](https://docs.docker.com/engine/reference/commandline/stop/), docker will wait 10 seconds from the time the `stop` command is passed to a container before it attempts to kill said container. This timeout can be configured on a per-app basis in dokku by setting the `DOKKU_DOCKER_STOP_TIMEOUT` configuration variable. This timeout applies to normal zero-downtime deployments as well as the `ps:stop` and `apps:destroy` commands.
|
||||
```
|
||||
$ dokku config:set $APP DOKKU_DOCKER_STOP_TIMEOUT=20
|
||||
```
|
||||
|
||||
@@ -56,6 +56,31 @@ You may also wish to use a **specific** version of a buildpack, which is also si
|
||||
dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v87
|
||||
```
|
||||
|
||||
## Specifying commands via Procfile
|
||||
|
||||
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/dokku/process-management/) for more details around scaling individual processes.
|
||||
|
||||
A Procfile is a file named `Procfile`. It should be named `Procfile` exactly, and not anything else. For example, `Procfile.txt` is not valid. The file should be a simple text file.
|
||||
|
||||
The file must be placed in the root directory of your application. It will not function if placed in a subdirectory.
|
||||
|
||||
If the file exists, it should not be empty, as doing so may result in a failed deploy.
|
||||
|
||||
The syntax for declaring a `Procfile` is as follows. Note that the format is one process type per line, with no duplicate process types.
|
||||
|
||||
```
|
||||
<process type>: <command>
|
||||
```
|
||||
|
||||
If, for example, you have multiple queue workers and wish to scale them separately, the following would be a valid way to work around the requirement of not duplicating process types:
|
||||
|
||||
```
|
||||
worker: env QUEUE=* bundle exec rake resque:work
|
||||
importantworker: env QUEUE=important bundle exec rake resque:work
|
||||
```
|
||||
|
||||
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/dokku/process-management/) for more details around scaling individual processes.
|
||||
|
||||
## Clearing buildpack cache
|
||||
|
||||
Building containers with buildpacks currently results in a persistent `cache` directory between deploys. If you need to clear this cache directory for any reason, you may do so by running the following shell command:
|
||||
@@ -65,7 +90,7 @@ Building containers with buildpacks currently results in a persistent `cache` di
|
||||
sudo rm -rf /home/dokku/APP/cache/*
|
||||
```
|
||||
|
||||
### Curl Build Timeouts
|
||||
## Curl Build Timeouts
|
||||
|
||||
Certain buildpacks may time out in retrieving dependencies via curl. This can happen when your network connection is poor or if there is significant network congestion. You may see a message similar to `gzip: stdin: unexpected end of file` after a curl command.
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
While Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) for deployment, you can also use docker's native `Dockerfile` system to define a container.
|
||||
|
||||
> Dockerfile support is considered a **Power User** feature. By using Dockerfile-based deployment, you agree that you will not have the same comfort as that enjoyed by Buildpack users, and Dokku features may work differently. Differences between the two systems will be documented here.
|
||||
|
||||
To use a dockerfiles for deployment, commit a valid `Dockerfile` to the root of your repository and push the repository to your Dokku installation. If this file is detected, Dokku will default to using it to construct containers **except** in the following two cases:
|
||||
|
||||
- The application has a `BUILDPACK_URL` environment variable set via the `dokku config:set` command or in a committed `.env` file. In this case, Dokku will use your specified buildpack.
|
||||
@@ -19,6 +21,8 @@ Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port
|
||||
|
||||
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.
|
||||
|
||||
When ports are exposed through the default nginx proxy, they are proxied externally as HTTP ports. At this time, in no case do we proxy plain TCP or UDP ports. If you'd like to investigate alternative proxy methods, please refer to our [proxy documentation](/dokku/proxy/).
|
||||
|
||||
## Customizing the run command
|
||||
|
||||
By default no arguments are passed to `docker run` when deploying the container and the `CMD` or `ENTRYPOINT` defined in the `Dockerfile` are executed. You can take advantage of docker ability of overriding the `CMD` or passing parameters to your `ENTRYPOINT` setting `$DOKKU_DOCKERFILE_START_CMD`. Let's say for example you are deploying a base nodejs image, with the following `ENTRYPOINT`:
|
||||
|
||||
98
docs/deployment/domain-configuration.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# Domain Configuration
|
||||
|
||||
> New as of 0.3.10
|
||||
|
||||
```shell
|
||||
domains:add <app> DOMAIN Add a domain to app
|
||||
domains [<app>] List domains
|
||||
domains:clear <app> Clear all domains for app
|
||||
domains:disable <app> Disable VHOST support
|
||||
domains:enable <app> Enable VHOST support
|
||||
domains:remove <app> DOMAIN Remove a domain from app
|
||||
domains:set-global <domain> Set global domain name
|
||||
```
|
||||
|
||||
## Customizing hostnames
|
||||
|
||||
Applications typically have the following structure for their hostname:
|
||||
|
||||
```
|
||||
scheme://subdomain.domain.tld
|
||||
```
|
||||
|
||||
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial configuration and stored in the `$DOKKU_ROOT/VHOST` file. It can then be modified with `dokku domains:set-global`. This value is used as a default TLD for all applications on a host.
|
||||
|
||||
If a FQDN such as `other.tld` is used as the application name, the default `$DOKKU_ROOT/VHOST` will be ignored and the resulting vhost URL for that application will be `other.tld`. The exception to this rule being that if the FQDN has the same ending as the default vhost (such as `subdomain.domain.tld`), then the entire FQDN will be treated as a subdomain. The application will therefore be deployed at `subdomain.domain.tld.domain.tld`.
|
||||
|
||||
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. For example, you can reverse the subdomain with the following sample `nginx-hostname` plugin trigger:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1"; SUBDOMAIN="$2"; VHOST="$3"
|
||||
|
||||
NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
|
||||
echo "$NEW_SUBDOMAIN.$VHOST"
|
||||
```
|
||||
|
||||
If the `nginx-hostname` has no output, the normal hostname algorithm will be executed.
|
||||
|
||||
## Disabling VHOSTS
|
||||
|
||||
If desired, it is possible to disable vhosts with the domains plugin.
|
||||
|
||||
```shell
|
||||
dokku domains:disable myapp
|
||||
```
|
||||
|
||||
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable. As of 0.4.0, nginx will still be configured to proxy your app on some random high port. This allows internal services to maintain the same port between deployments. You may change this port by setting `DOKKU_NGINX_PORT` and/or `DOKKU_NGINX_SSL_PORT` (for services configured to use SSL.)
|
||||
|
||||
|
||||
The domains plugin allows you to specify custom domains for applications. This plugin is aware of any ssl certificates that are imported via `certs:add`. Be aware that disabling domains (with `domains:disable`) will override any custom domains.
|
||||
|
||||
```shell
|
||||
# where `myapp` is the name of your app
|
||||
|
||||
# add a domain to an app
|
||||
dokku domains:add myapp example.com
|
||||
|
||||
# list custom domains for app
|
||||
dokku domains myapp
|
||||
|
||||
# clear all custom domains for app
|
||||
dokku domains:clear myapp
|
||||
|
||||
# remove a custom domain from app
|
||||
dokku domains:remove myapp example.com
|
||||
```
|
||||
|
||||
## Default site
|
||||
|
||||
By default, dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration. This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused).
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name _;
|
||||
return 410;
|
||||
log_not_found off;
|
||||
}
|
||||
```
|
||||
|
||||
You may also wish to use a separate vhost in your `/etc/nginx/sites-enabled` directory. To do so, create the vhost in that directory as `/etc/nginx/sites-enabled/00-default.conf`. You will also need to change two lines in the main `nginx.conf`:
|
||||
|
||||
```
|
||||
# Swap both conf.d include line and the sites-enabled include line. From:
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
|
||||
# to the following
|
||||
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
```
|
||||
|
||||
Alternatively, you may push an app to your dokku host with a name like "00-default". As long as it lists first in `ls /home/dokku/*/nginx.conf | head`, it will be used as the default nginx vhost.
|
||||
@@ -55,3 +55,70 @@ root@dokku:~# dokku tags:deploy node-js-app v0.9.0
|
||||
http://node-js-app.dokku.me
|
||||
|
||||
```
|
||||
|
||||
## Deploying from a Docker Registry
|
||||
|
||||
You can alternatively add image pulled from a docker Registry and deploy app from it by using tagging feature. In this example, we are deploying from Docker Hub.
|
||||
|
||||
1. Create dokku app as usual
|
||||
|
||||
```shell
|
||||
dokku apps:create test-app
|
||||
```
|
||||
|
||||
2. Pull image from Docker Hub
|
||||
|
||||
```shell
|
||||
docker pull demo-repo/some-image:v12
|
||||
```
|
||||
|
||||
3. Retag the image to match the created app
|
||||
|
||||
```shell
|
||||
docker tag demo-repo/some-image:v12 dokku/test-app:v12
|
||||
```
|
||||
|
||||
4. Deploy tag
|
||||
|
||||
```shell
|
||||
dokku tags:deploy test-app v12
|
||||
```
|
||||
|
||||
> Note: When deploying an image, we will use `docker inspect` to extract the `ExposedPorts` configuration and if defined, use that to populate `DOKKU_DOCKERFILE_PORTS`. If this behavior is not desired, you can override that configuration variable with the `config:set` command.
|
||||
> Example: `dokku config:set test-app DOKKU_DOCKERFILE_PORTS="5984/tcp 80/tcp"`
|
||||
|
||||
## Deploying an image from CI
|
||||
|
||||
To ensure your builds are always reproducible, it's considered bad practice to store build
|
||||
artifacts in your repository. For some projects however, building artifacts during deployment
|
||||
to dokku may affect the performance of running applications.
|
||||
|
||||
One solution is to build a finished Docker image on a CI service (or even locally) and deploy
|
||||
it directly to the host running dokku.
|
||||
|
||||
1. Build image on CI (or locally)
|
||||
|
||||
```shell
|
||||
docker build -t dokku/test-app:v12
|
||||
# Note: The image must be tagged `dokku/<app-name>:<version>`
|
||||
```
|
||||
|
||||
2. Deploy image to dokku host
|
||||
|
||||
```shell
|
||||
docker save dokku/test-app:v12 | ssh my.dokku.host "docker load | dokku tags:deploy test-app v12"
|
||||
```
|
||||
|
||||
> Note: You can also use a Docker Registry to push and pull
|
||||
> the image rather than uploading it directly.
|
||||
|
||||
Here's a more complete example using the above method:
|
||||
|
||||
```shell
|
||||
# build the image
|
||||
docker build -t dokku/test-app:v12
|
||||
# copy the image to the dokku host
|
||||
docker save dokku/test-app:v12 | bzip2 | ssh my.dokku.host "bunzip2 | docker load"
|
||||
# tag and deploy the image
|
||||
ssh my.dokku.host "dokku tags:create test-app previous; dokku tags:deploy test-app v12 && dokku tags:create test-app latest"
|
||||
```
|
||||
|
||||
@@ -32,6 +32,15 @@ dokku --rm-container run node-js-app ls -lah
|
||||
dokku --rm run node-js-app ls -lah
|
||||
```
|
||||
|
||||
Finally, you may wish to run a container in "detached" mode via the `--detach` dokku flag. Running a process in detached mode will immediately return a `CONTAINER_ID`. It is up to the user to then further manage this container in whatever manner they see fit, as dokku will *not* automatically terminate the container.
|
||||
|
||||
```shell
|
||||
dokku --detach run node-js-app ls -lah
|
||||
# returns the ID of the new container
|
||||
```
|
||||
|
||||
> Note that you may not use the `--rm-container` or `--rm` flags when running containers in detached mode, and attempting to do so will result in the `--detach` flag being ignored.
|
||||
|
||||
### Using `run` for cron tasks
|
||||
|
||||
You can always use a one-off container to run an application task:
|
||||
@@ -59,6 +68,8 @@ dokku enter node-js-app web.1
|
||||
dokku enter node-js-app --container-id ID
|
||||
```
|
||||
|
||||
Additionally, you can run `enter` with no container-type. If only a single container-type is defined in your app, you will be dropped into the only running container. This behavior is not supported when specifying a custom command; as described below.
|
||||
|
||||
By default, it runs a `/bin/bash`, but can also be used to run a custom command:
|
||||
|
||||
```shell
|
||||
@@ -74,7 +85,7 @@ dokku enter node-js-app web python script/background-worker.py
|
||||
Your procfile can have the following entry:
|
||||
|
||||
```
|
||||
cron: while true; do sleep 10; done
|
||||
cron: sleep infinity
|
||||
```
|
||||
|
||||
With the `cron` process scaled to `1`:
|
||||
|
||||
@@ -35,6 +35,12 @@ dokku certs:add <app> < cert-key.tar
|
||||
cat yourdomain_com.crt yourdomain_com.ca-bundle > server.crt
|
||||
```
|
||||
|
||||
#### SSL and Multiple Domains
|
||||
|
||||
When an SSL certificate is associated to an application, the certificate will be associated with *all* domains currently associated with said application. Your certificate _should_ be associated with all of those domains, otherwise accessing the application will result in SSL errors. If you wish to remove one of the domains from the application, refer to the [domain configuration documentation](/dokku/deployment/domain-configuration/).
|
||||
|
||||
Note that with the default nginx template, requests will be redirected to the `https` version of the domain. If this is not the desired state of request resolution, you may customize the nginx template in use. For more details, see the [nginx documentation](/dokku/nginx/).
|
||||
|
||||
### Certificate generation
|
||||
|
||||
> Note: Using this method will create a self-signed certificate, which is only recommended for development or staging use, not production environments.
|
||||
|
||||
@@ -29,69 +29,64 @@ The following plugin triggers describe those available to a dokku installation.
|
||||
|
||||
> The example plugin trigger code is not guaranteed to be implemented as in within dokkku, and are merely simplified examples. Please look at the dokku source for larger, more in-depth examples.
|
||||
|
||||
### `install`
|
||||
### `post-config-update`
|
||||
|
||||
- Description: Used to setup any files/configuration for a plugin.
|
||||
- Invoked by: `dokku plugin:install`.
|
||||
- Arguments: None
|
||||
- Description: Allows you to get notified when one or more configs is added or removed. Action can be *set* or *unset*
|
||||
- Invoked by: `dokku config:set`, `dokku config:unset`
|
||||
- Arguments: `$APP` `set|unset` `key1=VALUE1 key2=VALUE2`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Sets the hostname of the dokku server
|
||||
# based on the output of `hostname -f`
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
if [[ ! -f "$DOKKU_ROOT/HOSTNAME" ]]; then
|
||||
hostname -f > $DOKKU_ROOT/HOSTNAME
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `bind-external-ip`
|
||||
|
||||
- Description: Allows you to disable binding to the external box ip
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Force always binding to the docker ip, no matter
|
||||
# what the settings are for a given app.
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
echo false
|
||||
```
|
||||
|
||||
### `check-deploy`
|
||||
|
||||
- Description: Allows you to run checks on a deploy before dokku allows the container to handle requests.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$CONTAINER_ID $APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Disables deploys of containers based on whether the
|
||||
# `DOKKU_DISABLE_DEPLOY` env var is set to `true` for an app
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
CONTAINERID="$1"; APP="$2"; PORT="$3" ; HOSTNAME="${4:-localhost}"
|
||||
|
||||
eval "$(config_export app $APP)"
|
||||
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
|
||||
|
||||
if [[ "$DOKKU_DISABLE_DEPLOY" = "true" ]]; then
|
||||
echo -e "\033[31m\033[1mDeploys disabled, sorry.\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
|
||||
### `dependencies`
|
||||
|
||||
- Description: Used to install system-level dependencies. Invoked by `plugin:install-dependencies`.
|
||||
- Invoked by: `dokku plugin:install-dependencies`
|
||||
- Arguments: None
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Installs nginx for the current plugin
|
||||
# Supports both opensuse and ubuntu
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian|ubuntu)
|
||||
apt-get install --force-yes -qq -y nginx
|
||||
;;
|
||||
|
||||
opensuse)
|
||||
zypper -q in -y nginx
|
||||
;;
|
||||
esac
|
||||
```
|
||||
|
||||
### `update`
|
||||
|
||||
- Description: Can be used to run plugin updates on a regular interval. You can schedule the invoker in a cron-task to ensure your system gets regular updates.
|
||||
- Invoked by: `dokku plugin:update`.
|
||||
- Arguments: None
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Update the herokuish image from git source
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cd /root/dokku
|
||||
sudo BUILD_STACK=true make install
|
||||
```
|
||||
|
||||
### `comands help` and `commands <PLUGIN_NAME>:help`
|
||||
|
||||
- Description: Your plugin should implement a `help` command in your `commands` file to take advantage of this plugin trigger. `commands help` is used by `dokku help` to aggregate all plugins abbreviated `help` output. Implementing `<PLUGIN_NAME>:help` in your `commands` file gives users looking for help, a more detailed output. 'commands help' must be implemented inside the `commands` plugin file. It's recommended that `PLUGIN_NAME:help` be added to the commands file to ensure consistency among community plugins and give you a new avenue to share rich help content with your user.
|
||||
@@ -139,299 +134,31 @@ help_content
|
||||
esac
|
||||
```
|
||||
|
||||
### `pre-build-buildpack`
|
||||
### `dependencies`
|
||||
|
||||
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Description: Used to install system-level dependencies. Invoked by `plugin:install-dependencies`.
|
||||
- Invoked by: `dokku plugin:install-dependencies`
|
||||
- Arguments: None
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Installs nginx for the current plugin
|
||||
# Supports both opensuse and ubuntu
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
### `post-build-buildpack`
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian|ubuntu)
|
||||
apt-get install --force-yes -qq -y nginx
|
||||
;;
|
||||
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `pre-build-dockerfile`
|
||||
|
||||
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using a dockerfile.
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-build-dockerfile`
|
||||
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using a dockerfile.
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `pre-release-buildpack`
|
||||
|
||||
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Installs the graphicsmagick package into the container
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1" Installing GraphicsMagick..."
|
||||
|
||||
CMD="cat > gm && \
|
||||
dpkg -s graphicsmagick > /dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y graphicsmagick && apt-get clean)"
|
||||
|
||||
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $ID) -eq 0
|
||||
docker commit $ID $IMAGE > /dev/null
|
||||
```
|
||||
|
||||
### `post-release-buildpack`
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Installs a package specified by the `CONTAINER_PACKAGE` env var
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1" Installing $CONTAINER_PACKAGE..."
|
||||
|
||||
CMD="cat > gm && \
|
||||
dpkg -s CONTAINER_PACKAGE > /dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y CONTAINER_PACKAGE && apt-get clean)"
|
||||
|
||||
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $ID) -eq 0
|
||||
docker commit $ID $IMAGE > /dev/null
|
||||
```
|
||||
|
||||
### `pre-release-dockerfile`
|
||||
|
||||
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-release-dockerfile`
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `check-deploy`
|
||||
|
||||
- Description: Allows you to run checks on a deploy before dokku allows the container to handle requests.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$CONTAINER_ID $APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Disables deploys of containers based on whether the
|
||||
# `DOKKU_DISABLE_DEPLOY` env var is set to `true` for an app
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
CONTAINERID="$1"; APP="$2"; PORT="$3" ; HOSTNAME="${4:-localhost}"
|
||||
|
||||
eval "$(config_export app $APP)"
|
||||
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
|
||||
|
||||
if [[ "$DOKKU_DISABLE_DEPLOY" = "true" ]]; then
|
||||
echo -e "\033[31m\033[1mDeploys disabled, sorry.\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
|
||||
### `pre-deploy`
|
||||
|
||||
- Description: Allows the running of code before the container's process is started.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Runs gulp in our container
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1 "Running gulp"
|
||||
id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $IMAGE /bin/bash -c "cd /app && gulp default")
|
||||
test $(docker wait $id) -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
dokku_log_info1 "Building UI Complete"
|
||||
```
|
||||
|
||||
### `post-create`
|
||||
|
||||
- Description: Can be used to run commands after an application is created.
|
||||
- Invoked by: `dokku apps:create`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Runs a command to ensure that an app
|
||||
# has a postgres database when it is starting
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1";
|
||||
POSTGRES="$1"
|
||||
|
||||
dokku postgres:create $POSTGRES
|
||||
dokku postgres:link $POSTGRES $APP
|
||||
```
|
||||
|
||||
### `post-deploy`
|
||||
|
||||
- Description: Allows running of commands after a deploy has completed. Dokku core currently uses this to switch traffic on nginx.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Notify an external service that a successful deploy has occurred.
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
curl "http://httpstat.us/200"
|
||||
```
|
||||
|
||||
### `pre-delete`
|
||||
|
||||
- Description: Can be used to run commands before an app is deleted.
|
||||
- Invoked by: `dokku apps:destroy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Clears out the gulp asset build cache for applications
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
APP="$1"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -d $GULP_CACHE_DIR ]]; then
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
fi
|
||||
```
|
||||
|
||||
### `post-delete`
|
||||
|
||||
- Description: Can be used to run commands after an application is deleted.
|
||||
- Invoked by: `dokku apps:destroy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Runs a command to ensure that an app's
|
||||
# postgres installation is removed
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1";
|
||||
|
||||
dokku postgres:destroy $APP
|
||||
```
|
||||
|
||||
### `post-stop`
|
||||
|
||||
- Description: Can be used to run commands after an application is manually stopped
|
||||
- Invoked by: `dokku ps:stop`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Marks an application as manually stopped
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1";
|
||||
|
||||
dokku config:set --no-restart $APP MANUALLY_STOPPED=1
|
||||
opensuse)
|
||||
zypper -q in -y nginx
|
||||
;;
|
||||
esac
|
||||
```
|
||||
|
||||
### `docker-args-build`
|
||||
@@ -485,38 +212,19 @@ verify_app_name "$APP"
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `bind-external-ip`
|
||||
### `git-post-pull`
|
||||
|
||||
- Description: Allows you to disable binding to the external box ip
|
||||
- Invoked by: `dokku deploy`
|
||||
- Description:
|
||||
- Invoked by: `dokku git-upload-pack`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Force always binding to the docker ip, no matter
|
||||
# what the settings are for a given app.
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
echo false
|
||||
```
|
||||
|
||||
### `post-domains-update`
|
||||
|
||||
- Description: Allows you to run commands once the domain for an application has been updated. It also sends in the command that has been used. This can be "add", "clear" or "remove". The third argument will be the optional list of domains
|
||||
- Invoked by: `dokku domains:add`, `dokku domains:clear`, `dokku domains:remove`
|
||||
- Arguments: `$APP` `action name` `domains`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Reloads haproxy for our imaginary haproxy plugin
|
||||
# that replaces the nginx-vhosts plugin
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
sudo service haproxy reload
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-pre-pull`
|
||||
@@ -534,19 +242,23 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-post-pull`
|
||||
### `install`
|
||||
|
||||
- Description:
|
||||
- Invoked by: `dokku git-upload-pack`
|
||||
- Arguments: `$APP`
|
||||
- Description: Used to setup any files/configuration for a plugin.
|
||||
- Invoked by: `dokku plugin:install`.
|
||||
- Arguments: None
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Sets the hostname of the dokku server
|
||||
# based on the output of `hostname -f`
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
if [[ ! -f "$DOKKU_ROOT/HOSTNAME" ]]; then
|
||||
hostname -f > $DOKKU_ROOT/HOSTNAME
|
||||
fi
|
||||
```
|
||||
|
||||
### `nginx-hostname`
|
||||
@@ -585,6 +297,247 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
nginx -t
|
||||
```
|
||||
|
||||
### `post-build-buildpack`
|
||||
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-build-dockerfile`
|
||||
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using a dockerfile.
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-create`
|
||||
|
||||
- Description: Can be used to run commands after an application is created.
|
||||
- Invoked by: `dokku apps:create`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Runs a command to ensure that an app
|
||||
# has a postgres database when it is starting
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1";
|
||||
POSTGRES="$1"
|
||||
|
||||
dokku postgres:create $POSTGRES
|
||||
dokku postgres:link $POSTGRES $APP
|
||||
```
|
||||
|
||||
### `post-delete`
|
||||
|
||||
- Description: Can be used to run commands after an application is deleted.
|
||||
- Invoked by: `dokku apps:destroy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Runs a command to ensure that an app's
|
||||
# postgres installation is removed
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1";
|
||||
|
||||
dokku postgres:destroy $APP
|
||||
```
|
||||
|
||||
### `post-deploy`
|
||||
|
||||
- Description: Allows running of commands after an application's processes have been scaled up, but before old containers are torn down. Dokku core currently uses this to switch traffic on nginx.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Notify an external service that a successful deploy has occurred.
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
curl "http://httpstat.us/200"
|
||||
```
|
||||
|
||||
### `post-domains-update`
|
||||
|
||||
- Description: Allows you to run commands once the domain for an application has been updated. It also sends in the command that has been used. This can be "add", "clear" or "remove". The third argument will be the optional list of domains
|
||||
- Invoked by: `dokku domains:add`, `dokku domains:clear`, `dokku domains:remove`
|
||||
- Arguments: `$APP` `action name` `domains`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Reloads haproxy for our imaginary haproxy plugin
|
||||
# that replaces the nginx-vhosts plugin
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
sudo service haproxy reload
|
||||
```
|
||||
|
||||
### `post-release-buildpack`
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Installs a package specified by the `CONTAINER_PACKAGE` env var
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1" Installing $CONTAINER_PACKAGE..."
|
||||
|
||||
CMD="cat > gm && \
|
||||
dpkg -s CONTAINER_PACKAGE > /dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y CONTAINER_PACKAGE && apt-get clean)"
|
||||
|
||||
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $ID) -eq 0
|
||||
docker commit $ID $IMAGE > /dev/null
|
||||
```
|
||||
|
||||
### `post-release-dockerfile`
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-stop`
|
||||
|
||||
- Description: Can be used to run commands after an application is manually stopped
|
||||
- Invoked by: `dokku ps:stop`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Marks an application as manually stopped
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1";
|
||||
|
||||
dokku config:set --no-restart $APP MANUALLY_STOPPED=1
|
||||
```
|
||||
|
||||
### `pre-build-buildpack`
|
||||
|
||||
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `pre-build-dockerfile`
|
||||
|
||||
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using a dockerfile.
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `pre-delete`
|
||||
|
||||
- Description: Can be used to run commands before an app is deleted.
|
||||
- Invoked by: `dokku apps:destroy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Clears out the gulp asset build cache for applications
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
APP="$1"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -d $GULP_CACHE_DIR ]]; then
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
fi
|
||||
```
|
||||
|
||||
### `pre-deploy`
|
||||
|
||||
- Description: Allows the running of code before the application's processes are scaled up and after the docker images are prepared.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Runs gulp in our container
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1 "Running gulp"
|
||||
id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $IMAGE /bin/bash -c "cd /app && gulp default")
|
||||
test $(docker wait $id) -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
dokku_log_info1 "Building UI Complete"
|
||||
```
|
||||
|
||||
### `pre-receive-app`
|
||||
|
||||
- Description: Allows you to customize the contents of an application directory before they are processed for deployment. The `IMAGE_SOURCE_TYPE` can be any of `[herokuish, dockerfile]`
|
||||
@@ -604,6 +557,51 @@ APP="$1"; IMAGE_SOURCE_TYPE="$2"; TMP_WORK_DIR="$3"; REV="$4"
|
||||
echo "$APP" > "$TMP_WORK_DIR/dokku-is-awesome"
|
||||
```
|
||||
|
||||
### `pre-release-buildpack`
|
||||
|
||||
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Installs the graphicsmagick package into the container
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1" Installing GraphicsMagick..."
|
||||
|
||||
CMD="cat > gm && \
|
||||
dpkg -s graphicsmagick > /dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y graphicsmagick && apt-get clean)"
|
||||
|
||||
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $ID) -eq 0
|
||||
docker commit $ID $IMAGE > /dev/null
|
||||
```
|
||||
|
||||
### `pre-release-dockerfile`
|
||||
|
||||
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `receive-app`
|
||||
|
||||
- Description: Allows you to customize what occurs when an app is received. Normally just triggers an application build.
|
||||
@@ -646,6 +644,23 @@ fi
|
||||
plugn trigger receive-app $APP $newrev
|
||||
```
|
||||
|
||||
### `retire-container-failed`
|
||||
|
||||
- Description: Allows you to run commands if/when retiring old containers has failed
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Send an email when a container failed to retire
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; HOSTNAME=$(hostname -s)
|
||||
|
||||
mail -s "$APP containers on $HOSTNAME failed to retire" ops@example.com
|
||||
```
|
||||
|
||||
### `tags-create`
|
||||
|
||||
- Description: Allows you to run commands once a tag for an application image has been added
|
||||
@@ -682,21 +697,21 @@ APP="$1"; IMAGE_TAG="$2"
|
||||
some code to remove a docker hub tag because it's not implemented in the CLI....
|
||||
```
|
||||
|
||||
### `retire-container-failed`
|
||||
### `update`
|
||||
|
||||
- Description: Allows you to run commands if/when retiring old containers has failed
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Description: Can be used to run plugin updates on a regular interval. You can schedule the invoker in a cron-task to ensure your system gets regular updates.
|
||||
- Invoked by: `dokku plugin:update`.
|
||||
- Arguments: None
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Send an email when a container failed to retire
|
||||
# Update the herokuish image from git source
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; HOSTNAME=$(hostname -s)
|
||||
|
||||
mail -s "$APP containers on $HOSTNAME failed to retire" ops@example.com
|
||||
cd /root/dokku
|
||||
sudo BUILD_STACK=true make install
|
||||
```
|
||||
|
||||
### `user-auth`
|
||||
|
||||
@@ -8,7 +8,6 @@ To propose a release, the following tasks need to be performed:
|
||||
- The installable version must be changed in the `contrib/dokku-installer.py` file.
|
||||
- The installable version must be changed in the `debian/control` file.
|
||||
- The installable version must be changed in the `docs/home.html` file
|
||||
- The installable version must be changed in the `docs/index.md` file
|
||||
- The installable version must be changed in the `docs/installation.md` file.
|
||||
- The installable version must be changed in the `docs/template.html` file.
|
||||
- The installable version must be changed in the `README.md` file.
|
||||
@@ -67,7 +66,7 @@ The workflow looks like this:
|
||||
```shell
|
||||
# having dokku-arch in ../dokku-arch
|
||||
vagrant up build-arch
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.5.4-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.5.7-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
|
||||
23
docs/dns.md
@@ -2,27 +2,30 @@
|
||||
|
||||
> Note: This is a work in progress.
|
||||
|
||||
### DNS Versions
|
||||
## DNS Versions
|
||||
|
||||
There are many different DNS servers 'in the wild'. Some of the popular ones on Linux are BIND, dnsmasq, and pdns. Windows has its own built-in DNS server as well as Unbound, Posadis, and more. A full list of DNS packages can be found on Wikipedia under [Comparison of DNS Server Software](http://en.wikipedia.org/wiki/Comparison_of_DNS_server_software). In addition to the various DNS packages, there are tens of thousands of [Managed DNS Providers](http://en.wikipedia.org/wiki/List_of_managed_DNS_providers) out that all have different DNS interfaces.
|
||||
|
||||
### Focus
|
||||
## Focus
|
||||
|
||||
Because there are so many different DNS server packages out there as well as a tremendous number of Managed DNS Providers, we will focus on the concepts of DNS as well as providing examples in the 'BIND' format so you can adapt the information to your own server package or managed DNS provider.
|
||||
|
||||
### Assumptions
|
||||
## Assumptions
|
||||
|
||||
* We assume you have a passing familiarity with DNS. If not, you can read an [in-depth article](http://www.diaryofaninja.com/blog/2012/03/03/devops-dns-for-developers-ndash-now-therersquos-no-excuse-not-to-know) on DNS. But basically you need to know that DNS changes names (like example.tld) into addresses (like 127.0.0.1)
|
||||
* We assume you already have a domain name registered and pointed to your favorite Managed DNS Provider or have your own BIND DNS server running.
|
||||
* You have a server on the internet and are about to follow the instructions in the [README](https://github.com/dokku/dokku/blob/master/README.md) to get dokku installed. Don't do the install just yet though.
|
||||
|
||||
## Caching
|
||||
|
||||
### HELP!
|
||||
Please remember that DNS relies heavily on _caching_. Changes you make to DNS could take anywhere from a few seconds to a few *days* to propagate. If you tried surfing to example.tld, then changed the IP address in DNS, it could be a while before your computer picks up on the changes.
|
||||
|
||||
## HELP!
|
||||
|
||||
Don't be afraid to ask if you need help. Create a [new issue](https://github.com/dokku/dokku/issues) and someone will be glad to assist you.
|
||||
|
||||
|
||||
# Getting started
|
||||
## Getting started
|
||||
|
||||
For the examples, we will use the domain name `example.tld` and the IP address `127.0.0.1`.
|
||||
|
||||
@@ -30,17 +33,11 @@ Dokku uses DNS to differentiate between apps on your dokku-powered server. If y
|
||||
|
||||
To get started, you need to know the IP address of your dokku server. Connect to it and run `ifconfig` or `ip addr` to see the IP address.
|
||||
|
||||
# Caching
|
||||
|
||||
Please remember that DNS relies heavily on _caching_. Changes you make to DNS could take anywhere from a few seconds to a few *days* to propagate. If you tried surfing to example.tld, then changed the IP address in DNS, it could be a while before your computer picks up on the changes.
|
||||
|
||||
## The two methods
|
||||
|
||||
Now you have to make a decision about your domain. Do you want everything and anything at `example.tld` to go to your dokku server, or would you rather use a 'sub domain' for your dokku server?
|
||||
|
||||
In other words, do you want your applications on your dokku server accessible via `myapp.example.tld` or via `myapp.myserver.example.tld`?
|
||||
|
||||
### Using a sub-domain (myapp.myserver.example.tld)
|
||||
#### Using a sub-domain (myapp.myserver.example.tld)
|
||||
|
||||
Using a sub-domain is easy. When you set up your server, you probably gave it a name like `myserver.example.tld`.
|
||||
|
||||
@@ -75,7 +72,7 @@ If they all return your IP address, you have set DNS up properly for dokku. You
|
||||
|
||||
Proceed with the setup instructions in the [README](https://github.com/dokku/dokku/blob/master/README.md)
|
||||
|
||||
### Using the root of your domain (myapp.example.tld)
|
||||
#### Using the root of your domain (myapp.example.tld)
|
||||
|
||||
This section is a work in progress. It is incomplete.
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ This example demonstrates how to mount the recommended directory to `/storage` i
|
||||
```
|
||||
$ dokku storage:mount app-name /var/lib/dokku/data/storage:/storage
|
||||
```
|
||||
Dokku will then mount the shared contents of`/var/lib/dokku/storage` to `/storage` inside the container.
|
||||
Dokku will then mount the shared contents of`/var/lib/dokku/data/storage` to `/storage` inside the container.
|
||||
|
||||
## Use Cases
|
||||
|
||||
|
||||
@@ -8,12 +8,6 @@
|
||||
git clone https://github.com/dokku/dokku.git
|
||||
```
|
||||
|
||||
- Setup SSH hosts in your `/etc/hosts`
|
||||
|
||||
```
|
||||
10.0.0.2 dokku.me
|
||||
```
|
||||
|
||||
- Create VM
|
||||
```
|
||||
# Optional ENV arguments:
|
||||
@@ -35,6 +29,7 @@
|
||||
|
||||
- Copy your SSH key via `cat ~/.ssh/id_rsa.pub | pbcopy` and paste it into the dokku-installer at http://dokku.me . Change the `Hostname` field on the Dokku Setup screen to your domain and then check the box that says `Use virtualhost naming`. Then click *Finish Setup* to install your key. You'll be directed to application deployment instructions from here.
|
||||
|
||||
Please note, the `dokku.me` domain is setup to point to `10.0.0.2` along with all subdomains (ie yourapp.dokku.me). If you change the `DOKKU_IP` in your vagrant setup you'll need to update your `/etc/hosts` file to point your reconfigured ip address.
|
||||
|
||||
You are now ready to deploy an app or install plugins.
|
||||
|
||||
For a different, complete, example see https://github.com/RyanBalfanz/dokku-vagrant-example.
|
||||
|
||||
@@ -10,70 +10,32 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
.team-members img {
|
||||
-moz-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
-webkit-border-radius: 3px;
|
||||
-webkit-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
border-radius: 3px;
|
||||
border: 8px solid white;
|
||||
box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
display: block;
|
||||
height: 200px;
|
||||
margin: 20px auto 20px auto;
|
||||
}
|
||||
.team-members .fund-link {
|
||||
display: block;
|
||||
font-size: 80%;
|
||||
}
|
||||
.team-member {
|
||||
min-height: 320px;
|
||||
}
|
||||
.team-member-image img:last-child { display: none }
|
||||
.team-member-image:hover img:first-child { display: none; }
|
||||
.team-member-image:hover img:last-child { display: inline-block; }
|
||||
|
||||
.featurette img {
|
||||
width: 400px;
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.featurette img {
|
||||
width: 300px;
|
||||
}
|
||||
.featurette-heading {
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
.featurette img {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -85,6 +47,9 @@
|
||||
<a href="http://dokku.viewdocs.io/dokku/">Dokku</a>
|
||||
</h1>
|
||||
<ul class="nav nav-pills pull-xs-right">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://dokku.github.io/">Blog</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/dokku/dokku/">Code</a>
|
||||
</li>
|
||||
@@ -125,17 +90,17 @@
|
||||
</div>
|
||||
<div class="shell shell-curl shell-active">
|
||||
<p class="line">
|
||||
<span class="output"> # only works on debian systems!</span>
|
||||
<span class="output"> # for debian systems, installs dokku via apt-get</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.5.7/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.5.7 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
@@ -215,7 +180,7 @@
|
||||
|
||||
<div class="inline-container">
|
||||
<a class="button slack-button" href="https://glider-slackin.herokuapp.com/">
|
||||
<img src="/assets/slack-logo.png" alt="Slack Logo">
|
||||
<img src="./assets/slack-logo.png" alt="Slack Logo">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -292,7 +257,7 @@
|
||||
<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>
|
||||
<a class="fund-link" href="https://www.amazon.com/gp/registry/wishlist/23NWY5AVAGGGO/">Build out his star wars collection</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">
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
<div class="blurb">
|
||||
<div class="container">
|
||||
<h2>The smallest PaaS implementation you've ever seen</h2>
|
||||
<p>Docker powered mini-Heroku in around 200 lines of Bash</p>
|
||||
<div class="blurb-buttons">
|
||||
<a class="btn btn-lg btn-warning" href="/dokku/installation">View Documentation</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container marketing">
|
||||
<div class="quickstart-code">
|
||||
<p class="title">Quick-start Instructions</p>
|
||||
<div class="shell">
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"># => Go to your server's IP and follow the web installer</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<!-- START THE FEATURETTES -->
|
||||
|
||||
<div class="row featurette">
|
||||
<div class="col-md-7">
|
||||
<h2 class="featurette-heading">Own Your PaaS. <span class="text-muted">Infrastructure at a fraction of the cost.</span></h2>
|
||||
<p class="lead">Powered by Docker, you can install Dokku on any hardware. Use it on inexpensive cloud providers. Use the extra cash to buy a pony or feed kittens. You'll save tens of dollars a year on your dog photo sharing website.</p>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<img class="featurette-image img-responsive center-block" alt="Docker Logo" src="assets/docker.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<div class="row featurette">
|
||||
<div class="col-md-7 col-md-push-5">
|
||||
<h2 class="featurette-heading">Easy Git Deploys. <span class="text-muted">From your command-line to the cloud.</span></h2>
|
||||
<p class="lead">Once it's set up on a host, you can push Heroku-compatible applications to it via Git. They'll build using Heroku buildpacks and then run in isolated containers. The end result is your own, single-host version of Heroku.</p>
|
||||
</div>
|
||||
<div class="col-md-5 col-md-pull-7">
|
||||
<img class="featurette-image img-responsive center-block" alt="Git Logo" src="assets/git.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<div class="row featurette">
|
||||
<div class="col-md-7">
|
||||
<h2 class="featurette-heading">Extensible Platform. <span class="text-muted">Customize your PaaS.</span></h2>
|
||||
<p class="lead">Write dokku plugins in any language. Share them online with others, and extend those already available. Dokku's simple core is easy to hack and add the features you need to get your job done.</p>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<img class="featurette-image img-responsive center-block" alt="Extend Logo" src="assets/extend.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
</div>
|
||||
|
||||
@@ -20,9 +20,9 @@ Dokku is designed for usage on a fresh installation of Ubuntu, and should instal
|
||||
To install the latest stable version of dokku, you can run the following shell commands:
|
||||
|
||||
```shell
|
||||
# installs dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh
|
||||
# for debian systems, installs dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.5.7 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
167
docs/nginx.md
@@ -17,8 +17,13 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider
|
||||
- Copy the following example template to a file named `nginx.conf.sigil` and either:
|
||||
- check it into the root of your app repo
|
||||
- `ADD` it to your dockerfile `WORKDIR`
|
||||
- if your dockerfile has no `WORKDIR`, `ADD` it to the `/app` folder
|
||||
|
||||
> When using a custom `nginx.conf.sigil` file, depending upon your application configuration, you *may* be exposing the file externally. As this file is extracted before the container is run, you can, safely delete it in a custom `entrypoint.sh` configured in a Dockerfile `ENTRYPOINT`.
|
||||
|
||||
### Example Custom Template
|
||||
|
||||
Use case: add an `X-Served-By` header to requests
|
||||
```
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
@@ -34,6 +39,13 @@ server {
|
||||
|
||||
# set a custom header for requests
|
||||
add_header X-Served-By www-ec2-01;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 4 32k;
|
||||
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 6;
|
||||
|
||||
location / {
|
||||
proxy_pass http://{{ .APP }};
|
||||
@@ -50,8 +62,6 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
The above is a sample http configuration that adds an `X-Served-By` header to requests.
|
||||
|
||||
### Available template variables
|
||||
```
|
||||
{{ .APP }} Application name
|
||||
@@ -66,6 +76,55 @@ The above is a sample http configuration that adds an `X-Served-By` header to re
|
||||
{{ .SSL_SERVER_NAME }} List of SSL VHOSTS
|
||||
```
|
||||
|
||||
> NOTE: Application config variables are available for use in custom templates. To do so, use the form of `{{ var "FOO" }}` to access a variable named `FOO`.
|
||||
|
||||
|
||||
### Example HTTP to HTTPS Custom Template
|
||||
Use case: a simple dockerfile app that includes `EXPOSE 80`
|
||||
```
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
server {
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
server_name {{ .NOSSL_SERVER_NAME }};
|
||||
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
return 301 https://$host:443$request_uri;
|
||||
}
|
||||
server {
|
||||
listen [::]:443 ssl spdy;
|
||||
listen 443 ssl spdy;
|
||||
{{ if .SSL_SERVER_NAME }}server_name {{ .SSL_SERVER_NAME }}; {{ end }}
|
||||
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
ssl_certificate {{ .APP_SSL_PATH }}/server.crt;
|
||||
ssl_certificate_key {{ .APP_SSL_PATH }}/server.key;
|
||||
|
||||
keepalive_timeout 70;
|
||||
add_header Alternate-Protocol 443:npn-spdy/2;
|
||||
location / {
|
||||
proxy_pass http://{{ .APP }};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||
}
|
||||
```
|
||||
|
||||
### Customizing via configuration files included by the default templates
|
||||
|
||||
The default nginx.conf template will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
|
||||
@@ -83,107 +142,23 @@ chown dokku:dokku /home/dokku/myapp/nginx.conf.d/upload.conf
|
||||
service nginx reload
|
||||
```
|
||||
|
||||
The example above uses additional configuration files directly on the dokku host. Unlike the `nginx.conf.sigil` file, these additional files will not be copied over from your application repo, and thus need to be placed in the `/home/dokku/myapp/nginx.conf.d/` directory manually.
|
||||
|
||||
## Domains plugin
|
||||
|
||||
See the [domain-configuration documentation](/dokku/deployment/domain-configuration/).
|
||||
|
||||
## Customizing hostnames
|
||||
|
||||
Applications typically have the following structure for their hostname:
|
||||
See the [customizing hostnames documentation](/dokku/deployment/domain-configuration/#customizing-hostnames).
|
||||
|
||||
```
|
||||
scheme://subdomain.domain.tld
|
||||
```
|
||||
|
||||
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial configuration and stored in the `$DOKKU_ROOT/VHOST` file. It can then be modified with `dokku domains:set-global`. This value is used as a default TLD for all applications on a host.
|
||||
|
||||
If a FQDN such as `other.tld` is used as the application name, the default `$DOKKU_ROOT/VHOST` will be ignored and the resulting vhost URL for that application will be `other.tld`. The exception to this rule being that if the FQDN has the same ending as the default vhost (such as `subdomain.domain.tld`), then the entire FQDN will be treated as a subdomain. The application will therefore be deployed at `subdomain.domain.tld.domain.tld`.
|
||||
|
||||
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. For example, you can reverse the subdomain with the following sample `nginx-hostname` plugin trigger:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1"; SUBDOMAIN="$2"; VHOST="$3"
|
||||
|
||||
NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
|
||||
echo "$NEW_SUBDOMAIN.$VHOST"
|
||||
```
|
||||
|
||||
If the `nginx-hostname` has no output, the normal hostname algorithm will be executed.
|
||||
|
||||
You can also use the built-in `domains` plugin to handle:
|
||||
|
||||
### Domains plugin
|
||||
|
||||
> New as of 0.3.10
|
||||
|
||||
```shell
|
||||
domains:add <app> DOMAIN Add a domain to app
|
||||
domains [<app>] List domains
|
||||
domains:clear <app> Clear all domains for app
|
||||
domains:disable <app> Disable VHOST support
|
||||
domains:enable <app> Enable VHOST support
|
||||
domains:remove <app> DOMAIN Remove a domain from app
|
||||
domains:set-global <domain> Set global domain name
|
||||
```
|
||||
|
||||
### Disabling VHOSTS
|
||||
|
||||
If desired, it is possible to disable vhosts with the domains plugin.
|
||||
|
||||
```shell
|
||||
dokku domains:disable myapp
|
||||
```
|
||||
|
||||
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable. As of 0.4.0, nginx will still be configured to proxy your app on some random high port. This allows internal services to maintain the same port between deployments. You may change this port by setting `DOKKU_NGINX_PORT` and/or `DOKKU_NGINX_SSL_PORT` (for services configured to use SSL.)
|
||||
|
||||
|
||||
The domains plugin allows you to specify custom domains for applications. This plugin is aware of any ssl certificates that are imported via `certs:add`. Be aware that disabling domains (with `domains:disable`) will override any custom domains.
|
||||
|
||||
```shell
|
||||
# where `myapp` is the name of your app
|
||||
|
||||
# add a domain to an app
|
||||
dokku domains:add myapp example.com
|
||||
|
||||
# list custom domains for app
|
||||
dokku domains myapp
|
||||
|
||||
# clear all custom domains for app
|
||||
dokku domains:clear myapp
|
||||
|
||||
# remove a custom domain from app
|
||||
dokku domains:remove myapp example.com
|
||||
```
|
||||
## Disabling VHOSTS
|
||||
|
||||
See the [disabling vhosts documentation](/dokku/deployment/domain-configuration/#disabling-vhosts).
|
||||
|
||||
## Default site
|
||||
|
||||
By default, dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration. This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused).
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name _;
|
||||
return 410;
|
||||
log_not_found off;
|
||||
}
|
||||
```
|
||||
|
||||
You may also wish to use a separate vhost in your `/etc/nginx/sites-enabled` directory. To do so, create the vhost in that directory as `/etc/nginx/sites-enabled/00-default.conf`. You will also need to change two lines in the main `nginx.conf`:
|
||||
|
||||
```
|
||||
# Swap both conf.d include line and the sites-enabled include line. From:
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
|
||||
# to the following
|
||||
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
```
|
||||
|
||||
Alternatively, you may push an app to your dokku host with a name like "00-default". As long as it lists first in `ls /home/dokku/*/nginx.conf | head`, it will be used as the default nginx vhost.
|
||||
See the [default site documentation](/dokku/deployment/domain-configuration/#default-site).
|
||||
|
||||
## Running behind a load balancer
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[alex-sherwin]: https://github.com/alex-sherwin
|
||||
[alexanderbeletsky]: https://github.com/alexanderbeletsky
|
||||
[alexkruegger]: https://github.com/alexkruegger
|
||||
[Aluxian]: https://github.com/Aluxian
|
||||
[Aomitayo]: https://github.com/Aomitayo
|
||||
[apmorton]: https://github.com/apmorton
|
||||
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
|
||||
@@ -72,6 +73,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[cedricziel]: https://github.com/cedricziel
|
||||
[cef]: https://github.com/cef
|
||||
[cjblomqvist]: https://github.com/cjblomqvist
|
||||
[crisward]: https://github.com/crisward
|
||||
[darkpixel]: https://github.com/darkpixel
|
||||
[dokku]: https://github.com/dokku
|
||||
[dyson]: https://github.com/dyson
|
||||
@@ -139,7 +141,8 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
|
||||
| [Nginx Cache](https://github.com/Aluxian/dokku-nginx-cache) | [Aluxian][] | 0.5.0+ |
|
||||
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
|
||||
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | 0.3.x |
|
||||
| [Varnish](https://github.com/Zenedith/dokku-varnish-plugin) | [Zenedith][] | Varnish cache between nginx and application with base configuration|
|
||||
|
||||
@@ -149,6 +152,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [RabbitMQ](https://github.com/jlachowski/dokku-rabbitmq-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [RabbitMQ (single container)](https://github.com/jlachowski/dokku-rabbitmq-single-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [ElasticMQ (SQS compatible)](https://github.com/cu12/dokku-elasticmq) | [cu12][] | 0.5.0+ |
|
||||
|
||||
#### Other
|
||||
|
||||
@@ -156,6 +160,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [etcd](https://github.com/basgys/dokku-etcd) | [basgys][] | 0.4.x |
|
||||
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
|
||||
| [FakeSNS](https://github.com/cu12/dokku-fake_sns) | [cu12][] | 0.5.0+ |
|
||||
|
||||
[dccee02]: https://github.com/jeffutter/dokku-riakcs-plugin/commit/dccee02702e7001851917b7814e78a99148fb709
|
||||
|
||||
@@ -179,11 +184,14 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [App name as env](https://github.com/cjblomqvist/dokku-app-name-env) | [cjblomqvist][] | 0.3.x |
|
||||
| [App User](https://github.com/expa/dokku-app-user) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Dokku Clone](https://github.com/crisward/dokku-clone) | [crisward][] | 0.4.0+ |
|
||||
| [Docker Direct](https://github.com/heichblatt/dokku-docker-direct) | [heichblatt][] | |
|
||||
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
|
||||
| [Dokku Copy App Config Files](https://github.com/heichblatt/dokku-supply-config) | [heichblatt][] | |
|
||||
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | dokku >= [c77cbf1][] |
|
||||
| [Dokku Registry](https://github.com/agco-adm/dokku-registry)<sup>1</sup> | [agco-adm][] | 0.4.0+ |
|
||||
| [Dokku Require](https://github.com/crisward/dokku-require)<sup>2</sup> | [crisward][] | 0.4.0+ |
|
||||
| [git rev-parse HEAD in env](https://github.com/cjblomqvist/dokku-git-rev) | [cjblomqvist][] | 0.4.0+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.3.14+ |
|
||||
| [Haproxy tcp load balancer](https://github.com/256dpi/dokku-haproxy) | [256dpi][] | 0.4.0+ |
|
||||
@@ -193,17 +201,20 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| [Nuke Containers](https://github.com/heichblatt/dokku-nuke) | [heichblatt][] | |
|
||||
| [Open App Ports](https://github.com/heichblatt/dokku-ports) | [heichblatt][] | |
|
||||
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>2</sup> | [cedricziel][] | 0.3.x |
|
||||
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>3</sup> | [cedricziel][] | 0.3.x |
|
||||
| [Proctype Filter](https://github.com/expa/dokku-proctype-filter) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>3</sup> | [cedricziel][] | 0.3.x |
|
||||
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>4</sup> | [cedricziel][] | 0.3.x |
|
||||
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | 0.3.x |
|
||||
|
||||
[217d00a]: https://github.com/dokku/dokku/commit/217d00a1bc47a7e24d8847617bb08a1633025fc7
|
||||
|
||||
<sup>1</sup> On Heroku similar functionality is offered by the [heroku-labs pipeline feature](https://devcenter.heroku.com/articles/labs-pipelines), which allows you to promote builds across multiple environments (staging -> production)
|
||||
|
||||
<sup>2</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
|
||||
<sup>2</sup> Extends app.json support to include creating volumes and creating / linking databases on push
|
||||
|
||||
<sup>3</sup> Adds the ability to add custom hosts to the containers known_hosts file to be able to ssh them easily (useful with deployment keys)
|
||||
<sup>3</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
|
||||
|
||||
<sup>4</sup> Adds the ability to add custom hosts to the containers known_hosts file to be able to ssh them easily (useful with deployment keys)
|
||||
|
||||
### Other Plugins
|
||||
|
||||
@@ -222,15 +233,19 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski] | <0.4.0 |
|
||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-grafana) | [jlachowski] | 0.4.0+, graphite & statsd plugin with grafana dashboard frontend |
|
||||
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.3.26+ |
|
||||
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |
|
||||
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |
|
||||
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | |
|
||||
| [Node](https://github.com/ademuk/dokku-nodejs) | [ademuk][] | |
|
||||
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | 0.3.15+, Dockerfile support |
|
||||
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | 0.4.0+ |
|
||||
| [Tor](https://github.com/michaelshobbs/dokku-tor) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [User ACL](https://github.com/mlebkowski/dokku-acl) | [Maciej Łebkowski][] | 0.4.0+ |
|
||||
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | |
|
||||
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | |
|
||||
| [Wordpress](https://github.com/dudagroup/dokku-wordpress-template) | [abossard][] | Dokku dev, mariadb, volume, domains |
|
||||
| [Long Timeout](https://github.com/investtools/dokku-long-timeout-plugin) | [investtools][] | 0.4.0+ |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Rollbar](https://github.com/iloveitaly/dokku-rollbar) | [iloveitaly][] | 0.5.0+ |
|
||||
|
||||
<sup>1</sup> Forked from [jezdez/dokku-elasticsearch-plugin](https://github.com/jezdez/dokku-elasticsearch-plugin): uses Elasticsearch 1.2 (instead of 0.90), doesn't depend on dokku-link, runs as elasticsearch user instead of root, and turns off multicast autodiscovery for use in a VPS environment.
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ proxy:set <app> <proxy_type>
|
||||
|
||||
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, e.g. `0.0.0.0:32771->5000/tcp`.
|
||||
|
||||
```shell
|
||||
# container bound to docker interface
|
||||
root@dokku:~/dokku# docker ps
|
||||
|
||||
@@ -10,26 +10,26 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400:sans-serif|Open+Sans:400:sans-serif" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -43,7 +43,7 @@
|
||||
</script>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.5.7/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
@@ -61,6 +61,9 @@
|
||||
<a href="http://dokku.viewdocs.io/dokku/">Dokku</a>
|
||||
</h1>
|
||||
<ul class="nav nav-pills pull-xs-right col-md-offset-right-2">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://dokku.github.io/">Blog</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/dokku/dokku/">Code</a>
|
||||
</li>
|
||||
@@ -107,7 +110,8 @@
|
||||
<a href="#" class="list-group-item disabled">Configuration</a>
|
||||
|
||||
<a href="/dokku/configuration-management/" class="list-group-item">Environment Variables</a>
|
||||
<a href="/dokku/dns" class="list-group-item">DNS Configuration</a>
|
||||
<a href="/dokku/dns/" class="list-group-item">DNS Configuration</a>
|
||||
<a href="/dokku/deployment/domain-configuration/" class="list-group-item">Domain Configuration</a>
|
||||
<a href="/dokku/nginx/" class="list-group-item">Nginx Configuration</a>
|
||||
<a href="/dokku/deployment/ssl-configuration/" class="list-group-item">SSL Configuration</a>
|
||||
<a href="/dokku/dokku-events-logs/" class="list-group-item">Dokku Event Logs</a>
|
||||
@@ -184,6 +188,8 @@
|
||||
currentVersionEl = document.querySelectorAll('.rst-current-version')[0],
|
||||
currentVersion = currentVersionEl.getAttribute('data-ref'),
|
||||
versionContainer = document.querySelectorAll('.rst-versions.rst-badge')[0],
|
||||
pageHeader = document.querySelectorAll('.markdown-body p')[0],
|
||||
headers = document.querySelectorAll('h2, h3, h4'),
|
||||
classNames = ['table', 'table-striped', 'table-hover', 'table-condensed'],
|
||||
localPath = location.pathname.split('/').splice(2).join("/"),
|
||||
addClass = function (el, className) {
|
||||
@@ -234,6 +240,46 @@
|
||||
}
|
||||
};
|
||||
|
||||
var ToC =
|
||||
"<nav role='navigation' class='table-of-contents'>" +
|
||||
"<ul>";
|
||||
|
||||
var newLine, el, title, link, currentDepth, count = 0, lastNodeDepth = null;
|
||||
Array.prototype.forEach.call(headers, function (el, i) {
|
||||
count++;
|
||||
title = el.innerText || element.textContent;
|
||||
link = "#" + el.getAttribute('id');
|
||||
currentDepth = parseInt(el.nodeName.replace('H', ''), 10);
|
||||
|
||||
newLine =
|
||||
"<li>" +
|
||||
"<a href='" + link + "' class='current-depth-" + currentDepth + "'>" +
|
||||
title +
|
||||
"</a>" +
|
||||
"</li>";
|
||||
|
||||
if (currentDepth === lastNodeDepth || lastNodeDepth === null) {
|
||||
} else if (currentDepth > lastNodeDepth) {
|
||||
newLine = '<ul>' + newLine;
|
||||
} else if (currentDepth < lastNodeDepth) {
|
||||
newLine = '</ul>' + newLine;
|
||||
}
|
||||
ToC += newLine;
|
||||
|
||||
lastNodeDepth = currentDepth;
|
||||
});
|
||||
ToC += "</ul></nav>";
|
||||
|
||||
if (count > 1) {
|
||||
var navItems = document.querySelectorAll('.list-group-item');
|
||||
Array.prototype.forEach.call(navItems, function(el, i){
|
||||
if (el.getAttribute('href') == location.pathname) {
|
||||
el.insertAdjacentHTML('afterEnd', ToC);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Array.prototype.forEach.call(blockquotes, function (el, i) {
|
||||
if (el.innerHTML.toLowerCase().indexOf('new as of') !== -1) {
|
||||
addClass(el, 'new-as-of');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Troubleshooting
|
||||
# Troubleshooting
|
||||
|
||||
__Symptom:__ I deployed my app but I am getting the default nginx page
|
||||
|
||||
|
||||
@@ -1,36 +1,32 @@
|
||||
# Upgrading
|
||||
|
||||
This document covers upgrades for the 0.3.0 series and up. If upgrading from older versions, we recommend [a fresh install](/dokku/installation) on a new server.
|
||||
|
||||
> As of 0.3.18, dokku is installed by default via a debian package. Source-based installations are still available, though not recommended.
|
||||
If your version of dokku is pre 0.3.0 (check with `dokku version`), we recommend [a fresh install](/dokku/installation) on a new server.
|
||||
|
||||
## Migration Guides
|
||||
|
||||
Migration guides contain information regarding the new features introduced in each version and the migration path between versions.
|
||||
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
|
||||
|
||||
- [0.5 Migration Guide](/dokku/appendices/0.5.0-migration-guide/)
|
||||
|
||||
## General Information
|
||||
## Upgrade Instructions
|
||||
|
||||
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 `apt-get install dokku` or `bootstrap.sh` (most common), upgrade with:
|
||||
|
||||
```shell
|
||||
sudo apt-get install dokku
|
||||
sudo apt-get update
|
||||
dokku apps
|
||||
dokku ps:stop <app> # repeat to shut down each running app
|
||||
sudo apt-get install -qq -y dokku herokuish
|
||||
dokku ps:rebuildall # restart all applications
|
||||
```
|
||||
|
||||
For unattended upgrades, you may run the following command:
|
||||
|
||||
```shell
|
||||
sudo apt-get install -qq -y dokku
|
||||
```
|
||||
|
||||
If you have installed dokku from source, you may run the following commands to upgrade:
|
||||
### Upgrade From Source
|
||||
|
||||
If you installed dokku from source (less common), upgrade with:
|
||||
|
||||
```shell
|
||||
dokku apps
|
||||
dokku ps:stop <app> # repeat to shut down each running app
|
||||
cd ~/dokku
|
||||
git pull --tags origin master
|
||||
|
||||
@@ -39,29 +35,10 @@ sudo DOKKU_BRANCH=master make install
|
||||
|
||||
# upgrade to debian package-based installation
|
||||
sudo make install
|
||||
dokku ps:rebuildall # restart all applications
|
||||
```
|
||||
|
||||
All changes will take effect upon next application deployment. To trigger a rebuild and restart every application, simply run the following command:
|
||||
|
||||
```shell
|
||||
dokku ps:rebuildall
|
||||
```
|
||||
|
||||
### Herokuish image
|
||||
|
||||
If dokku was installed via a debian package, you can upgrade herokuish via the following command:
|
||||
|
||||
```shell
|
||||
sudo apt-get install herokuish
|
||||
```
|
||||
|
||||
For unattended upgrades, you may run the following command:
|
||||
|
||||
```shell
|
||||
sudo apt-get install -qq -y herokuish
|
||||
```
|
||||
|
||||
In some cases, it may be desirable to run a specific version of herokuish. To install/upgrade herokuish from source, run the following commands:
|
||||
To upgrade herokuish from source, upgrade with:
|
||||
|
||||
```shell
|
||||
cd /tmp
|
||||
|
||||
@@ -23,7 +23,8 @@ get_phase_script() {
|
||||
|
||||
execute_script() {
|
||||
declare desc="executes appropriate phase script key from app.json"
|
||||
local APP="$1"; local IMAGE="$2"; local PHASE_SCRIPT_KEY="$3"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local PHASE_SCRIPT_KEY="$3"
|
||||
local SCRIPT_CMD=$(get_phase_script "$IMAGE" "$PHASE_SCRIPT_KEY" 2>/dev/null)
|
||||
if [[ -n "$SCRIPT_CMD" ]];then
|
||||
dokku_log_info1 "Running '$SCRIPT_CMD' in app container"
|
||||
@@ -48,7 +49,7 @@ execute_script() {
|
||||
COMMAND+=" fi "
|
||||
|
||||
local CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP")
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG")
|
||||
# strip --restart args from DOCKER_ARGS
|
||||
local DOCKER_ARGS=$(sed -e "s/--restart=[[:graph:]]\+[[:blank:]]\?//g" <<< "$DOCKER_ARGS")
|
||||
|
||||
@@ -60,6 +61,9 @@ execute_script() {
|
||||
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)
|
||||
[[ -z "$DOKKU_DOCKERFILE_ENTRYPOINT" ]] && DOKKU_DOCKERFILE_ENTRYPOINT="$(get_entrypoint_from_image "$IMAGE")"
|
||||
[[ -z "$DOKKU_DOCKERFILE_CMD" ]] && DOKKU_DOCKERFILE_CMD="$(get_cmd_from_image "$IMAGE")"
|
||||
|
||||
[[ -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'"
|
||||
|
||||
@@ -83,18 +87,16 @@ exec_app_json_scripts() {
|
||||
case "$0" in
|
||||
*pre-deploy)
|
||||
local IMAGE_TAG="$2"
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local PHASE_SCRIPT_KEY="predeploy"
|
||||
;;
|
||||
*post-deploy)
|
||||
local IMAGE_TAG="$4"
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local PHASE_SCRIPT_KEY="postdeploy"
|
||||
;;
|
||||
esac
|
||||
|
||||
dokku_log_info1 "Attempting to run scripts.dokku.$PHASE_SCRIPT_KEY from app.json (if defined)"
|
||||
execute_script "$APP" "$IMAGE" "$PHASE_SCRIPT_KEY"
|
||||
execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY"
|
||||
}
|
||||
|
||||
exec_app_json_scripts "$@"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -143,6 +143,8 @@ dokku_deploy_cmd() {
|
||||
for oldid in $oldids; do
|
||||
dokku_log_info2 "$oldid"
|
||||
done
|
||||
local DOKKU_DOCKER_STOP_TIMEOUT="$(config_get "$APP" DOKKU_DOCKER_STOP_TIMEOUT || true)"
|
||||
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
|
||||
(
|
||||
exec >/dev/null 2>/dev/null </dev/null
|
||||
trap '' INT HUP
|
||||
@@ -151,7 +153,8 @@ dokku_deploy_cmd() {
|
||||
# Attempt to stop, if that fails, then force a kill as docker seems
|
||||
# to not send SIGKILL as the docs would indicate. If that fails, move
|
||||
# on to the next.
|
||||
docker stop "$oldid" \
|
||||
# shellcheck disable=SC2086
|
||||
docker stop $DOCKER_STOP_TIME_ARG "$oldid" \
|
||||
|| docker kill "$oldid" \
|
||||
|| plugn trigger retire-container-failed "$APP" # plugin trigger for event logging
|
||||
done
|
||||
|
||||
@@ -20,8 +20,15 @@ dokku_run_cmd() {
|
||||
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-run "$APP" "$IMAGE_TAG")
|
||||
[[ "$DOKKU_TRACE" ]] && local DOCKER_ARGS+=" -e TRACE=true "
|
||||
[[ "$DOKKU_RM_CONTAINER" ]] && local DOKKU_RUN_OPTS="--rm"
|
||||
has_tty && local DOKKU_RUN_OPTS+=" -i -t"
|
||||
|
||||
local DOKKU_RUN_OPTS=""
|
||||
if [[ "$DOKKU_RM_CONTAINER" ]]; then
|
||||
DOKKU_RUN_OPTS+=" --rm"
|
||||
elif [[ "$DOKKU_DETACH_CONTAINER" ]]; then
|
||||
DOKKU_RUN_OPTS+=" --detach"
|
||||
fi
|
||||
|
||||
has_tty && DOKKU_RUN_OPTS+=" -i -t"
|
||||
is_image_herokuish_based "$IMAGE" && local EXEC_CMD="/exec"
|
||||
# shellcheck disable=SC2086
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/20_events/post-create
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/post-stop
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/user-auth
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
apps_create() {
|
||||
declare desc="verifies app name and creates an app"
|
||||
@@ -34,11 +35,14 @@ apps_destroy() {
|
||||
|
||||
plugn trigger pre-delete "$APP" "$IMAGE_TAG"
|
||||
local DOKKU_APP_CIDS=$(get_app_container_ids "$APP")
|
||||
local cid
|
||||
local DOKKU_DOCKER_STOP_TIMEOUT="$(config_get "$APP" DOKKU_DOCKER_STOP_TIMEOUT || true)"
|
||||
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
|
||||
|
||||
if [[ -n $DOKKU_APP_CIDS ]]; then
|
||||
local cid
|
||||
for cid in $DOKKU_APP_CIDS; do
|
||||
docker stop "$cid" > /dev/null || true
|
||||
# shellcheck disable=SC2086
|
||||
docker stop $DOCKER_STOP_TIME_ARG "$cid" > /dev/null || true
|
||||
docker rm "$cid" > /dev/null || true
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core build-env plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -7,13 +7,14 @@ case "$1" in
|
||||
help_content_func () {
|
||||
declare desc="return certs plugin help content"
|
||||
cat<<help_content
|
||||
certs, Manage Dokku apps SSL (TLS) certs
|
||||
certs:add <app> CRT KEY, Add an ssl endpoint to an app. Can also import from a tarball on stdin
|
||||
certs:chain CRT [CRT ...], [NOT IMPLEMENTED] Print the ordered and complete chain for the given certificate.
|
||||
certs:chain CRT [CRT ...], [NOT IMPLEMENTED] Print the ordered and complete chain for the given certificate
|
||||
certs:generate <app> DOMAIN, Generate a key and certificate signing request (and self-signed certificate)
|
||||
certs:info <app>, Show certificate information for an ssl endpoint.
|
||||
certs:key <app> CRT KEY [KEY ...], [NOT IMPLEMENTED] Print the correct key for the given certificate.
|
||||
certs:remove <app>, Remove an SSL Endpoint from an app.
|
||||
certs:rollback <app>, [NOT IMPLEMENTED] Rollback an SSL Endpoint for an app.
|
||||
certs:info <app>, Show certificate information for an ssl endpoint
|
||||
certs:key <app> CRT KEY [KEY ...], [NOT IMPLEMENTED] Print the correct key for the given certificate
|
||||
certs:remove <app>, Remove an SSL Endpoint from an app
|
||||
certs:rollback <app>, [NOT IMPLEMENTED] Rollback an SSL Endpoint for an app
|
||||
certs:update <app> CRT KEY, Update an SSL Endpoint on an app. Can also import from a tarball on stdin
|
||||
help_content
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -228,6 +228,9 @@ parse_args() {
|
||||
--quiet)
|
||||
export DOKKU_QUIET_OUTPUT=1
|
||||
;;
|
||||
--detach)
|
||||
export DOKKU_DETACH_CONTAINER=1
|
||||
;;
|
||||
--trace)
|
||||
export DOKKU_TRACE=1
|
||||
;;
|
||||
@@ -308,6 +311,22 @@ get_app_running_container_ids() {
|
||||
echo "$APP_RUNNING_CONTAINER_IDS"
|
||||
}
|
||||
|
||||
get_app_running_container_types() {
|
||||
declare desc="return list of running container types for given app"
|
||||
local APP=$1 CONTAINER_TYPES
|
||||
verify_app_name "$APP"
|
||||
|
||||
! (is_deployed "$APP") && dokku_log_fail "App $APP has not been deployed"
|
||||
|
||||
CONTAINER_TYPES="$(find "$DOKKU_ROOT/$APP" -maxdepth 1 -name "CONTAINER.*" -print0 | xargs -0)"
|
||||
if [[ -n "$CONTAINER_TYPES" ]]; then
|
||||
CONTAINER_TYPES="${CONTAINER_TYPES//$DOKKU_ROOT\/$APP\//}"
|
||||
CONTAINER_TYPES="$(tr " " $'\n' <<< "$CONTAINER_TYPES" | awk -F. '{ print $2 }' | sort | uniq | xargs)"
|
||||
fi
|
||||
|
||||
echo "$CONTAINER_TYPES"
|
||||
}
|
||||
|
||||
get_cmd_from_procfile() {
|
||||
declare desc="parse cmd from app Procfile"
|
||||
local APP=$1; local PROC_TYPE=$2; local DOKKU_PROCFILE="$DOKKU_ROOT/$APP/DOKKU_PROCFILE"
|
||||
@@ -388,6 +407,11 @@ release_and_deploy() {
|
||||
local IMAGE_SOURCE_TYPE="herokuish"
|
||||
else
|
||||
local IMAGE_SOURCE_TYPE="dockerfile"
|
||||
local DOKKU_DOCKERFILE_PORTS=$(config_get "$APP" DOKKU_DOCKERFILE_PORTS || true)
|
||||
if [[ -z "$DOKKU_DOCKERFILE_PORTS" ]]; then
|
||||
local DOCKER_IMAGE_PORTS=$(get_exposed_ports_from_image "$IMAGE")
|
||||
[[ -n "$DOCKER_IMAGE_PORTS" ]] && config_set --no-restart "$APP" DOKKU_DOCKERFILE_PORTS="$DOCKER_IMAGE_PORTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
local DOKKU_APP_SKIP_DEPLOY="$(config_get "$APP" DOKKU_SKIP_DEPLOY || true)"
|
||||
@@ -571,6 +595,29 @@ get_dockerfile_exposed_ports() {
|
||||
echo "$DOCKERFILE_PORTS"
|
||||
}
|
||||
|
||||
get_exposed_ports_from_image() {
|
||||
declare desc="return all exposed ports from passed image name"
|
||||
local IMAGE="$1"; verify_image "$IMAGE"
|
||||
# shellcheck disable=SC2016
|
||||
local DOCKER_IMAGE_EXPOSED_PORTS="$(docker inspect -f '{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}' "$IMAGE")"
|
||||
echo "$DOCKER_IMAGE_EXPOSED_PORTS"
|
||||
}
|
||||
|
||||
get_entrypoint_from_image() {
|
||||
declare desc="return .Config.Entrypoint from passed image name"
|
||||
local IMAGE="$1"; verify_image "$IMAGE"
|
||||
local DOCKER_IMAGE_ENTRYPOINT="$(docker inspect --format '{{range .Config.Entrypoint}}{{.}} {{end}}' "$IMAGE")"
|
||||
echo "ENTRYPOINT $DOCKER_IMAGE_ENTRYPOINT"
|
||||
}
|
||||
|
||||
get_cmd_from_image() {
|
||||
declare desc="return .Config.Cmd from passed image name"
|
||||
local IMAGE="$1"; verify_image "$IMAGE"
|
||||
local DOCKER_IMAGE_CMD="$(docker inspect --format '{{range .Config.Cmd}}{{.}} {{end}}' "$IMAGE")"
|
||||
DOCKER_IMAGE_CMD="${DOCKER_IMAGE_CMD/\/bin\/sh -c/}"
|
||||
echo "CMD $DOCKER_IMAGE_CMD"
|
||||
}
|
||||
|
||||
extract_directive_from_dockerfile() {
|
||||
declare desc="return requested directive from passed file path"
|
||||
local FILE_PATH="$1"; local SEARCH_STRING="$2"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -17,36 +17,55 @@ config_export() {
|
||||
return 0
|
||||
}
|
||||
|
||||
get_sanitized_config_args() {
|
||||
local desc="return sanitized arguments for config plugin"
|
||||
local SANITIZED_ARGS=("$@")
|
||||
|
||||
SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}")
|
||||
SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}")
|
||||
SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}")
|
||||
SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}")
|
||||
|
||||
echo "${SANITIZED_ARGS[@]}"
|
||||
}
|
||||
|
||||
config_parse_args() {
|
||||
declare desc="parse config plugin args"
|
||||
unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART
|
||||
case "$2" in
|
||||
--global)
|
||||
unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
|
||||
|
||||
for var; do
|
||||
if [[ "$var" == "--global" ]]; then
|
||||
ENV_FILE="$DOKKU_ROOT/ENV"
|
||||
DOKKU_CONFIG_TYPE="global"
|
||||
DOKKU_CONFIG_RESTART=false
|
||||
;;
|
||||
--no-restart)
|
||||
APP="$3"
|
||||
ENV_FILE="$DOKKU_ROOT/$APP/ENV"
|
||||
fi
|
||||
if [[ "$var" == "--no-restart" ]]; then
|
||||
DOKKU_CONFIG_RESTART=false
|
||||
DOKKU_CONFIG_TYPE="app"
|
||||
set -- "${@:1:1}" "${@:3}"
|
||||
esac
|
||||
fi
|
||||
if [[ "$var" == "--export" ]]; then
|
||||
DOKKU_CONFIG_EXPORT=true
|
||||
fi
|
||||
if [[ "$var" == "--shell" ]]; then
|
||||
DOKKU_CONFIG_SHELL=true
|
||||
fi
|
||||
done
|
||||
|
||||
local SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
|
||||
set -- "${SANITIZED_ARGS[@]}"
|
||||
|
||||
APP=${APP:="$2"}
|
||||
ENV_FILE=${ENV_FILE:="$DOKKU_ROOT/$APP/ENV"}
|
||||
DOKKU_CONFIG_TYPE=${DOKKU_CONFIG_TYPE:="app"}
|
||||
DOKKU_CONFIG_RESTART=${DOKKU_CONFIG_RESTART:=true}
|
||||
|
||||
if [[ "$DOKKU_CONFIG_TYPE" = "app" ]]; then
|
||||
if [[ -z $APP ]]; then
|
||||
if [[ "$DOKKU_CONFIG_TYPE" == "app" ]]; then
|
||||
if [[ -z $2 ]]; then
|
||||
dokku_log_fail "Please specify an app to run the command on"
|
||||
else
|
||||
verify_app_name "$2"
|
||||
APP=${APP:="$2"}
|
||||
ENV_FILE=${ENV_FILE:="$DOKKU_ROOT/$APP/ENV"}
|
||||
fi
|
||||
fi
|
||||
export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART
|
||||
export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT
|
||||
}
|
||||
|
||||
config_create () {
|
||||
@@ -95,35 +114,22 @@ config_write() {
|
||||
rm -f "$ENV_FILE_TEMP"
|
||||
}
|
||||
|
||||
is_config_export() {
|
||||
declare desc="return 0 if we're supposed to export"
|
||||
for var in "$@"; do
|
||||
if [[ "$var" == "--export" ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
config_all() {
|
||||
declare desc="print or export config vars"
|
||||
[[ "$1" == "config" ]] || set -- "config" "$@"
|
||||
config_parse_args "$@"
|
||||
local SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
|
||||
set -- "${SANITIZED_ARGS[@]}"
|
||||
|
||||
config_create "$ENV_FILE"
|
||||
is_config_export "$@" && config_export "$DOKKU_CONFIG_TYPE" "$APP" && return 0
|
||||
[[ $DOKKU_CONFIG_EXPORT ]] && config_export "$DOKKU_CONFIG_TYPE" "$APP" && return 0
|
||||
|
||||
[[ "$APP" ]] && local DOKKU_CONFIG_TYPE=$APP
|
||||
[[ $APP ]] && local DOKKU_CONFIG_TYPE=$APP
|
||||
[[ ! -s $ENV_FILE ]] && dokku_log_fail "no config vars for $DOKKU_CONFIG_TYPE"
|
||||
|
||||
local VARS=$(grep -Eo "export ([a-zA-Z_][a-zA-Z0-9_]*=.*)" "$ENV_FILE" | cut -d" " -f2-)
|
||||
|
||||
for var in "$@"; do
|
||||
if [[ "$var" == "--shell" ]]; then
|
||||
echo "$VARS"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
[[ $DOKKU_CONFIG_SHELL ]] && echo "$VARS" && return 0
|
||||
|
||||
dokku_log_info2_quiet "$DOKKU_CONFIG_TYPE config vars"
|
||||
config_styled_hash "$VARS"
|
||||
@@ -133,8 +139,10 @@ config_get() {
|
||||
declare desc="get value of given config var"
|
||||
[[ "$1" == "config:get" ]] || set -- "config:get" "$@"
|
||||
config_parse_args "$@"
|
||||
local SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
|
||||
set -- "${SANITIZED_ARGS[@]}"
|
||||
|
||||
if [[ -z $3 ]]; then
|
||||
if [[ -z $2 ]]; then
|
||||
echo "Usage: dokku config:get APP KEY"
|
||||
echo "Must specify KEY."
|
||||
exit 1
|
||||
@@ -145,7 +153,7 @@ config_get() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
local KEY="$3"
|
||||
local KEY="${*: -1}"
|
||||
|
||||
grep -Eo "export ([a-zA-Z_][a-zA-Z0-9_]*=.*)" "$ENV_FILE" | grep "^export $KEY=" | cut -d"=" -f2- | sed -e "s/^'//" -e "s/'$//"
|
||||
}
|
||||
@@ -154,7 +162,6 @@ config_set() {
|
||||
declare desc="set value of given config var"
|
||||
[[ "$1" == "config:set" ]] || set -- "config:set" "$@"
|
||||
config_parse_args "$@"
|
||||
[[ "$2" = "--no-restart" ]] && set -- "${@:1:1}" "${@:3}"
|
||||
|
||||
if [[ -z "${*:3}" ]]; then
|
||||
echo "Usage: dokku config:set APP KEY1=VALUE1 [KEY2=VALUE2 ...]"
|
||||
@@ -170,7 +177,9 @@ config_set() {
|
||||
shift 2
|
||||
|
||||
for var; do
|
||||
if [[ $var != *"="* ]]; then
|
||||
if [[ $var == "--global" ]] || [[ $var == "--no-restart" ]] || ([[ $APP ]] && [[ $var == "$APP" ]]); then
|
||||
shift 1
|
||||
elif [[ $var != *"="* ]]; then
|
||||
echo "Usage: dokku config:set APP KEY1=VALUE1 [KEY2=VALUE2 ...]"
|
||||
echo "Whitespaces need to be escaped, i.e. KEY=\"VAL\ WITH\ SPACES\""
|
||||
echo "Must specify KEY and VALUE to set."
|
||||
@@ -202,7 +211,7 @@ ${var}"
|
||||
plugn trigger post-config-update "$APP" "set" "$@"
|
||||
fi
|
||||
|
||||
local DOKKU_APP_RESTORE=$(config_get "$APP" DOKKU_APP_RESTORE || true)
|
||||
[[ $APP ]] && local DOKKU_APP_RESTORE=$(config_get "$APP" DOKKU_APP_RESTORE || true)
|
||||
if [[ "$DOKKU_CONFIG_RESTART" == "true" ]] && [[ "$DOKKU_APP_RESTORE" != 0 ]]; then
|
||||
dokku_log_info1 "Restarting app $APP"
|
||||
dokku ps:restart "$APP"
|
||||
@@ -213,9 +222,10 @@ config_unset() {
|
||||
declare desc="unset given config var"
|
||||
[[ "$1" == "config:unset" ]] || set -- "config:unset" "$@"
|
||||
config_parse_args "$@"
|
||||
[[ "$2" = "--no-restart" ]] && set -- "${@:1:1}" "${@:3}"
|
||||
local SANITIZED_ARGS=($(get_sanitized_config_args "$@"))
|
||||
set -- "${SANITIZED_ARGS[@]}"
|
||||
|
||||
if [[ -z $3 ]]; then
|
||||
if [[ -z $2 ]]; then
|
||||
echo "Usage: dokku config:unset APP KEY1 [KEY2 ...]"
|
||||
echo "Must specify KEY to unset."
|
||||
exit 1
|
||||
@@ -223,7 +233,7 @@ config_unset() {
|
||||
|
||||
config_create "$ENV_FILE"
|
||||
local ENV_TEMP=$(cat "${ENV_FILE}")
|
||||
local VARS="${*:3}"
|
||||
local VARS="${*:2}"
|
||||
|
||||
for var in $VARS; do
|
||||
dokku_log_info1 "Unsetting $var"
|
||||
@@ -234,10 +244,9 @@ config_unset() {
|
||||
|
||||
plugn trigger post-config-update "$APP" "unset" "$@"
|
||||
|
||||
local DOKKU_APP_RESTORE=$(config_get "$APP" DOKKU_APP_RESTORE || true)
|
||||
[[ $APP ]] && local DOKKU_APP_RESTORE=$(config_get "$APP" DOKKU_APP_RESTORE || true)
|
||||
if [[ "$DOKKU_CONFIG_RESTART" == "true" ]] && [[ "$DOKKU_APP_RESTORE" != 0 ]]; then
|
||||
dokku_log_info1 "Restarting app $APP"
|
||||
dokku ps:restart "$APP"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core config plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core docker-options plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -66,15 +66,15 @@ domains_add() {
|
||||
verify_app_name "$1"
|
||||
local APP="$1"; local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
|
||||
|
||||
if [[ $(egrep -w "^${2}$" "$APP_VHOST_PATH" > /dev/null 2>&1; echo $?) -eq 0 ]]; then
|
||||
dokku_log_fail "$2 is already defined for $APP"
|
||||
exit 1
|
||||
fi
|
||||
shift 1
|
||||
|
||||
for DOMAIN in "$@"; do
|
||||
echo "$DOMAIN" >> "$APP_VHOST_PATH"
|
||||
dokku_log_info1 "Added $DOMAIN to $APP"
|
||||
if [[ $(egrep -w "^$DOMAIN$" "$APP_VHOST_PATH" > /dev/null 2>&1; echo $?) -eq 0 ]]; then
|
||||
dokku_log_info1 "Skipping: $DOMAIN already added to $APP"
|
||||
else
|
||||
echo "$DOMAIN" >> "$APP_VHOST_PATH"
|
||||
dokku_log_info1 "Added $DOMAIN to $APP"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$(is_app_vhost_enabled "$APP")" == "false" ]];then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core domains plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core enter plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -7,25 +7,45 @@ enter_default_cmd() {
|
||||
local cmd="enter"
|
||||
local APP="$2"; local CONTAINER_TYPE="$3"; local IMAGE_TAG=$(get_running_image_tag "$APP"); local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
verify_app_name "$APP"
|
||||
local AVAILABLE_CONTAINER_TYPES=($(get_app_running_container_types "$APP"))
|
||||
|
||||
[[ ! -n "$3" ]] && dokku_log_fail "No container id specified"
|
||||
if [[ -z "$3" ]]; then
|
||||
if [[ ${#AVAILABLE_CONTAINER_TYPES[@]} -gt 1 ]]; then
|
||||
dokku_log_warn "No container type specified."
|
||||
dokku_log_fail "Available types for app ($APP): ${AVAILABLE_CONTAINER_TYPES[@]}"
|
||||
else
|
||||
CONTAINER_TYPE="${AVAILABLE_CONTAINER_TYPES[0]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$3" == "--container-id" ]]; then
|
||||
[[ ! -n "$4" ]] && dokku_log_fail "No container id specified"
|
||||
|
||||
local DOKKU_APP_CIDS=( $(get_app_container_ids "$APP") )
|
||||
printf -- '%s\n' "${DOKKU_APP_CIDS[@]}" | grep -q -e "^$4" || dokku_log_fail "Invalid container id for app"
|
||||
if [[ ! -n "$4" ]]; then
|
||||
dokku_log_warn "No container id specified."
|
||||
dokku_log_fail "Available ids for app ($APP): ${DOKKU_APP_CIDS[@]}"
|
||||
fi
|
||||
if ! (printf -- '%s\n' "${DOKKU_APP_CIDS[@]}" | grep -q -e "^$4"); then
|
||||
dokku_log_warn "Invalid container id for app"
|
||||
dokku_log_fail "Available ids for app ($APP): ${DOKKU_APP_CIDS[@]}"
|
||||
fi
|
||||
local ID=$(printf -- '%s\n' "${DOKKU_APP_CIDS[@]}" | grep -e "^$4")
|
||||
shift 4
|
||||
else
|
||||
local DOKKU_APP_CIDS=( $(get_app_container_ids "$APP" "$CONTAINER_TYPE") )
|
||||
local ID=${DOKKU_APP_CIDS[0]}
|
||||
[[ ! -n $ID ]] && dokku_log_fail "No containers found for type '$CONTAINER_TYPE'"
|
||||
shift 3
|
||||
if [[ ! -n $ID ]]; then
|
||||
dokku_log_warn "No containers found for type '$CONTAINER_TYPE'"
|
||||
dokku_log_fail "Available types for app ($APP): ${AVAILABLE_CONTAINER_TYPES[@]}"
|
||||
fi
|
||||
if [[ $3 ]]; then
|
||||
shift 3
|
||||
else
|
||||
shift 2
|
||||
fi
|
||||
fi
|
||||
|
||||
docker ps -aq --no-trunc | grep -e "^$ID" > /dev/null || dokku_log_fail "Container does not exist"
|
||||
docker ps -q --no-trunc | grep -e "^$ID" > /dev/null || dokku_log_fail "Container is not running"
|
||||
docker inspect "$ID" &> /dev/null || dokku_log_fail "Container does not exist"
|
||||
docker inspect -f '{{ .State.Running }}' "$ID" | grep -q "true" > /dev/null || dokku_log_fail "Container is not running"
|
||||
|
||||
local EXEC_CMD=""
|
||||
has_tty && local DOKKU_RUN_OPTS+=" -i -t"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core git plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core logs plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core named containers plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -7,6 +7,7 @@ case "$1" in
|
||||
help_content_func () {
|
||||
declare desc="return nginx plugin help content"
|
||||
cat<<help_content
|
||||
nginx, Interact with Dokku's Nginx proxy
|
||||
nginx:build-config <app>, (Re)builds nginx config for given app
|
||||
nginx:access-logs <app> [-t], Show the nginx access logs for an application (-t follows)
|
||||
nginx:error-logs <app> [-t], Show the nginx error logs for an application (-t follows)
|
||||
@@ -16,7 +17,7 @@ help_content
|
||||
if [[ $1 = "nginx:help" ]] ; then
|
||||
echo -e 'Usage: dokku nginx[:COMMAND]'
|
||||
echo ''
|
||||
echo 'Interact with Dokkus Nginx proxy.'
|
||||
echo 'Interact with Dokku'"'"'s Nginx proxy.'
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
help_content_func | sort | column -c2 -t -s,
|
||||
|
||||
@@ -188,6 +188,7 @@ nginx_build_config() {
|
||||
fi
|
||||
local SSL_SERVER_NAME=$(echo "$SSL_VHOSTS" | xargs)
|
||||
fi
|
||||
eval "$(config_export app "$APP")"
|
||||
local SIGIL_PARAMS=(-f $NGINX_TEMPLATE APP="$APP" DOKKU_ROOT="$DOKKU_ROOT"
|
||||
NOSSL_SERVER_NAME="$NOSSL_SERVER_NAME"
|
||||
DOKKU_APP_LISTENERS="$DOKKU_APP_LISTENERS"
|
||||
|
||||
@@ -49,18 +49,24 @@ gpasswd -M "" dokku
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
/usr/sbin/invoke-rc.d nginx start
|
||||
NGINX_INIT="/usr/sbin/invoke-rc.d"
|
||||
"$NGINX_INIT" nginx start || "$NGINX_INIT" nginx reload
|
||||
;;
|
||||
|
||||
ubuntu)
|
||||
/etc/init.d/nginx start
|
||||
NGINX_INIT="/etc/init.d/nginx"
|
||||
"$NGINX_INIT" start || "$NGINX_INIT" reload
|
||||
;;
|
||||
|
||||
opensuse)
|
||||
/sbin/service nginx start
|
||||
NGINX_INIT="/sbin/service"
|
||||
"$NGINX_INIT" nginx start || "$NGINX_INIT" nginx reload
|
||||
;;
|
||||
|
||||
arch)
|
||||
/usr/bin/systemctl start nginx
|
||||
NGINX_INIT="/usr/bin/systemctl"
|
||||
"$NGINX_INIT" start nginx || "$NGINX_INIT" reload nginx
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core nginx-vhosts plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -2,6 +2,7 @@ server {
|
||||
listen [::]:{{ .NGINX_SSL_PORT }} ssl spdy;
|
||||
listen {{ .NGINX_SSL_PORT }} ssl spdy;
|
||||
{{ if .SSL_SERVER_NAME }}server_name {{ .SSL_SERVER_NAME }}; {{ end }}
|
||||
{{ if .NOSSL_SERVER_NAME }}server_name {{ .NOSSL_SERVER_NAME }}; {{ end }}
|
||||
{{ include "log.config" . }}
|
||||
ssl_certificate {{ .APP_SSL_PATH }}/server.crt;
|
||||
ssl_certificate_key {{ .APP_SSL_PATH }}/server.key;
|
||||
|
||||
@@ -77,5 +77,5 @@ uninstall_plugin() {
|
||||
plugin_name() {
|
||||
declare desc="default plugin name"
|
||||
local PLUGIN_GIT_URL="$1"
|
||||
echo "$PLUGIN_GIT_URL" | awk -F '/' '{ print $NF }' | sed -e "s:.git::g" | sed 's:^dokku-::'
|
||||
echo "$PLUGIN_GIT_URL" | awk -F '/' '{ print $NF }' | sed -e "s:.git$::g" | sed 's:^dokku-::'
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core plugin plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core proxy plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
print_dokku_scale_file() {
|
||||
declare desc="prints contents of DOKKU_SCALE file"
|
||||
@@ -90,12 +91,14 @@ ps_start() {
|
||||
local APP="$1"; verify_app_name "$APP"
|
||||
local IMAGE_TAG=$(get_running_image_tag "$APP");
|
||||
|
||||
! (is_deployed "$APP") && echo "App $APP has not been deployed" && exit 0
|
||||
|
||||
if ! (is_app_running "$APP"); then
|
||||
release_and_deploy "$APP" "$IMAGE_TAG"
|
||||
if (is_deployed "$APP"); then
|
||||
if ! (is_app_running "$APP"); then
|
||||
release_and_deploy "$APP" "$IMAGE_TAG"
|
||||
else
|
||||
echo "App $APP already running"
|
||||
fi
|
||||
else
|
||||
echo "App $APP already running"
|
||||
echo "App $APP has not been deployed"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -107,9 +110,12 @@ ps_stop() {
|
||||
! (is_deployed "$APP") && echo "App $APP has not been deployed" && exit 0
|
||||
|
||||
if [[ -n "$DOKKU_APP_RUNNING_CONTAINER_IDS" ]]; then
|
||||
local DOKKU_DOCKER_STOP_TIMEOUT="$(config_get "$APP" DOKKU_DOCKER_STOP_TIMEOUT || true)"
|
||||
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
|
||||
|
||||
echo "Stopping $APP ..."
|
||||
# shellcheck disable=SC2086
|
||||
docker stop $DOKKU_APP_RUNNING_CONTAINER_IDS > /dev/null || true
|
||||
docker stop $DOCKER_STOP_TIME_ARG $DOKKU_APP_RUNNING_CONTAINER_IDS > /dev/null || true
|
||||
plugn trigger post-stop "$APP"
|
||||
else
|
||||
echo "App $APP already stopped"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ps plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core shell plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -7,6 +7,7 @@ case "$1" in
|
||||
help_content_func () {
|
||||
declare desc="return storage plugin help content"
|
||||
cat<<help_content
|
||||
storage, Mount local volume / directories inside containers
|
||||
storage:list <app>, List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir>, Create a new bind mount
|
||||
storage:unmount <app> <host-dir:container-dir>, Remove an existing bind mount
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core storage plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tags plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
@@ -7,8 +7,9 @@ case "$1" in
|
||||
help_content_func () {
|
||||
declare desc="return tar plugin help content"
|
||||
cat<<help_content
|
||||
tar, An alternative to using git. Apps are loaded via tarballs instead
|
||||
tar:in <app>, Reads an tarball containing the app from stdin
|
||||
tar:from <app> <url>, Loads an app tarball from url.
|
||||
tar:from <app> <url>, Loads an app tarball from url
|
||||
help_content
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tar plugin"
|
||||
version = "0.5.4"
|
||||
version = "0.5.7"
|
||||
[plugin.config]
|
||||
|
||||
5
tests.mk
@@ -99,6 +99,10 @@ deploy-test-dockerfile-noexpose:
|
||||
@echo deploying dockerfile-noexpose app...
|
||||
cd tests && ./test_deploy ./apps/dockerfile-noexpose dokku.me
|
||||
|
||||
deploy-test-dockerfile-procfile:
|
||||
@echo deploying dockerfile-procfile app...
|
||||
cd tests && ./test_deploy ./apps/dockerfile-procfile dokku.me
|
||||
|
||||
deploy-test-gitsubmodules:
|
||||
@echo deploying gitsubmodules app...
|
||||
cd tests && ./test_deploy ./apps/gitsubmodules dokku.me
|
||||
@@ -154,6 +158,7 @@ deploy-tests:
|
||||
@$(QUIET) $(MAKE) deploy-test-clojure
|
||||
@$(QUIET) $(MAKE) deploy-test-dockerfile
|
||||
@$(QUIET) $(MAKE) deploy-test-dockerfile-noexpose
|
||||
@$(QUIET) $(MAKE) deploy-test-dockerfile-procfile
|
||||
@$(QUIET) $(MAKE) deploy-test-gitsubmodules
|
||||
@$(QUIET) $(MAKE) deploy-test-go
|
||||
@$(QUIET) $(MAKE) deploy-test-java
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
FROM ubuntu:trusty
|
||||
ENV LC_ALL C
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV DEBCONF_NONINTERACTIVE_SEEN true
|
||||
FROM node:4
|
||||
|
||||
EXPOSE 3001/udp
|
||||
EXPOSE 3000/tcp
|
||||
EXPOSE 3003
|
||||
|
||||
RUN apt-get install -y software-properties-common && add-apt-repository ppa:chris-lea/node.js && apt-get update
|
||||
RUN apt-get install -y build-essential curl postgresql-client-9.3 nodejs git
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN npm install
|
||||
|
||||
@@ -8,18 +8,19 @@ setup() {
|
||||
|
||||
teardown() {
|
||||
destroy_app
|
||||
destroy_app 0 "$MYAPP" || true
|
||||
}
|
||||
|
||||
# @test "(ps) herokuish" {
|
||||
# # CI support: 'Ah. I just spoke with our Docker expert --
|
||||
# # looks like docker exec is built to work with docker-under-libcontainer,
|
||||
# # but we're using docker-under-lxc. I don't have an estimated time for the fix, sorry
|
||||
# skip "circleci does not support docker exec at the moment."
|
||||
# run bash -c "dokku ps $TEST_APP | grep -q \"node web.js\""
|
||||
# echo "output: "$output
|
||||
# echo "status: "$status
|
||||
# assert_success
|
||||
# }
|
||||
@test "(ps) herokuish" {
|
||||
# CI support: 'Ah. I just spoke with our Docker expert --
|
||||
# looks like docker exec is built to work with docker-under-libcontainer,
|
||||
# but we're using docker-under-lxc. I don't have an estimated time for the fix, sorry
|
||||
skip "circleci does not support docker exec at the moment."
|
||||
run bash -c "dokku ps $TEST_APP | grep -q \"node web.js\""
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(ps) herokuish" {
|
||||
deploy_app
|
||||
@@ -123,3 +124,34 @@ teardown() {
|
||||
assert_success
|
||||
done
|
||||
}
|
||||
|
||||
@test "(ps:restore) herokuish" {
|
||||
MYAPP="manual-randomtestapp-1"
|
||||
create_app "$MYAPP"
|
||||
deploy_app
|
||||
|
||||
run bash -c "dokku ps:stop $TEST_APP"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku apps"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku ps:restore"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku ls"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku --quiet ls | grep $TEST_APP | grep -q running"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
@@ -150,10 +150,10 @@ teardown() {
|
||||
deploy_app
|
||||
|
||||
CID=$(< $DOKKU_ROOT/$TEST_APP/CONTAINER.web.1)
|
||||
run /bin/bash -c "docker inspect -f '{{ .Config.Volumes }}' $CID"
|
||||
run /bin/bash -c "docker inspect -f '{{ .Config.Volumes }}' $CID | sed -e 's:map::g' | tr -d '[]' | tr ' ' $'\n' | sort | xargs"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_output "map[/tmp:{} /var/tmp:{}]"
|
||||
assert_output "/tmp:{} /var/tmp:{}"
|
||||
}
|
||||
|
||||
@test "(docker-options) docker-options:add (all phases over SSH)" {
|
||||
|
||||
@@ -49,7 +49,7 @@ teardown() {
|
||||
run dokku domains:add $TEST_APP test.app.dokku.me
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(domains) domains:remove" {
|
||||
|
||||
@@ -112,6 +112,27 @@ build_nginx_config() {
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(core) run (detached)" {
|
||||
deploy_app
|
||||
|
||||
RANDOM_RUN_CID="$(dokku --detach run $TEST_APP sleep 300)"
|
||||
run bash -c "docker inspect -f '{{ .State.Status }}' $RANDOM_RUN_CID"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_output "running"
|
||||
|
||||
run bash -c "docker stop $RANDOM_RUN_CID"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run dokku cleanup
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
sleep 5 # wait for dokku cleanup to happen in the background
|
||||
}
|
||||
|
||||
@test "(core) run (with tty)" {
|
||||
deploy_app
|
||||
run /bin/bash -c "dokku run $TEST_APP ls /app/package.json"
|
||||
|
||||
@@ -41,6 +41,15 @@ assert_error_log() {
|
||||
assert_error_log ${TEST_APP}
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (with SSL & unrelated domain)" {
|
||||
setup_test_tls
|
||||
add_domain "node-js-app.dokku.me"
|
||||
add_domain "test.dokku.me"
|
||||
deploy_app
|
||||
assert_ssl_domain "node-js-app.dokku.me"
|
||||
assert_http_redirect "http://test.dokku.me" "https://test.dokku.me:443/"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (wildcard SSL)" {
|
||||
setup_test_tls wildcard
|
||||
add_domain "wildcard1.dokku.me"
|
||||
|
||||