Merge branch 'master' into feature-run-env

This commit is contained in:
Jose Diaz-Gonzalez
2019-05-19 23:20:34 -07:00
committed by GitHub
96 changed files with 802 additions and 352 deletions

View File

@@ -9,3 +9,5 @@ tests
!contrib/dokku-installer.py
!contrib/dokku-update
!contrib/bash-completion
!contrib/docker
vendor

View File

@@ -1,5 +1,103 @@
# History
## 0.16.4
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.4/bootstrap.sh
sudo DOKKU_TAG=v0.16.4 bash bootstrap.sh
```
### Bug Fixes
- #3547: @josegonzalez Correct retrieval of resource values for alternative schedulers
### New Features
- #3546: @josegonzalez Add ability to trigger an arbitrary plugin hook
## 0.16.3
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.3/bootstrap.sh
sudo DOKKU_TAG=v0.16.3 bash bootstrap.sh
```
### Bug Fixes
- #3541: @josegonzalez Handle case where image is null on first deploy
### New Features
- #3543: @josegonzalez Add ability to clear global domains
- #3517: @josegonzalez SSH key updates
- #3538: @josegonzalez Silence dokku run 'errors'
### Documentation
- #3523: @MarcDiethelm Add an example how to specify a Dockerfile for deployment
- #3539: @josegonzalez Warn users when ufw is enabled
## 0.16.2
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.2/bootstrap.sh
sudo DOKKU_TAG=v0.16.2 bash bootstrap.sh
```
### Documentation
- #3536: @josegonzalez docs: Add documentation for nginx-pre-reload limitation
- #3535: @josegonzalez Add help output for apps:exists
## 0.16.1
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.1/bootstrap.sh
sudo DOKKU_TAG=v0.16.1 bash bootstrap.sh
```
### New Features
- #3532: @josegonzalez refactor: allow the scheduler to decide if an app is deployed
### Documentation
- #3530: @jhstatewide Updated info about supported Ubuntu versions
## 0.16.0
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.0/bootstrap.sh
sudo DOKKU_TAG=v0.16.0 bash bootstrap.sh
```
### Bug Fixes
- #3527: @josegonzalez Use DOKKU_IMAGE for report command
### New Features
- #3528: @josegonzalez feat: add support for quiet ps:scale output
- #3516: @ape-box fix nginx template with Connection header to http_connection
- #3513: @Mayeu Support installing plugins via file:// scheme
### Documentation
- #3525: @artofrawr add multi dockerfile plugin to plugins.md
- #3518: @renestalder Add GitLab GIT_STRATEGY for stop_preview_app
- #3506: @vanastassiou Clarify application deployment documentation
- #3512: @Mayeu Update example app in deploy tutorial
## 0.15.5
Install/update via the bootstrap script:

View File

@@ -29,9 +29,7 @@
### Additional information
- Container Inspect Output (if applicable):
- 0.13.0+: `dokku inspect APP_NAME`
- <0.13.0: `docker inspect CONTAINER_ID`: WARNING, `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.
- Container Inspect Output (if applicable) via `dokku inspect APP_NAME`
- `cat /home/dokku/<app>/nginx.conf` (if applicable):
- Link to the exact repository being deployed (if possible/applicable):
- If a deploy is failing or behaving unexpectedly:
@@ -40,5 +38,5 @@
- 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):
- 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):

View File

@@ -98,8 +98,8 @@ A fresh VM running any of the following operating systems:
To install the latest stable release, run the following commands as a user who has access to `sudo`:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.15.5/bootstrap.sh
sudo DOKKU_TAG=v0.15.5 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.4/bootstrap.sh
sudo DOKKU_TAG=v0.16.4 bash bootstrap.sh
```
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.

View File

@@ -10,7 +10,7 @@ import subprocess
import sys
import threading
VERSION = 'v0.15.5'
VERSION = 'v0.16.4'
hostname = ''
try:
@@ -37,6 +37,15 @@ if os.path.isfile(key_file):
except subprocess.CalledProcessError:
pass
ufw_display = 'block'
try:
command = "sudo ufw status"
ufw_output = subprocess.check_output(command, shell=True).strip()
if "inactive" in ufw_output:
ufw_display = 'none'
except subprocess.CalledProcessError:
ufw_display = 'none'
def check_boot():
if 'onboot' not in sys.argv:
@@ -77,6 +86,7 @@ def check_boot():
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
content = PAGE.replace('{VERSION}', VERSION)
content = content.replace('{UFW_DISPLAY}', ufw_display)
content = content.replace('{HOSTNAME}', hostname)
content = content.replace('{AUTHORIZED_KEYS_LOCATION}', key_file)
content = content.replace('{ADMIN_KEYS}', "\n".join(admin_keys))
@@ -294,6 +304,9 @@ PAGE = """
<small class="form-text text-muted">When enabled, Nginx will be run on port 80 and proxy requests to apps based on hostname.</small>
<small class="form-text text-muted">When disabled, a specific port will be setup for each application on first deploy, and requests to that port will be proxied to the relevant app.</small>
</div>
<div class="alert alert-warning small mt-3 d-{UFW_DISPLAY}" role="alert">
<strong>Warning:</strong> UFW is active. To allow traffic to specific ports, run <code>sudo ufw allow PORT</code> for the port in question.
</div>
<div class="bd-callout bd-callout-info">
<h5>What will app URLs look like?</h5>
<pre><code id="example">http://hostname:port</code></pre>

2
debian/control vendored
View File

@@ -1,5 +1,5 @@
Package: dokku
Version: 0.15.5
Version: 0.16.4
Section: web
Priority: optional
Architecture: amd64

View File

@@ -8,6 +8,7 @@ plugin:enable <name> # Enable a previously disabled plugin
plugin:install [--core|git-url [--committish tag|branch|commit|--name custom-plugin-name]] # Optionally download git-url (with custom tag/committish) & run install trigger for active plugins (or only core ones)
plugin:install-dependencies [--core] # Run install-dependencies trigger for active plugins (or only core ones)
plugin:list # Print active plugins
plugin:trigger <args...>. # Trigger an arbitrary plugin hook
plugin:uninstall <name> # Uninstall a plugin (third-party only)
plugin:update [name [committish]] # Optionally update named plugin from git (with custom tag/committish) & run update trigger for active plugins
```
@@ -31,31 +32,31 @@ dokku plugin
```
plugn: dev
00_dokku-standard 0.15.5 enabled dokku core standard plugin
20_events 0.15.5 enabled dokku core events logging plugin
apps 0.15.5 enabled dokku core apps plugin
build-env 0.15.5 enabled dokku core build-env plugin
certs 0.15.5 enabled dokku core certificate management plugin
checks 0.15.5 enabled dokku core checks plugin
common 0.15.5 enabled dokku core common plugin
config 0.15.5 enabled dokku core config plugin
docker-options 0.15.5 enabled dokku core docker-options plugin
domains 0.15.5 enabled dokku core domains plugin
enter 0.15.5 enabled dokku core enter plugin
git 0.15.5 enabled dokku core git plugin
logs 0.15.5 enabled dokku core logs plugin
named-containers 0.15.5 enabled dokku core named containers plugin
network 0.15.5 enabled dokku core network plugin
nginx-vhosts 0.15.5 enabled dokku core nginx-vhosts plugin
plugin 0.15.5 enabled dokku core plugin plugin
proxy 0.15.5 enabled dokku core proxy plugin
ps 0.15.5 enabled dokku core ps plugin
repo 0.15.5 enabled dokku core repo plugin
shell 0.15.5 enabled dokku core shell plugin
ssh-keys 0.15.5 enabled dokku core ssh-keys plugin
storage 0.15.5 enabled dokku core storage plugin
tags 0.15.5 enabled dokku core tags plugin
tar 0.15.5 enabled dokku core tar plugin
00_dokku-standard 0.16.4 enabled dokku core standard plugin
20_events 0.16.4 enabled dokku core events logging plugin
apps 0.16.4 enabled dokku core apps plugin
build-env 0.16.4 enabled dokku core build-env plugin
certs 0.16.4 enabled dokku core certificate management plugin
checks 0.16.4 enabled dokku core checks plugin
common 0.16.4 enabled dokku core common plugin
config 0.16.4 enabled dokku core config plugin
docker-options 0.16.4 enabled dokku core docker-options plugin
domains 0.16.4 enabled dokku core domains plugin
enter 0.16.4 enabled dokku core enter plugin
git 0.16.4 enabled dokku core git plugin
logs 0.16.4 enabled dokku core logs plugin
named-containers 0.16.4 enabled dokku core named containers plugin
network 0.16.4 enabled dokku core network plugin
nginx-vhosts 0.16.4 enabled dokku core nginx-vhosts plugin
plugin 0.16.4 enabled dokku core plugin plugin
proxy 0.16.4 enabled dokku core proxy plugin
ps 0.16.4 enabled dokku core ps plugin
repo 0.16.4 enabled dokku core repo plugin
shell 0.16.4 enabled dokku core shell plugin
ssh-keys 0.16.4 enabled dokku core ssh-keys plugin
storage 0.16.4 enabled dokku core storage plugin
tags 0.16.4 enabled dokku core tags plugin
tar 0.16.4 enabled dokku core tar plugin
```
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.

View File

@@ -70,11 +70,31 @@ dokku resource:limit --cpu 100 --memory 100 --process-type worker node-js-app
#### Displaying Resource Limits
Running the `resource:limits` command without any flags will display the currently configured app reservation.
Running the `resource:limit` command without any flags will display the currently configured default app limits.
```shell
dokku resource:limits node-js-app
=====> resource limits node-js-app information
dokku resource:limit node-js-app
```
```
=====> resource limits node-js-app information [defaults]
cpu:
memory:
memory-swap: 100
network: 100
network-ingress:
network-egress:
```
This may also be combined with the `--process-type` flag to see app limits on a process-type level. Note that the displayed values are not merged with the defaults.
```shell
dokku resource:limit --process-type web node-js-app
```
```
=====> resource limits node-js-app information (web)
cpu: 100
memory: 100
memory-swap:
@@ -83,64 +103,6 @@ dokku resource:limits node-js-app
network-egress:
```
#### Global Resource Limits
By default, Dokku does not limit any resources, though these can be specified at the server level via the `--global` flag on the `resource:limit` command.
```shell
dokku resource:limit --global --memory 200
```
```
=====> Setting default resource limits
memory: 200
```
This may also be combined with the `--process-type` flag to set global limits on a process-type level:
```shell
dokku resource:limit --global --memory 150 --process-type web node-js-app
```
```
=====> Setting default resource limits (web)
memory: 150
```
#### Displaying Global Resource Limits
Running the `resource:limit` command with only the `--global` flag will display the currently configured default limits.
```shell
dokku resource:limit --global
```
```
=====> resource limits default information
cpu:
memory: 200
memory-swap:
network:
network-ingress:
network-egress:
```
This may also be combined with the `--process-type` flag to see global limits on a process-type level:
```shell
dokku resource:limit --global --process-type web
```
```
=====> resource limits default information (web)
cpu:
memory-swap:
memory: 150
network-egress:
network-ingress:
network:
```
#### Clearing Resource Limits
In cases where the values are incorrect - or there is no desire to limit resources - resource limits may be cleared using the `resource:limit-clear` command.
@@ -204,11 +166,14 @@ dokku resource:reserve --cpu 100 --memory 100 --process-type worker node-js-app
#### Displaying Resource Reservations
Running the `resource:reserve` command without any flags will display the currently configured app reservation.
Running the `resource:reserve` command without any flags will display the currently configured default app reservations.
```shell
dokku resource:reserve node-js-app
=====> resource reservation node-js-app information
```
```
=====> resource reservation node-js-app information [defaults]
cpu: 100
memory: 100
memory-swap:
@@ -217,64 +182,22 @@ dokku resource:reserve node-js-app
network-egress:
```
#### Global Resource Reservations
By default, Dokku does not reserve any resources, though these can be specified at the server level via the `--global` flag on the `resource:reserve` command.
This may also be combined with the `--process-type` flag to see app reservations on a process-type level. Note that the displayed values are not merged with the defaults.
```shell
dokku resource:reserve --global --memory 200
dokku resource:reserve --process-type web node-js-app
```
```
=====> Setting default resource reservation
memory: 200
```
This may also be combined with the `--process-type` flag to set global reservations on a process-type level:
```shell
dokku resource:reserve --global --memory 150 --process-type web node-js-app
```
```
=====> Setting default resource reservation (web)
memory: 150
```
#### Displaying Global Resource Reservations
Running the `resource:reserve` command with only the `--global` flag will display the currently configured default reservation.
```shell
dokku resource:reserve --global
```
```
=====> resource reservation default information
cpu:
memory: 200
=====> resource reservation node-js-app information (web)
cpu: 100
memory: 100
memory-swap:
network:
network-ingress:
network-egress:
```
This may also be combined with the `--process-type` flag to see global reservations on a process-type level:
```shell
dokku resource:reserve --global --process-type web
```
```
=====> resource reservation default information (web)
cpu:
memory-swap:
memory: 150
network-egress:
network-ingress:
network:
```
#### Clearing Resource Reservations
In cases where the values are incorrect - or there is no desire to reserve resources - resource reservations may be cleared using the `resource:reserve-clear` command.

View File

@@ -2,10 +2,10 @@
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/mstile-310x150.png"/>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/mstile-310x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>

View File

@@ -2,37 +2,37 @@
"name": "Dokku",
"icons": [
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.5\/docs\/assets\/favicons\/android-chrome-36x36.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.16.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.5\/docs\/assets\/favicons\/android-chrome-48x48.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.16.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.5\/docs\/assets\/favicons\/android-chrome-72x72.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.16.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.5\/docs\/assets\/favicons\/android-chrome-96x96.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.16.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.5\/docs\/assets\/favicons\/android-chrome-144x144.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.16.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.5\/docs\/assets\/favicons\/android-chrome-192x192.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.16.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"

View File

@@ -39,13 +39,13 @@ h1 {
font-size: 1.6em;
}
.header .navbar-brand a {
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/dokku.png);
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/dokku.png);
text-indent: 40px;
}
.blurb {
color: #424242;
background-color: #ededed;
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/gplaypattern.png);
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/gplaypattern.png);
padding: 45px 0;
text-align: center;
}

View File

@@ -12,6 +12,7 @@
"0.12.13",
"0.13.4",
"0.14.6",
"0.15.5"
"0.15.5",
"0.16.4"
]
}

View File

@@ -57,6 +57,7 @@ The following plugins are available and provided by Dokku maintainers. Where not
[Aluxian]: https://github.com/Aluxian
[Aomitayo]: https://github.com/Aomitayo
[apmorton]: https://github.com/apmorton
[artofrawr]: https://github.com/artofrawr
[basgys]: https://github.com/basgys
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
[blag]: https://github.com/blag
@@ -229,6 +230,7 @@ The following plugins are available and provided by Dokku maintainers. Where not
| [Long Timeout](https://github.com/investtools/dokku-long-timeout-plugin) | [investtools][] | 0.4.0+ |
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | 0.3.x |
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |
| [Multi Dockerfile](https://github.com/artofrawr/dokku-multi-dockerfile) | [artofrawr][] | 0.4.0+ |
| [Node](https://github.com/ademuk/dokku-nodejs) | [ademuk][] | 0.3.x |
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | 0.3.x |
| [Rollbar](https://github.com/iloveitaly/dokku-rollbar) | [iloveitaly][] | 0.5.0+ |

View File

@@ -6,6 +6,7 @@
domains:add <app> <domain> [<domain> ...] # Add domains to app
domains:add-global <domain> [<domain> ...] # Add global domain names
domains:clear <app> # Clear all domains for app
domains:clear-global # Clear global domain names
domains:disable <app> # Disable VHOST support
domains:enable <app> # Enable VHOST support
domains:remove <app> <domain> [<domain> ...] # Remove domains from app
@@ -27,21 +28,10 @@ scheme://subdomain.domain.tld
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial dokku configuration. It can then be modified with `dokku domains:add-global` and `dokku domains:remove-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 global virtualhost 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`.
If an FQDN such as `dokku.org` is used as the application name, the global virtualhost will be ignored and the resulting vhost URL for that application will be `dokku.org`.
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:
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. If the `nginx-hostname` plugin has no output, the normal hostname algorithm will be executed. See the [plugin trigger documentation](/docs/development/plugin-triggers.md#nginx-hostname) for more information.
```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` plugin has no output, the normal hostname algorithm will be executed.
## Disabling VHOSTS
@@ -88,17 +78,17 @@ dokku domains:report
```
=====> node-js-app domains information
Domains app enabled: true
Domains app vhosts: node-js-sample.dokku.org
Domains app vhosts: node-js-app.dokku.org
Domains global enabled: true
Domains global vhosts: dokku.org
=====> python-sample domains information
=====> python-app domains information
Domains app enabled: true
Domains app vhosts: python-sample.dokku.org
Domains app vhosts: python-app.dokku.org
Domains global enabled: true
Domains global vhosts: dokku.org
=====> ruby-sample domains information
=====> ruby-app domains information
Domains app enabled: true
Domains app vhosts: ruby-sample.dokku.org
Domains app vhosts: ruby-app.dokku.org
Domains global enabled: true
Domains global vhosts: dokku.org
```

View File

@@ -92,7 +92,7 @@ The following list config variables have special meaning and can be set in a var
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Whether to detach a container started via `dokku run`. |
| `DOKKU_QUIET_OUTPUT` | none | `--quiet` flag | Silences certain header output for `dokku` commands. |
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> `--rm-container` flag <br /> `--rm` flag | Whether to keep `dokku run` containers around or not. |
| `DOKKU_TRACE` | none | `dokku trace on` <br /> `dokku trace false` <br /> `--trace` flag | Turn on very verbose debugging. |
| `DOKKU_TRACE` | none | `dokku trace:on` <br /> `dokku trace:off` <br /> `--trace` flag | Turn on very verbose debugging. |
| `DOKKU_APP_PROXY_TYPE` | `nginx` | `dokku proxy:set` | |
| `DOKKU_APP_RESTORE` | `1` | `dokku config:set` <br /> `dokku ps:stop` | |
| `DOKKU_APP_SHELL` | `/bin/bash` | `dokku config:set` | Allows users to change the default shell used by Dokku for `dokku enter` and execution of deployment tasks. |

View File

@@ -67,17 +67,17 @@ dokku certs:report
```
```
=====> node-js-sample
Ssl dir: /home/dokku/node-js-sample/tls
=====> node-js-app
Ssl dir: /home/dokku/node-js-app/tls
Ssl enabled: true
Ssl hostnames: *.node-js-sample.org node-js-sample.org
Ssl hostnames: *.node-js-app.org node-js-app.org
Ssl expires at: Oct 5 23:59:59 2019 GMT
Ssl issuer: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Domain Validation Secure Server CA
Ssl starts at: Oct 5 00:00:00 2016 GMT
Ssl subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=*.node-js-sample.org
Ssl subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=*.node-js-app.org
Ssl verified: self signed.
=====> python-sample
Ssl dir: /home/dokku/python-sample/tls
=====> python-app
Ssl dir: /home/dokku/python-app/tls
Ssl enabled: false
Ssl hostnames:
Ssl expires at:
@@ -90,12 +90,12 @@ dokku certs:report
You can run the command for a specific app also.
```shell
dokku certs:report node-js-sample
dokku certs:report node-js-app
```
```
=====> node-js-sample ssl information
Ssl dir: /home/dokku/node-js-sample/tls
=====> node-js-app ssl information
Ssl dir: /home/dokku/node-js-app/tls
Ssl enabled: true
Ssl hostnames: *.dokku.org dokku.org
Ssl expires at: Oct 5 23:59:59 2019 GMT
@@ -108,7 +108,7 @@ dokku certs:report node-js-sample
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku certs:report node-js-sample --ssl-enabled
dokku certs:report node-js-app --ssl-enabled
```
## HSTS Header

View File

@@ -29,6 +29,12 @@ For users that require customization in the `build` phase, you may use build arg
dokku docker-options:add node-js-app build '--build-arg NODE_ENV=production'
```
The location of the `Dockerfile` may also be specified. If the location is changed, the repository **must also** have a `Dockerfile` in the root directory in order to trigger a dockerfile-based deploy.
```shell
dokku docker-options:add node-js-app build '--file Dockerfile.dokku'
```
Once set, the Dockerfile usage would be as follows:
```Dockerfile

View File

@@ -81,13 +81,13 @@ dokku checks:report
```
```
=====> search checks information
=====> node-js-app checks information
Checks disabled list: none
Checks skipped list: none
=====> python-sample checks information
=====> python-app checks information
Checks disabled list: none
Checks skipped list: none
=====> ruby-sample checks information
=====> ruby-app checks information
Checks disabled list: _all_
Checks skipped list: none
```
@@ -95,11 +95,11 @@ dokku checks:report
You can run the command for a specific app also.
```shell
dokku checks:report node-js-sample
dokku checks:report node-js-app
```
```
=====> node-js-sample checks information
=====> node-js-app checks information
Checks disabled list: none
Checks skipped list: none
```
@@ -107,7 +107,7 @@ dokku checks:report node-js-sample
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku checks:report node-js-sample --checks-disabled-list
dokku checks:report node-js-app --checks-disabled-list
```
## Customizing checks

View File

@@ -311,6 +311,24 @@ verify_app_name "$APP"
# TODO
```
### `docker-args-process-build`
- Description: `$PROC_TYPE` may be set to magic `_all_` process type to signify global docker deploy options.
- Invoked by: `dokku ps:rebuild`
- Arguments: `$APP $IMAGE_TAG $IMAGE_SOURCE_TYPE`
- 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
```
### `docker-args-process-deploy`
- Description: `$PROC_TYPE` may be set to magic `_all_` process type to signify global docker deploy options.
@@ -333,7 +351,7 @@ verify_app_name "$APP"
- Description: `$PROC_TYPE` may be set to magic `_all_` process type to signify global docker run options.
- Invoked by: `dokku run`
- Arguments: `$APP $IMAGE_TAG $IMAGE_SOURCE_TYPE [$PROC_TYPE $CONTAINER_INDEX]`
- Arguments: `$APP $IMAGE_TAG $IMAGE_SOURCE_TYPE`
- Example:
```shell
@@ -586,6 +604,8 @@ echo "$NEW_SUBDOMAIN.$VHOST"
### `nginx-pre-reload`
> Warning: The arguments INTERNAL_PORT and INTERNAL_IP_ADDRESS are no longer sufficient to retrieve all app listeners. Please run `plugn trigger network-get-listeners APP` within any implementation of `nginx-pre-reload` in order to retrieve all application listeners.
- Description: Run before nginx reloads hosts
- Invoked by: `dokku nginx:build-config`
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
@@ -1320,6 +1340,24 @@ DOKKU_SCHEDULER="$1"; APP="$2";
# TODO
```
### `scheduler-is-deployed`
> Warning: The scheduler plugin trigger apis are under development and may change
> between minor releases until the 1.0 release.
- Description: Allows you to check if an app has been deployed
- Invoked by: `dokku ps:rebuild`
- Arguments: `$DOKKU_SCHEDULER $APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
DOKKU_SCHEDULER="$1"; APP="$2";
# TODO
```
### `scheduler-logs`
> Warning: The scheduler plugin trigger apis are under development and may change

View File

@@ -29,7 +29,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.15.5-2 (Mon Feb 22 23:20:37 CET 2016)"
# wait for "==> build-arch: ==> Finished making: dokku 0.16.4-2 (Mon Feb 22 23:20:37 CET 2016)"
cd ../dokku-arch
git add PKGBUILD .SRCINFO
git commit -m 'Update to dokku 0.9.9'

View File

@@ -32,6 +32,9 @@ While we do provide official packages for a variety of platforms, as our test su
# run linter & update vagrant Dokku install from local git clone
make lint copyfiles
# build a specific plugin
make go-build-plugin copyplugin PLUGIN_NAME=apps
# execute all bats tests
make unit-tests

View File

@@ -6,7 +6,7 @@ Dokku is an extensible, open source Platform as a Service that runs on a single
To start using Dokku, you'll need a system that meets the following minimum requirements:
- A fresh installation of [Ubuntu 16.04 x64](https://www.ubuntu.com/download), [Ubuntu 14.04 x64](https://www.ubuntu.com/download), [Debian 8.2 x64](https://www.debian.org/distrib/) or [CentOS 7 x64](https://www.centos.org/download/) *(experimental)* with the FQDN set <sup>[1]</sup>
- A fresh installation of [Ubuntu x64 - Any currently supported release](https://www.ubuntu.com/download), [Debian 8.2 x64](https://www.debian.org/distrib/) or [CentOS 7 x64](https://www.centos.org/download/) *(experimental)* with the FQDN set <sup>[1]</sup>
- At least 1 GB of system memory <sup>[2]</sup>
You can *optionally* have a domain name pointed at the host's IP, though this is not necessary.
@@ -21,8 +21,8 @@ To install the latest stable version of Dokku, you can run the following shell c
```shell
# for debian systems, installs Dokku via apt-get
wget https://raw.githubusercontent.com/dokku/dokku/v0.15.5/bootstrap.sh;
sudo DOKKU_TAG=v0.15.5 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.4/bootstrap.sh;
sudo DOKKU_TAG=v0.16.4 bash bootstrap.sh
```
The installation process takes about 5-10 minutes, depending upon internet connection speed.

View File

@@ -1,5 +1,38 @@
# Troubleshooting
> New as of 0.17.0
```
trace:on # Enables trace mode
trace:off # Disables trace mode
```
## Trace Mode
By default, Dokku will constrain the amount of output displayed for any given command run. The verbosity of output can be increased by enabling trace mode. Trace mode will turn on the `set -x` flag for bash plugins, while other plugins are free to respect the environment variable `DOKKU_TRACE` and log differently as approprate. Trace mode can be useful to see _where_ plugins are running commands that would otherwise be unexpected.
To enable trace mode, run `trace:on`
```shell
dokku trace:on
```
```
-----> Enabling trace mode
```
Trace mode can be disabled with `trace:off`
```shell
dokku trace:off
```
```
-----> Disabling trace mode
```
## Common Problems
__Symptom:__ I deployed my app but I am getting the default nginx page.
__Solution:__
@@ -41,22 +74,7 @@ __Symptom:__ I want to deploy my app, but while pushing I get the following erro
__Solution:__
The `remote rejected` error does not give enough information. Anything could have failed.
To enable Dokku tracing, simply run the following command:
```shell
# since 0.3.9
dokku trace on
```
In versions older than 0.3.9, you can create a `/home/dokku/dokkurc` file containing the following:
```shell
export DOKKU_TRACE=1
```
This will trace all of Dokku's activity. If this does not help you, create a [gist](https://gist.github.com) containing the full log, and create an issue.
The `remote rejected` error does not give enough information. Anything could have failed. Enable trace mode and begin debugging. If this does not help you, create a [gist](https://gist.github.com) containing the full log, and create an issue.
***

View File

@@ -10,30 +10,30 @@
<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.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/style.css" rel="stylesheet">
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
<style>
.sponsors {
@@ -127,12 +127,12 @@
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.15.5/bootstrap.sh</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.16.4/bootstrap.sh</span>
</p>
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.15.5 bash bootstrap.sh</span>
<span class="command">sudo DOKKU_TAG=v0.16.4 bash bootstrap.sh</span>
</p>
<p class="line">
<span class="output">&nbsp;# go to your server's IP and follow the web installer</span>

View File

@@ -3,17 +3,19 @@
> New as of 0.5.0, Enhanced in 0.6.0
```
proxy:ports <app> # List proxy port mappings for app
proxy:ports-set <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for app
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Add proxy port mappings for app
proxy:ports-clear <app> # Clear all proxy port mappings for app
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Unset proxy port mappings for app
proxy:ports <app> # List proxy port mappings for an app
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Add proxy port mappings to an app
proxy:ports-clear <app> # Clear all proxy port mappings for an app
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Remove specific proxy port mappings from an app
proxy:ports-set <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for an app
```
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
## Usage
> Warning: Mapping alternative ports may conflict with the active firewall installed on your server or hosting provider. Such software includes - but is not limited to - AWS Security Groups, iptables, and UFW. Please consult the documentation for those softwares as applicable.
### Proxy port mapping
> New as of 0.6.0

View File

@@ -9,26 +9,26 @@
<meta name="author" content="">
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script>
@@ -42,7 +42,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.jsdelivr.net/gh/dokku/dokku@v0.15.5/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.4/docs/assets/style.css" rel="stylesheet">
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<style>

2
dokku
View File

@@ -36,7 +36,7 @@ DOKKU_DISTRO=$(
echo "$ID"
)
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish"}
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish:latest"}
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
export PLUGIN_PATH=${PLUGIN_PATH:="$DOKKU_LIB_ROOT/plugins"}

View File

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

View File

@@ -17,7 +17,7 @@ dokku_report_cmd() {
docker -D info | sed "s/^/ /"
dokku_log_info1 "sigil version: $(sigil -v)"
dokku_log_info1 "herokuish version: "
docker run --rm gliderlabs/herokuish:latest herokuish version | sed "s/^/ /"
docker run --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
dokku_log_info1 "dokku version: $(dokku version)"
dokku_log_info1 "dokku plugins: "
dokku plugin:list | sed "s/^/ /"

View File

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

View File

@@ -85,7 +85,7 @@ execute_script() {
local IMAGE_SOURCE_TYPE="dockerfile"
is_image_herokuish_based "$IMAGE" && IMAGE_SOURCE_TYPE="herokuish"
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-deploy "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE" "$PHASE_SCRIPT_KEY")
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-deploy "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE")
# eval args as array to respect escapes
declare -a ARG_ARRAY

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core app-json plugin"
version = "0.15.5"
version = "0.16.4"
[plugin.config]

View File

@@ -85,6 +85,7 @@ apps_help_content_func() {
apps:clone <old-app> <new-app>, Clones an app
apps:create <app>, Create a new app
apps:destroy <app>, Permanently destroy an app
apps:exists <app>, Checks if an app exists
apps:list, List your apps
apps:lock <app>, Locks an app for deployment
apps:locked <app>, Checks if an app is locked for deployment

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core buildpacks plugin"
version = "0.15.5"
version = "0.16.4"
[plugin.config]

View File

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

View File

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

View File

@@ -291,6 +291,10 @@ is_image_herokuish_based() {
declare IMAGE="$1"
local USER_VALUE
if [[ -z "$IMAGE" ]]; then
return 1
fi
# due to how the build process works, all herokuish images have the Environment variable USER=herokuishuser
USER_VALUE="$(docker inspect -f '{{range .Config.Env}}{{if eq . "USER=herokuishuser" }}{{println .}}{{end}}{{end}}' "$IMAGE")"
[[ "$USER_VALUE" == "" ]] && return 1
@@ -380,7 +384,10 @@ copy_from_image() {
fi
fi
local CID=$(docker create "$DOKKU_GLOBAL_RUN_ARGS" "$IMAGE")
docker cp "$CID:$SRC_FILE" "$DST_DIR"
if ! docker cp "$CID:$SRC_FILE" "$DST_DIR"; then
docker rm -f "$CID" &>/dev/null
return 1
fi
docker rm -f "$CID" &>/dev/null
else
return 1
@@ -450,14 +457,10 @@ get_app_running_container_types() {
is_deployed() {
declare desc="return 0 if given app has a running container"
local APP="$1"
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]] || [[ $(
ls "$DOKKU_ROOT/$APP"/CONTAINER.* &>/dev/null
echo $?
) -eq 0 ]]; then
return 0
else
return 1
fi
source "$PLUGIN_AVAILABLE_PATH/config/functions"
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
plugn trigger scheduler-is-deployed "$DOKKU_SCHEDULER" "$APP"
}
is_container_running() {
@@ -535,7 +538,7 @@ dokku_build() {
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$IMAGE_SOURCE_TYPE")
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" -e TRACE=true "
local IMAGE_SOURCE_TYPE="herokuish"
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-run "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE" "$PHASE_SCRIPT_KEY")
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE")
declare -a ARG_ARRAY
eval "ARG_ARRAY=($DOCKER_ARGS)"
@@ -563,7 +566,7 @@ dokku_build() {
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$IMAGE_SOURCE_TYPE")
local IMAGE_SOURCE_TYPE="dockerfile"
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-run "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE" "$PHASE_SCRIPT_KEY")
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE")
# strip --volume and -v args from DOCKER_ARGS
local DOCKER_ARGS=$(sed -e "s/--volume=[[:graph:]]\+[[:blank:]]\?//g" -e "s/-v[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS")

View File

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

View File

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

View File

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

View File

@@ -176,6 +176,14 @@ domains_add_global() {
done
}
domains_clear_global() {
declare desc="remove all domains"
local GLOBAL_VHOST_PATH="$DOKKU_ROOT/VHOST"
rm "$GLOBAL_VHOST_PATH"
touch "$GLOBAL_VHOST_PATH"
}
domains_remove_global() {
declare desc="remove list of domains"
local GLOBAL_VHOST_PATH="$DOKKU_ROOT/VHOST"
@@ -249,7 +257,7 @@ get_default_vhosts() {
local SUBDOMAIN=${APP/%\.${VHOST}/}
local hostname=$(: | plugn trigger nginx-hostname "$APP" "$SUBDOMAIN" "$VHOST")
if [[ -z $hostname ]]; then
if [[ "$APP" == *.* ]] && [[ "$SUBDOMAIN" == "$APP" ]]; then
if [[ "$APP" == *.* ]]; then
local hostname="${APP/\//-}"
else
local hostname="${APP/\//-}.$VHOST"

View File

@@ -44,13 +44,13 @@ cmd-domains-report-single() {
verify_app_name "$APP"
app_flags=(
"--domains-app-enabled: $(fn-domains-app-enabled "$APP")"
"--domains-app-vhosts: $(fn-domains-app-vhosts "$APP")"
"--domains-app-vhosts: $(fn-domains-app-vhosts "$APP" | awk '{$1=$1};1')"
)
fi
global_flags=(
"--domains-global-enabled: $(fn-domains-global-enabled)"
"--domains-global-vhosts: $(fn-domains-global-vhosts)"
"--domains-global-vhosts: $(fn-domains-global-vhosts | awk '{$1=$1};1')"
)
flag_map=("${app_flags[@]}" "${global_flags[@]}")
@@ -91,6 +91,7 @@ domains_help_content_func() {
domains:add <app> <domain> [<domain> ...], Add domains to app
domains:add-global <domain> [<domain> ...], Add global domain names
domains:clear <app>, Clear all domains for app
domains:clear-global, Clear global domain names
domains:disable <app>, Disable VHOST support
domains:enable <app>, Enable VHOST support
domains:remove <app> <domain> [<domain> ...], Remove domains from app

View File

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

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_clear_global_cmd() {
declare desc="clear global domain names via command line"
local cmd="domains:clear-global"
shift 1
domains_clear_global "$@"
}
domains_add_global_cmd "$@"

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core network plugin"
version = "0.15.5"
version = "0.16.4"
[plugin.config]

View File

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

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
nginx_show_conf_cmd() {
declare desc="display app nginx conf"
declare cmd="nginx:show-conf" argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
declare APP="$1"
verify_app_name "$APP"
if [[ ! -f "$DOKKU_ROOT/$APP/nginx.conf" ]]; then
dokku_log_fail "No nginx.conf exists for $APP"
fi
cat "$DOKKU_ROOT/$APP/nginx.conf"
}
nginx_show_conf_cmd "$@"

View File

@@ -26,7 +26,7 @@ server {
proxy_pass http://{{ $.APP }}-{{ $upstream_port }};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Connection $http_connection;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;

View File

@@ -8,13 +8,14 @@ case "$1" in
help_content_func() {
declare desc="return plugin plugin help content"
cat <<help_content
plugin:list, Print active plugins
plugin:disable <name>, Disable an installed plugin (third-party only)
plugin:enable <name>, Enable a previously disabled plugin
plugin:install [--core|git-url [--committish tag|branch|commit|--name custom-plugin-name]], Optionally download git-url (with custom tag/committish) & run install trigger for active plugins (or only core ones)
plugin:install-dependencies [--core], Run install-dependencies trigger for active plugins (or only core ones)
plugin:update [name [committish]], Optionally update named plugin from git (with custom tag/committish) & run update trigger for active plugins
plugin:enable <name>, Enable a previously disabled plugin
plugin:disable <name>, Disable an installed plugin (third-party only)
plugin:list, Print active plugins
plugin:trigger <args...>, Trigger an arbitrary plugin hook
plugin:uninstall <name>, Uninstall a plugin (third-party only)
plugin:update [name [committish]], Optionally update named plugin from git (with custom tag/committish) & run update trigger for active plugins
help_content
}

View File

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

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
plugin_trigger_cmd() {
declare desc="trigger an arbitrary plugin hook"
local cmd="plugin:trigger"
[[ "$1" == "$cmd" ]] && shift 1
plugn trigger "$@"
}
plugin_trigger_cmd "$@"

View File

@@ -80,12 +80,13 @@ proxy_help_content_func() {
declare desc="return proxy plugin help content"
cat <<help_content
proxy <app>, [DEPRECATED] Show proxy settings for app
proxy:enable <app>, Enable proxy for app
proxy:disable <app>, Disable proxy for app
proxy:enable <app>, Enable proxy for app
proxy:ports <app>, List proxy port mappings for app
proxy:ports-clear <app>, Clear all proxy port mappings for app
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...], Set proxy port mappings for app
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...], Unset proxy port mappings for app
proxy:ports-add <app> [<scheme>:<host-port>:<container-port>...], Add proxy port mappings to an app
proxy:ports-clear <app>, Clear all proxy port mappings for an app
proxy:ports-remove <app> [<host-port>|<scheme>:<host-port>:<container-port>...], Remove specific proxy port mappings from an app
proxy:ports-set <app> [<scheme>:<host-port>:<container-port>...], Set proxy port mappings for an app
proxy:report [<app>] [<flag>], Displays a proxy report for one or more apps
proxy:set <app> <proxy-type>, Set proxy type for app
help_content

View File

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

View File

@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
proxy_ports_add_cmd() {
declare desc="add proxy port mappings from an app"
declare desc="add proxy port mappings to an app"
local cmd="proxy:add"
local APP="$2"
verify_app_name "$APP"

View File

@@ -5,14 +5,14 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
proxy_ports_set_cmd() {
declare desc="add proxy port mappings from an app"
local cmd="proxy:add"
declare desc="set proxy port mappings for an app"
local cmd="proxy:set"
local APP="$2"
verify_app_name "$APP"
shift 2
set_proxy_ports "$APP" "$@"
plugn trigger post-proxy-ports-update "$APP" "add"
plugn trigger post-proxy-ports-update "$APP" "set"
}
proxy_ports_set_cmd "$@"

View File

@@ -62,7 +62,12 @@ generate_scale_file() {
local DOKKU_PROCFILE="$DOKKU_ROOT/$APP/DOKKU_PROCFILE"
verify_app_name "$APP"
copy_from_image "$IMAGE" "DOKKU_SCALE" "$DOKKU_ROOT/$APP" 2>/dev/null || true
if copy_from_image "$IMAGE" "DOKKU_SCALE" "$DOKKU_ROOT/$APP" >/dev/null 2>&1; then
cp "$DOKKU_SCALE_FILE" "${DOKKU_SCALE_FILE}.extracted"
else
rm -f "${DOKKU_SCALE_FILE}.extracted"
fi
if [[ ! -f $DOKKU_SCALE_FILE ]]; then
dokku_log_info1_quiet "DOKKU_SCALE file not found in app image. Generating one based on Procfile..."
@@ -182,20 +187,24 @@ ps_scale() {
local DOKKU_PROCFILE="$DOKKU_ROOT/$APP/DOKKU_PROCFILE"
shift 1
[[ ! -e $DOKKU_SCALE_FILE ]] && generate_scale_file "$APP" "$IMAGE_TAG"
[[ ! -e $DOKKU_SCALE_FILE ]] && generate_scale_file "$APP" "$IMAGE_TAG" >/dev/null 2>&1
if [[ -z "$@" ]]; then
dokku_log_info1_quiet "Scaling for $APP"
dokku_col_log_info1_quiet "proctype" "qty"
dokku_col_log_info1_quiet "--------" "---"
dokku_col_log_msg_quiet "proctype" "qty"
dokku_col_log_msg_quiet "--------" "---"
while read -r line || [[ -n "$line" ]]; do
[[ -z "$line" ]] && continue
local PROC_NAME=${line%%=*}
local PROC_COUNT=${line#*=}
dokku_col_log_info1 "$PROC_NAME" "$PROC_COUNT"
dokku_col_log_msg "${PROC_NAME}:" "$PROC_COUNT"
done <"$DOKKU_SCALE_FILE"
else
set_scale "$APP" "$@"
release_and_deploy "$APP" "$IMAGE_TAG"
if [[ "$(fn-ps-can-scale "$APP")" == "true" ]]; then
set_scale "$APP" "$@"
release_and_deploy "$APP" "$IMAGE_TAG"
else
dokku_log_fail "App contains DOKKU_SCALE file and cannot be manually scaled"
fi
fi
}
@@ -241,3 +250,17 @@ fn-ps-is-app-running() {
APP_STATUS=$(fn-ps-app-status "$APP")
echo "$APP_STATUS" | cut -d ' ' -f 2
}
fn-ps-can-scale() {
declare APP="$1"
local IMAGE_TAG=$(get_running_image_tag "$APP")
local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
local CAN_SCALE=false
[[ ! -e $DOKKU_SCALE_FILE ]] && generate_scale_file "$APP" "$IMAGE_TAG" >/dev/null 2>&1
if [[ ! -f "${DOKKU_SCALE_FILE}.extracted" ]]; then
CAN_SCALE=true
fi
echo "$CAN_SCALE"
}

View File

@@ -50,7 +50,8 @@ cmd-ps-report-single() {
if (is_deployed "$APP"); then DEPLOYED="true"; else DEPLOYED="false"; fi
local passed_phases="deploy"
RESTARTPOLICY=$(get_restart_policies "$(get_phase_file_path "$passed_phases")" || true)
local RESTARTPOLICY=$(get_restart_policies "$(get_phase_file_path "$passed_phases")" || true)
local CAN_SCALE="$(fn-ps-can-scale "$APP")"
local CONTAINER_FILES="$(find "$DOKKU_ROOT/$APP" -maxdepth 1 -name "CONTAINER.*" -printf "%f\n" 2>/dev/null | sort -t . -k 2 -n | xargs)"
local CONTAINER_FILE
@@ -70,6 +71,7 @@ cmd-ps-report-single() {
"--running: $RUNNING"
"--restore: $RESTORE"
"--restart-policy: $RESTARTPOLICY"
"--ps-can-scale: $CAN_SCALE"
)
if [[ -z "$INFO_FLAG" ]]; then

View File

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

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core repo plugin"
version = "0.15.5"
version = "0.16.4"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core resource plugin"
version = "0.15.5"
version = "0.16.4"
[plugin.config]

View File

@@ -75,11 +75,11 @@ func GetResourceValue(appName string, processType string, resourceType string, k
}
defaultValue := ""
for key, value := range resources {
if key == propertyKey("_default_", resourceType, key) {
for k, value := range resources {
if k == propertyKey("_default_", resourceType, key) {
defaultValue = value
}
if key == propertyKey(processType, resourceType, key) {
if k == propertyKey(processType, resourceType, key) {
return value, nil
}
}

View File

@@ -50,6 +50,10 @@ func main() {
continue
}
if parts[1] == "cpu" {
parts[1] = "cpus"
}
limits[parts[1]] = value
}
if parts[0] == "reserve" {

View File

@@ -14,8 +14,8 @@ func main() {
flag.Parse()
appName := flag.Arg(0)
processType := flag.Arg(1)
resourceType := flag.Arg(1)
key := flag.Arg(1)
resourceType := flag.Arg(2)
key := flag.Arg(3)
value, err := resource.GetResourceValue(appName, processType, resourceType, key)
if err != nil {

View File

@@ -121,10 +121,11 @@ func setResourceType(appName string, processType string, r Resource, resourceTyp
common.LogInfo2Quiet(message)
for key, value := range resources {
if value != "" {
common.LogVerbose(fmt.Sprintf("%v: %v", key, value))
if value == "" {
continue
}
common.LogVerbose(fmt.Sprintf("%v: %v", key, value))
property := propertyKey(processType, resourceType, key)
err := common.PropertyWrite("resource", appName, property, value)
if err != nil {
@@ -142,7 +143,9 @@ func reportResourceType(appName string, processType string, resourceType string)
}
message := fmt.Sprintf("resource %v %v information", noun, appName)
if processType != "_default_" {
if processType == "_default_" {
message = fmt.Sprintf("%v [defaults]", message)
} else {
message = fmt.Sprintf("%v (%v)", message, processType)
}
common.LogInfo2Quiet(message)

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core scheduler-docker-local plugin"
version = "0.15.5"
version = "0.16.4"
[plugin.config]

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
scheduler-docker-local-scheduler-is-deployed() {
declare desc="checks if an app is deployed"
declare DOKKU_SCHEDULER="$1" APP="$2"
if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then
return
fi
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]] || [[ $(
ls "$DOKKU_ROOT/$APP"/CONTAINER.* &>/dev/null
echo $?
) -eq 0 ]]; then
return 0
fi
return 1
}
scheduler-docker-local-scheduler-is-deployed "$@"

View File

@@ -32,8 +32,13 @@ scheduler-docker-local-scheduler-run() {
local IMAGE_SOURCE_TYPE="dockerfile"
is_image_herokuish_based "$IMAGE" && IMAGE_SOURCE_TYPE="herokuish"
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-run "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE" "$PHASE_SCRIPT_KEY")
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-run "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE")
DOCKER_ARGS+=" -e DYNO=run.$RANDOM"
declare -a ARG_ARRAY
eval "ARG_ARRAY=($DOCKER_ARGS)"
local DOKKU_RUN_OPTS=" -e DYNO=run.$RANDOM"
if [[ "$DOKKU_RM_CONTAINER" ]]; then
DOCKER_ARGS+=" --rm"
elif [[ "$DOKKU_DETACH_CONTAINER" ]]; then
@@ -52,11 +57,11 @@ scheduler-docker-local-scheduler-run() {
DOKKU_QUIET_OUTPUT=1 extract_procfile "$APP"
POTENTIAL_PROCFILE_KEY="$1"
PROC_CMD=$(get_cmd_from_procfile "$APP" "$POTENTIAL_PROCFILE_KEY" || echo '')
PROC_CMD=$(get_cmd_from_procfile "$APP" "$POTENTIAL_PROCFILE_KEY" 2>/dev/null || echo '')
remove_procfile "$APP"
if [[ -n "$PROC_CMD" ]]; then
dokku_log_info1 "Found '$POTENTIAL_PROCFILE_KEY' in Procfile, running that command"
dokku_log_info1_quiet "Found '$POTENTIAL_PROCFILE_KEY' in Procfile, running that command"
set -- "$PROC_CMD" "${@:2}"
fi

View File

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

View File

@@ -14,9 +14,14 @@ verify_ssh_key_file() {
declare desc="Test that public key is valid"
[[ -s ${DOKKU_ROOT}/.ssh/authorized_keys ]] || dokku_log_fail "No public keys found."
local key line=0
local TMP_KEY_FILE
TMP_KEY_FILE=$(mktemp "/tmp/${FUNCNAME[0]}.XXXX")
trap 'rm -rf "$TMP_KEY_FILE" >/dev/null' RETURN INT TERM EXIT
while read -r key; do
line=$((line + 1))
ssh-keygen -l -f /dev/stdin <<<"$key" &>/dev/null || dokku_log_fail "${DOKKU_ROOT}/.ssh/authorized_keys line $line failed ssh-keygen check."
echo "$key" >"$TMP_KEY_FILE"
ssh-keygen -lf "$TMP_KEY_FILE" &>/dev/null || dokku_log_fail "${DOKKU_ROOT}/.ssh/authorized_keys line $line failed ssh-keygen check."
done <"${DOKKU_ROOT}/.ssh/authorized_keys"
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core ssh-keys plugin"
version = "0.15.5"
version = "0.16.4"
[plugin.config]

View File

@@ -7,22 +7,33 @@ source "$PLUGIN_AVAILABLE_PATH/ssh-keys/functions"
add_keys() {
declare desc="add a new key via sshcommand"
local cmd="ssh-keys:add"
shift
local name="$1" key_file="$2" key_contents key_from_pipe
[[ -p /dev/stdin ]] && read -r key_from_pipe
if [[ -n "$key_from_pipe" ]]; then
ssh-keygen -lf /dev/stdin <<<"$key_from_pipe" &>/dev/null || dokku_log_fail "Key piped in is not a valid ssh public key"
key_contents="$key_from_pipe"
elif [[ -n "$key_file" ]]; then
key_contents="$(cat "$key_file")"
ssh-keygen -lf /dev/stdin <<<"$key_contents" &>/dev/null || dokku_log_fail "Key from file is not a valid ssh public key"
[[ "$1" == "$cmd" ]] && shift 1
declare NAME="$1" KEY_FILE="$2"
local TMP_KEY_FILE
TMP_KEY_FILE=$(mktemp "/tmp/${FUNCNAME[0]}.XXXX")
trap 'rm -rf "$TMP_KEY_FILE" >/dev/null' RETURN INT TERM EXIT
if [[ -n "$KEY_FILE" ]]; then
true
elif [[ -p /dev/stdin ]]; then
local key_contents
read -r key_contents
echo "$key_contents" >"$TMP_KEY_FILE"
KEY_FILE="$TMP_KEY_FILE"
else
dokku_log_fail "No key specified via file or pipe"
fi
[[ -n "$name" && -n "$key_contents" ]] || dokku_log_fail "Two arguments are required if not piping, ie: dokku ssh-keys:add <NAME> <KEY_FILE>"
local count="$(wc -l <<<"$key_contents")"
[ "$count" -eq 1 ] || dokku_log_fail 'Too many keys provided, set one per invocation of dokku ssh-keys:add <NAME> <KEY_FILE>'
if [[ ! -s "$KEY_FILE" ]]; then
dokku_log_fail "Empty key was specified"
fi
local count="$(wc -l "$KEY_FILE" | awk '{ print $1; }')"
[[ "$count" -eq 1 ]] || dokku_log_fail "Too many keys provided, set one per invocation of dokku ssh-keys:add <NAME> <KEY_FILE>"
ssh-keygen -lf "$KEY_FILE" &>/dev/null || dokku_log_fail "Key specified in is not a valid ssh public key"
create_ssh_key_file
verify_ssh_key_exists
echo "$key_contents" | sshcommand acl-add dokku "$name" || dokku_log_fail "sshcommand returned an error: $?"
sshcommand acl-add dokku "$NAME" "$KEY_FILE" || dokku_log_fail "sshcommand returned an error: $?"
verify_ssh_key_file
}

View File

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

View File

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

View File

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

16
plugins/trace/commands Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
[[ " help trace:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
source "$PLUGIN_AVAILABLE_PATH/trace/internal-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
case "$1" in
help | trace:help)
trace_help_cmd "$@"
;;
*)
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
;;
esac

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
trace_help_content_func() {
declare desc="return trace plugin help content"
cat <<help_content
trace, [DEPRECATED] Enables/Disables trace mode
trace:on, Clones an app
trace:off, Create a new app
help_content
}
trace_help_cmd() {
if [[ $1 == "trace:help" ]]; then
echo -e 'Usage: dokku trace[:COMMAND]'
echo ''
echo 'Manage trace mode'
echo ''
echo 'Additional commands:'
trace_help_content_func | sort | column -c2 -t -s,
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
trace_help_content_func
else
cat <<help_desc
trace, Manage trace mode
help_desc
fi
}

4
plugins/trace/plugin.toml Executable file
View File

@@ -0,0 +1,4 @@
[plugin]
description = "dokku core trace plugin"
version = "0.16.4"
[plugin.config]

View File

@@ -3,23 +3,25 @@ set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
dokku_trace_cmd() {
declare desc="enables/disables DOKKU_TRACE"
trace_default_cmd() {
declare desc="enables/disables trace mode"
local cmd="trace"
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p "$DOKKU_ROOT/.dokkurc"
[[ "$2" == "on" ]] || [[ "$2" == "off" ]] || {
dokku_log_fail "Valid trace options are [on/off]"
}
dokku_log_warn "Deprecated: Please use trace:on or trace:off"
if [[ "$2" == "on" ]]; then
echo "Enabling dokku trace"
dokku_log_info1 "Enabling trace mode"
echo "export DOKKU_TRACE=1" >"$DOKKU_ROOT/.dokkurc/DOKKU_TRACE"
fi
if [[ "$2" == "off" ]]; then
echo "Disabling dokku trace"
dokku_log_info1 "Disabling trace mode"
rm -f "$DOKKU_ROOT/.dokkurc/DOKKU_TRACE"
fi
}
dokku_trace_cmd "$@"
trace_default_cmd "$@"

15
plugins/trace/subcommands/off Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
trace_off_cmd() {
declare desc="disables trace mode"
local cmd="trace"
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p "$DOKKU_ROOT/.dokkurc"
dokku_log_info1 "Disabling trace mode"
rm -f "$DOKKU_ROOT/.dokkurc/DOKKU_TRACE"
}
trace_off_cmd "$@"

15
plugins/trace/subcommands/on Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
trace_on_cmd() {
declare desc="enables trace mode"
local cmd="trace"
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p "$DOKKU_ROOT/.dokkurc"
dokku_log_info1 "Enabling trace mode"
echo "export DOKKU_TRACE=1" >"$DOKKU_ROOT/.dokkurc/DOKKU_TRACE"
}
trace_on_cmd "$@"

View File

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

View File

@@ -0,0 +1 @@
web=1

View File

@@ -0,0 +1,11 @@
FROM node:4
EXPOSE 3001/udp
EXPOSE 3000/tcp
EXPOSE 3003
COPY . /app
WORKDIR /app
RUN npm install
CMD npm start

View File

@@ -0,0 +1,8 @@
###############################
# DEVELOPMENT #
###############################
# Procfile for development using the new threaded worker (scheduler, twitter stream and delayed job)
cron: node worker.js
web: node web.js
worker: node worker.js

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
output="$(curl -s -S "$1")"
echo "$output"
test "$output" == "nodejs/express"

View File

@@ -0,0 +1,13 @@
{
"name": "node-example",
"version": "0.0.1",
"dependencies": {
"express": "2.5.x"
},
"engines": {
"node": "4.2.x"
},
"scripts": {
"start": "false"
}
}

View File

@@ -0,0 +1,12 @@
var express = require('express');
var app = express.createServer(express.logger());
app.get('/', function(request, response) {
response.send('nodejs/express');
});
var port = process.env.PORT || 5000;
app.listen(port, function() {
console.log("Listening on " + port);
});

View File

@@ -0,0 +1,6 @@
function worker() {
console.log('sleeping for 60 seconds');
setTimeout(worker, 60 * 1000);
}
worker();

View File

@@ -134,6 +134,35 @@ teardown() {
assert_success
}
@test "(ps:scale) dockerfile dokku-scale" {
run /bin/bash -c "dokku ps:scale $TEST_APP web=2"
echo "output: $output"
echo "status: $status"
assert_success
deploy_app dockerfile-dokku-scale
CIDS=""
for CID_FILE in $DOKKU_ROOT/$TEST_APP/CONTAINER.web.*; do
CIDS+=$(< $CID_FILE)
CIDS+=" "
done
CIDS_PATTERN=$(echo $CIDS | sed -e "s: :|:g")
run /bin/bash -c "docker ps -q --no-trunc | egrep \"$CIDS_PATTERN\" | wc -l | grep 1"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku ps:scale $TEST_APP web=1"
echo "output: $output"
echo "status: $status"
assert_failure
run /bin/bash -c "dokku ps:report $TEST_APP --ps-can-scale"
echo "output: $output"
echo "status: $status"
assert_output "false"
}
@test "(ps) dockerfile with procfile" {
deploy_app dockerfile-procfile
run /bin/bash -c "dokku ps:stop $TEST_APP"

View File

@@ -234,6 +234,24 @@ teardown() {
assert_success
}
@test "(domains) domains:clear-global" {
run /bin/bash -c "dokku domains:add-global global.dokku.invalid"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku domains:add-global global.dokku.me"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku domains:clear-global"
echo "output: $output"
echo "status: $status"
refute_line "global.dokku.invalid"
refute_line "global.dokku.me"
}
@test "(domains) domains:remove-global" {
run /bin/bash -c "dokku domains:add-global global.dokku.me"
echo "output: $output"
@@ -284,3 +302,22 @@ teardown() {
assert_line ${TEST_APP}.global3.dokku.me
assert_line ${TEST_APP}.global4.dokku.me
}
@test "(domains) app name overlaps with global domain.tld" {
run /bin/bash -c "dokku domains:set-global dokku.test"
echo "output: $output"
echo "status: $status"
assert_success
# run domains:clear in order to invoke default vhost creation
dokku --quiet apps:create test.dokku.test
dokku --quiet domains:clear test.dokku.test
run /bin/bash -c "dokku domains:report test.dokku.test --domains-app-vhosts"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "test.dokku.test"
dokku --force apps:destroy test.dokku.test
}

View File

@@ -116,12 +116,21 @@ teardown() {
echo "status: $status"
assert_success
run /bin/bash -c "dokku resource:reserve --cpu 0.5 --process-type worker $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
dokku ps:rebuild "$TEST_APP"
CID=$(< $DOKKU_ROOT/$TEST_APP/CONTAINER.web.1)
run /bin/bash -c "docker inspect --format '{{.HostConfig.MemoryReservation}}' $CID"
echo "output: $output"
echo "status: $status"
assert_output "536870912"
# run /bin/bash -c "docker inspect --format '{{.HostConfig.NanoCpus}}' $CID"
# echo "output: $output"
# echo "status: $status"
# assert_output "500000000"
run /bin/bash -c "dokku resource:reserve-clear --process-type worker $TEST_APP"
echo "output: $output"