Compare commits
81 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba3af25423 | ||
|
|
a084c62e3f | ||
|
|
287f383f6c | ||
|
|
aefb24082d | ||
|
|
dee0144c7c | ||
|
|
6ca4813247 | ||
|
|
a717cb99a3 | ||
|
|
8551dfb297 | ||
|
|
6a5bbd63a3 | ||
|
|
ca0b2937b9 | ||
|
|
948d507909 | ||
|
|
037324d850 | ||
|
|
6006303409 | ||
|
|
d1b1841034 | ||
|
|
bc70a24e1d | ||
|
|
acc2e84eda | ||
|
|
4f23dd2dd6 | ||
|
|
3a5f68e4d1 | ||
|
|
d30a948be0 | ||
|
|
c44db3f2cf | ||
|
|
1272287d62 | ||
|
|
f4b96cc688 | ||
|
|
65fb016bc3 | ||
|
|
2eccb95477 | ||
|
|
b9152ee77e | ||
|
|
99ec1c0606 | ||
|
|
5373cf2989 | ||
|
|
b85b4c6e99 | ||
|
|
7be4a3ee48 | ||
|
|
2f83b29f1a | ||
|
|
7709a3a2ec | ||
|
|
06d0b07f36 | ||
|
|
0275c65b8a | ||
|
|
1617796bc6 | ||
|
|
6869fda75b | ||
|
|
06017d17ae | ||
|
|
9fc26aeb41 | ||
|
|
d356cef183 | ||
|
|
c49d849917 | ||
|
|
b36a2a9154 | ||
|
|
252092c73a | ||
|
|
f6cc77bc3a | ||
|
|
cb16cae09b | ||
|
|
bb494b69ea | ||
|
|
f13a660698 | ||
|
|
ce1ca5cc17 | ||
|
|
e700ad32a3 | ||
|
|
0fd829ed3b | ||
|
|
f9a59180f2 | ||
|
|
04c9fe974e | ||
|
|
4b63c96434 | ||
|
|
ef55ce8919 | ||
|
|
0ba6e26788 | ||
|
|
1b481d214c | ||
|
|
d33ea360ac | ||
|
|
8e07d70070 | ||
|
|
06b4585a62 | ||
|
|
dbc5182193 | ||
|
|
46c023e73d | ||
|
|
f39d0fc0cf | ||
|
|
277429db5a | ||
|
|
9a447c16f2 | ||
|
|
c4c7d0d82d | ||
|
|
e5c76d3795 | ||
|
|
662c8c2831 | ||
|
|
3ec67073ce | ||
|
|
322dd2246f | ||
|
|
13e3950f4a | ||
|
|
d03d5bc40c | ||
|
|
5038050968 | ||
|
|
97fe3f56b7 | ||
|
|
887c0ebdd6 | ||
|
|
99869c520f | ||
|
|
65e82bcea1 | ||
|
|
bf8b67b35d | ||
|
|
8a56740a7c | ||
|
|
3a7bac6218 | ||
|
|
5b9e8ddb7d | ||
|
|
97649e86dd | ||
|
|
f8e3518aa6 | ||
|
|
ef5f7fe03e |
@@ -9,3 +9,5 @@ tests
|
||||
!contrib/dokku-installer.py
|
||||
!contrib/dokku-update
|
||||
!contrib/bash-completion
|
||||
!contrib/docker
|
||||
vendor
|
||||
|
||||
140
HISTORY.md
140
HISTORY.md
@@ -1,5 +1,145 @@
|
||||
# History
|
||||
|
||||
## 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:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.15.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.15.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3511: @josegonzalez Add json output to config:export
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3510: @josegonzalez Remove SPONSORS doc in favor of OpenCollective
|
||||
- #3509: @Neamar Missing space in markdown formatting
|
||||
- #3507: @renestalder Fix GitLab CI examples
|
||||
|
||||
## 0.15.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.15.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.15.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3499: @josegonzalez Ensure the .buildpacks file exists before writing to it
|
||||
- #3500: @josegonzalez Always allow ps:scale proc=0
|
||||
- #3497: @josegonzalez Allow reporting domains when there are none specified
|
||||
|
||||
### New Features
|
||||
|
||||
- #3502: @josegonzalez Add a trigger to fetch the git revision
|
||||
- #3501: @josegonzalez Move log retrieval to docker-local scheduler
|
||||
- #3498: @josegonzalez Add ability to report domains globally
|
||||
- #3496: @josegonzalez Cleanup glide plugins when running src-clean
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3504: @vanastassiou Edits for readability and conciseness
|
||||
- #3490: @josegonzalez Add missing link to resource management docs
|
||||
|
||||
## 0.15.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.15.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.15.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3489: @josegonzalez feat: upgrade herokuish to 0.5.0 (Ubuntu 18.04)
|
||||
|
||||
## 0.15.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
@@ -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.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.15.2 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.16.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#Sponsors
|
||||
|
||||
[Deis](http://deis.io)
|
||||
|
||||
[DigitalOcean](https://www.digitalocean.com/)
|
||||
|
||||
[Melvin Lammerts](http://dokku.net)
|
||||
@@ -10,7 +10,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.15.2'
|
||||
VERSION = 'v0.16.3'
|
||||
|
||||
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
deb.mk
2
deb.mk
@@ -2,7 +2,7 @@ BUILD_DIRECTORY ?= /tmp
|
||||
|
||||
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
|
||||
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
|
||||
HEROKUISH_VERSION ?= 0.4.9
|
||||
HEROKUISH_VERSION ?= 0.5.0
|
||||
HEROKUISH_ARCHITECTURE = amd64
|
||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
||||
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -1,5 +1,5 @@
|
||||
Package: dokku
|
||||
Version: 0.15.2
|
||||
Version: 0.16.3
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
|
||||
@@ -31,31 +31,31 @@ dokku plugin
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.15.2 enabled dokku core standard plugin
|
||||
20_events 0.15.2 enabled dokku core events logging plugin
|
||||
apps 0.15.2 enabled dokku core apps plugin
|
||||
build-env 0.15.2 enabled dokku core build-env plugin
|
||||
certs 0.15.2 enabled dokku core certificate management plugin
|
||||
checks 0.15.2 enabled dokku core checks plugin
|
||||
common 0.15.2 enabled dokku core common plugin
|
||||
config 0.15.2 enabled dokku core config plugin
|
||||
docker-options 0.15.2 enabled dokku core docker-options plugin
|
||||
domains 0.15.2 enabled dokku core domains plugin
|
||||
enter 0.15.2 enabled dokku core enter plugin
|
||||
git 0.15.2 enabled dokku core git plugin
|
||||
logs 0.15.2 enabled dokku core logs plugin
|
||||
named-containers 0.15.2 enabled dokku core named containers plugin
|
||||
network 0.15.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.15.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.15.2 enabled dokku core plugin plugin
|
||||
proxy 0.15.2 enabled dokku core proxy plugin
|
||||
ps 0.15.2 enabled dokku core ps plugin
|
||||
repo 0.15.2 enabled dokku core repo plugin
|
||||
shell 0.15.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.15.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.15.2 enabled dokku core storage plugin
|
||||
tags 0.15.2 enabled dokku core tags plugin
|
||||
tar 0.15.2 enabled dokku core tar plugin
|
||||
00_dokku-standard 0.16.3 enabled dokku core standard plugin
|
||||
20_events 0.16.3 enabled dokku core events logging plugin
|
||||
apps 0.16.3 enabled dokku core apps plugin
|
||||
build-env 0.16.3 enabled dokku core build-env plugin
|
||||
certs 0.16.3 enabled dokku core certificate management plugin
|
||||
checks 0.16.3 enabled dokku core checks plugin
|
||||
common 0.16.3 enabled dokku core common plugin
|
||||
config 0.16.3 enabled dokku core config plugin
|
||||
docker-options 0.16.3 enabled dokku core docker-options plugin
|
||||
domains 0.16.3 enabled dokku core domains plugin
|
||||
enter 0.16.3 enabled dokku core enter plugin
|
||||
git 0.16.3 enabled dokku core git plugin
|
||||
logs 0.16.3 enabled dokku core logs plugin
|
||||
named-containers 0.16.3 enabled dokku core named containers plugin
|
||||
network 0.16.3 enabled dokku core network plugin
|
||||
nginx-vhosts 0.16.3 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.16.3 enabled dokku core plugin plugin
|
||||
proxy 0.16.3 enabled dokku core proxy plugin
|
||||
ps 0.16.3 enabled dokku core ps plugin
|
||||
repo 0.16.3 enabled dokku core repo plugin
|
||||
shell 0.16.3 enabled dokku core shell plugin
|
||||
ssh-keys 0.16.3 enabled dokku core ssh-keys plugin
|
||||
storage 0.16.3 enabled dokku core storage plugin
|
||||
tags 0.16.3 enabled dokku core tags plugin
|
||||
tar 0.16.3 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.
|
||||
|
||||
@@ -43,12 +43,17 @@ This plugin implements various functionality through `plugn` triggers to integra
|
||||
|
||||
- `check-deploy`
|
||||
- `core-post-deploy`
|
||||
- `post-app-clone-setup`
|
||||
- `post-create`
|
||||
- `post-delete`
|
||||
- `pre-deploy`
|
||||
- `pre-restore`
|
||||
- `scheduler-deploy`
|
||||
- `scheduler-docker-cleanup`
|
||||
- `scheduler-inspect`
|
||||
- `scheduler-logs-failed`
|
||||
- `scheduler-logs`
|
||||
- `scheduler-retire`
|
||||
- `scheduler-run`
|
||||
- `scheduler-stop`
|
||||
- `scheduler-tags-create`
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.15.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.16.3\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.16.3\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.16.3\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.16.3\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.16.3\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.16.3\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -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.2/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.2/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"0.12.13",
|
||||
"0.13.4",
|
||||
"0.14.6",
|
||||
"0.15.2"
|
||||
"0.15.5",
|
||||
"0.16.3"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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+ |
|
||||
|
||||
@@ -65,7 +65,7 @@ review_app:
|
||||
image: ilyasemenov/gitlab-ci-git-push
|
||||
stage: deploy
|
||||
environment:
|
||||
name: review/$CI_ENVIRONMENT_SLUG
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
url: https://$CI_ENVIRONMENT_SLUG.dokku.me/
|
||||
on_stop: stop_review_app
|
||||
only:
|
||||
@@ -87,8 +87,10 @@ The above only runs for non-master branches, and will _also_ trigger an `on_stop
|
||||
stop_review_app:
|
||||
image: ilyasemenov/gitlab-ci-git-push
|
||||
stage: deploy
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
environment:
|
||||
name: review/$CI_ENVIRONMENT_SLUG
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
action: stop
|
||||
when: manual
|
||||
script:
|
||||
|
||||
@@ -6,11 +6,12 @@
|
||||
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
|
||||
domains:remove-global <domain> [<domain> ...] # Remove global domain names
|
||||
domains:report [<app>] [<flag>] # Displays a domains report for one or more apps
|
||||
domains:report [<app>|--global] [<flag>] # Displays a domains report for one or more apps
|
||||
domains:set <app> <domain> [<domain> ...] # Set domains for app
|
||||
domains:set-global <domain> [<domain> ...] # Set global domain names
|
||||
```
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
# Deploying to Dokku
|
||||
|
||||
> Note: This document uses the hostname `dokku.me` in commands. For your server, please
|
||||
> substitute your server's hostname instead.
|
||||
> Note: This walkthrough uses the hostname `dokku.me` in commands. When deploying to your own server, you should set the `DOKKU_DOMAIN` value in the `Vagrantfile` before you initialize the Vagrant VM.
|
||||
|
||||
## Deploy tutorial
|
||||
|
||||
Once Dokku has been configured with at least one user, applications can be deployed via a `git push` command. To quickly see Dokku deployment in action, you can use the Heroku Ruby on Rails example app.
|
||||
Once you have configured Dokku with at least one user, you can deploy applications using `git push`. To quickly see Dokku deployment in action, try using [the Heroku Ruby on Rails "Getting Started" app](https://github.com/heroku/ruby-getting-started).
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
# SSH access to github must be enabled on this host
|
||||
git clone git@github.com:heroku/ruby-rails-sample.git
|
||||
git clone git@github.com:heroku/ruby-getting-started.git
|
||||
```
|
||||
|
||||
### Create the app
|
||||
|
||||
Create the application on the Dokku host. You will need to SSH onto the host to run this command.
|
||||
SSH into the Dokku host and create the application as follows:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
dokku apps:create ruby-rails-sample
|
||||
dokku apps:create ruby-getting-started
|
||||
```
|
||||
|
||||
### Create the backing services
|
||||
|
||||
When you create a new app, Dokku by default *does not* provide any datastores such as MySQL or PostgreSQL. You will need to install plugins to handle that, but fortunately [Dokku has official plugins](/docs/community/plugins.md#official-plugins-beta) for common datastores. Our sample app requires a PostgreSQL service:
|
||||
Dokku by default **does not** provide datastores (e.g. MySQL, PostgreSQL) on a newly created app. You can add datastore support by installing plugins, and the Dokku project [provides official plugins](/docs/community/plugins.md#official-plugins-beta) for common datastores.
|
||||
|
||||
The Getting Started app requires a PostgreSQL service, so install the plugin and create the related service as follows:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
@@ -36,42 +37,41 @@ sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
||||
dokku postgres:create railsdatabase
|
||||
```
|
||||
|
||||
> Each service may take a few moments to create.
|
||||
Each service may take a few moments to create.
|
||||
|
||||
### Linking backing services to applications
|
||||
|
||||
Once the service creation is complete, set the `DATABASE_URL` environment variable by linking the service.
|
||||
Once the services have been created, you then set the `DATABASE_URL` environment variable by linking the service, as follows:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
# each official datastore offers a `link` method to link a service to any application
|
||||
dokku postgres:link railsdatabase ruby-rails-sample
|
||||
dokku postgres:link railsdatabase ruby-getting-started
|
||||
```
|
||||
|
||||
> You can link a single service to multiple applications or use one service per application.
|
||||
Dokku supports linking a single service to multiple applications as well as linking only one service per application.
|
||||
|
||||
### Deploy the app
|
||||
|
||||
> Warning: Your application *should* respect the `PORT` environment variable or it may not respond to web requests.
|
||||
> Please see the [port management documentation](/docs/networking/port-management.md) for details.
|
||||
> Warning: Your app should respect the `PORT` environment variable, otherwise it may not respond to web requests. You can find more information in the [port management documentation](/docs/networking/port-management.md).**
|
||||
|
||||
Now you can deploy the `ruby-rails-sample` app to your Dokku server. All you have to do is add a remote to name the app. Applications are created on-the-fly on the Dokku server.
|
||||
Now you can deploy the `ruby-getting-started` app to your Dokku server. All you have to do is add a remote to name the app. Applications are created on-the-fly on the Dokku server.
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
# the remote username *must* be dokku or pushes will fail
|
||||
cd ruby-rails-sample
|
||||
git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
cd ruby-getting-started
|
||||
git remote add dokku dokku@dokku.me:ruby-getting-started
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
> Note: Some tools may not support the short-upstream syntax referenced above, and you may need to prefix
|
||||
> the upstream with the scheme `ssh://` like so: `ssh://dokku@dokku.me:ruby-rails-sample`
|
||||
> the upstream with the scheme `ssh://` like so: `ssh://dokku@dokku.me:ruby-getting-started`
|
||||
> Please see the [Git](https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a) documentation for more details.
|
||||
|
||||
> Note: Your private key should be registered with ssh-agent in local development. If you get a
|
||||
> permission denied error when pushing you can register your private key by running
|
||||
> `ssh-add -k ~/<your private key>`.
|
||||
> Note: Your private key should be registered with `ssh-agent` in your local development environment. If you get a `permission denied` error when pushing, you can register your private key as follows: `ssh-add -k ~/<your private key>`.
|
||||
|
||||
After running `git push dokku master`, you should have output similar to this in your terminal:
|
||||
|
||||
```
|
||||
Counting objects: 231, done.
|
||||
@@ -80,7 +80,7 @@ Compressing objects: 100% (162/162), done.
|
||||
Writing objects: 100% (231/231), 36.96 KiB | 0 bytes/s, done.
|
||||
Total 231 (delta 93), reused 147 (delta 53)
|
||||
-----> Cleaning up...
|
||||
-----> Building ruby-rails-sample from herokuish...
|
||||
-----> Building ruby-getting-started from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
-----> Ruby app detected
|
||||
-----> Compiling Ruby/Rails
|
||||
@@ -95,12 +95,12 @@ Total 231 (delta 93), reused 147 (delta 53)
|
||||
...
|
||||
|
||||
=====> Application deployed:
|
||||
http://ruby-rails-sample.dokku.me
|
||||
http://ruby-getting-started.dokku.me
|
||||
```
|
||||
|
||||
When the deploy finishes, the application's URL will be shown as seen above.
|
||||
Once the deploy is complete, the application's web URL will be generated as above.
|
||||
|
||||
Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) with [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks) or using a project's [Dockerfile](https://docs.docker.com/reference/builder/).
|
||||
Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) with [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks), as well as by using a project's [Dockerfile](https://docs.docker.com/reference/builder/).
|
||||
|
||||
|
||||
### Skipping deployment
|
||||
@@ -109,23 +109,23 @@ If you only want to rebuild and tag a container, you can skip the deployment pha
|
||||
|
||||
``` shell
|
||||
# on the Dokku host
|
||||
dokku config:set ruby-rails-sample DOKKU_SKIP_DEPLOY=true
|
||||
dokku config:set ruby-getting-started DOKKU_SKIP_DEPLOY=true
|
||||
```
|
||||
|
||||
### Redeploying or restarting
|
||||
|
||||
If you need to redeploy (or restart) your app:
|
||||
If you need to redeploy or restart your app:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
dokku ps:rebuild ruby-rails-sample
|
||||
dokku ps:rebuild ruby-getting-started
|
||||
```
|
||||
|
||||
See the [process scaling documentation](/docs/deployment/process-management.md) for more information.
|
||||
|
||||
### Deploying with private git submodules
|
||||
### Deploying with private Git submodules
|
||||
|
||||
Dokku uses Git locally (i.e. not a Docker image) to build its own copy of your app repo, including submodules. This is done as the `dokku` user. Therefore, in order to deploy private Git submodules, you'll need to drop your deploy key in `/home/dokku/.ssh/` and potentially add `github.com` (or your VCS host key) into `/home/dokku/.ssh/known_hosts`. The following test should help confirm you've done it correctly.
|
||||
Dokku uses Git locally (i.e. not a Docker image) to build its own copy of your app repo, including submodules, as the `dokku` user. This means that in order to deploy private Git submodules, you need to put your deploy key in `/home/dokku/.ssh/` and potentially add `github.com` (or your VCS host key) into `/home/dokku/.ssh/known_hosts`. You can use the following test to confirm your setup is correct:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
@@ -134,25 +134,25 @@ ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
||||
ssh -T git@github.com
|
||||
```
|
||||
|
||||
Note that if the buildpack or Dockerfile build process require SSH key access for other reasons, the above may not always apply.
|
||||
> Warning: if the buildpack or Dockerfile build process require SSH key access for other reasons, the above may not always apply.
|
||||
|
||||
## Deploying to subdomains
|
||||
|
||||
The name of remote repository is used as the name of application to be deployed, as for example above:
|
||||
If you do not enter a fully qualified domain name when pushing your app, Dokku deploys the app to `<remotename>.yourdomain.tld` as follows:
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
# the remote username *must* be dokku or pushes will fail
|
||||
git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
git remote add dokku dokku@dokku.me:ruby-getting-started
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
```
|
||||
remote: -----> Application deployed:
|
||||
remote: http://ruby-rails-sample.dokku.me
|
||||
remote: http://ruby-getting-started.dokku.me
|
||||
```
|
||||
|
||||
You can also specify fully qualified names, say `app.dokku.me`, as
|
||||
You can also specify the fully qualified name as follows:
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
@@ -166,7 +166,7 @@ remote: -----> Application deployed:
|
||||
remote: http://app.dokku.me
|
||||
```
|
||||
|
||||
This is in particular useful, then you want to deploy to root domain, as
|
||||
This is useful when you want to deploy to the root domain:
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
@@ -182,9 +182,9 @@ git push dokku master
|
||||
|
||||
## 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.
|
||||
|
||||
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.
|
||||
Prior to every deployment, Dokku will execute a cleanup function. As of 0.5.x, the cleanup removes all containers with the `dokku` label where the status is either `dead` or `exited` (previous versions would remove _all_ `dead` or `exited` containers). The cleanup function also removes all images with `dangling` status.
|
||||
|
||||
## Adding deploy users
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
# Plugin Creation
|
||||
# Plugin creation
|
||||
|
||||
Plugins can simply be implementations of [triggers](/docs/development/plugin-triggers.md) or they may implement a command structure of their own. Dokku has no restrictions on the language in which a plugin is implemented, it only cares that the plugin implements the appropriate [commands](/docs/development/plugin-creation.md#command-api) or [triggers](/docs/development/plugin-triggers.md) API. NOTE: all files that implement the triggers or commands API must be executable.
|
||||
A plugin can be a simple implementation of [triggers](/docs/development/plugin-triggers.md) or can implement a command structure of its own. Dokku has no restrictions on the language in which a plugin is implemented; it only cares that the plugin implements the appropriate [commands](/docs/development/plugin-creation.md#command-api) or [triggers](/docs/development/plugin-triggers.md) for the API. **NOTE:** any file that implements triggers or uses the command API must be executable.
|
||||
|
||||
If you create your own plugin:
|
||||
|
||||
1. Take a look at the plugins shipped with Dokku and hack away!
|
||||
2. Check out the [list of triggers](/docs/development/plugin-triggers.md) your plugin can implement.
|
||||
3. Upload your plugin to github with a repository name in form of `dokku-<name>` (e.g. `dokku-mariadb`)
|
||||
4. Edit [this page](/docs/community/plugins.md) and add a link to it.
|
||||
1. Take a look at [the plugins shipped with Dokku](/docs/community/plugins.md) and hack away!
|
||||
2. Check out the [list of triggers](/docs/development/plugin-triggers.md) your plugin can implement
|
||||
3. Upload your plugin to GitHub with a repository name following the `dokku-<name>` convention (e.g. `dokku-mariadb`)
|
||||
4. Edit [this page](/docs/community/plugins.md) and add a link to your plugin
|
||||
5. Subscribe to the [dokku development blog](http://progrium.com) to be notified about API changes and releases
|
||||
|
||||
|
||||
### Compilable Plugins (i.e. golang, java(?), c, etc.)
|
||||
The plugin developer is required to implement the `install` trigger such that it will output your built executable(s) in the correct directory structure to implement the plugin's desired command and/or trigger API. See [smoke-test-plugin](https://github.com/dokku/smoke-test-plugin) for an example.
|
||||
## Compilable plugins (Golang, Java(?), C, etc.)
|
||||
When developing a plugin, you must implement the `install` trigger such that it outputs the built executable(s) using a directory structure that implements the plugin's desired command and/or triggers the API. See the [smoke-test-plugin](https://github.com/dokku/smoke-test-plugin) for an example.
|
||||
|
||||
|
||||
### Command API
|
||||
There are 3 main implementation points: `commands`, `subcommands/default`, and `subcommands/<command-name>`
|
||||
## Command API
|
||||
There are 3 main integration points: `commands`, `subcommands/default`, and `subcommands/<command-name>`.
|
||||
|
||||
#### commands
|
||||
Primarily used to supply the plugin's usage/help output. (i.e. [plugin help](https://github.com/dokku/dokku/tree/master/plugins/plugin/commands))
|
||||
### `commands`
|
||||
Primarily used to supply the plugin's usage/help output. (i.e. [plugin help](https://github.com/dokku/dokku/tree/master/plugins/plugin/commands)).
|
||||
|
||||
#### subcommands/default
|
||||
Implements the plugin's default command behavior. (i.e. [`dokku plugin`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/default))
|
||||
### `subcommands/default`
|
||||
Implements the plugin's default command behavior. (i.e. [`dokku plugin`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/default)).
|
||||
|
||||
#### subcommands/<command-name>
|
||||
Implements the additional command interface and will translate to `dokku plugin:cmd` on the command line. (i.e. [`dokku plugin:install`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/install))
|
||||
### `subcommands/<command-name>`
|
||||
Implements the additional command interface and will translate to `dokku plugin:cmd` on the command line. (i.e. [`dokku plugin:install`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/install)).
|
||||
|
||||
|
||||
### Sample plugin
|
||||
# Sample plugin
|
||||
The below plugin is a dummy `dokku hello` plugin.
|
||||
|
||||
hello/subcommands/default
|
||||
`hello/subcommands/default`
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
@@ -59,7 +59,7 @@ hello_main_cmd() {
|
||||
hello_main_cmd "$@"
|
||||
```
|
||||
|
||||
hello/subcommands/world
|
||||
`hello/subcommands/world`
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
@@ -87,7 +87,7 @@ hello_world_cmd() {
|
||||
hello_world_cmd "$@"
|
||||
```
|
||||
|
||||
hello/commands
|
||||
`hello/commands`
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
@@ -136,15 +136,15 @@ version = "0.1.0"
|
||||
[plugin.config]
|
||||
```
|
||||
|
||||
A few notes:
|
||||
# A few notes:
|
||||
|
||||
- Don't forget to `chmod +x` your executable files.
|
||||
- You should always support `DOKKU_TRACE` as specified on the 2nd line of the plugin.
|
||||
- If your command requires that an application exists, ensure you check for it's existence in the manner prescribed above.
|
||||
- A `help` command is required, though it is allowed to be empty. Also, the command syntax will need to separated by `, ` in order to maintain columnar output alignment.
|
||||
- Commands *should* be namespaced.
|
||||
- As of 0.3.3, a catch-all should be implemented which exits with a `DOKKU_NOT_IMPLEMENTED_EXIT` code. This allows Dokku to output a `command not found` message.
|
||||
- Be sure you want the "set -eo pipefail" option. Look at the following example :
|
||||
- Remember to `chmod +x` your executable files
|
||||
- Always support `DOKKU_TRACE` as per the 2nd line of the above example
|
||||
- If your command depends on an application, include a check for whether that application exists (see the above example)
|
||||
- You must implement a `help` command, though you may leave it empty. Also, you must use commas (`,`) in the command syntax to support output in columns
|
||||
- Commands **should** be namespaced
|
||||
- As of 0.3.3, a catch-all should be implemented that exits with a `DOKKU_NOT_IMPLEMENTED_EXIT` code. This allows Dokku to output a `command not found` message.
|
||||
- Consider whether you want to include the `set -eo pipefail` option. Look at the following example :
|
||||
|
||||
```shell
|
||||
IMAGE=$(docker images | grep "user/repo" | awk '{print $3}')
|
||||
@@ -153,10 +153,9 @@ A few notes:
|
||||
fi
|
||||
```
|
||||
|
||||
In the case where the "user/repo" is not installed, Dokku exits just before the awk command,
|
||||
you will never see the message printed with echo. You just want "set -e" in this case.
|
||||
If `user/repo` doesn't exist, Dokku exits just before the `awk` command and the `dokku_log_fail` message will never go to `STDOUT`. printed with echo. You would want to use `set -e` in this case.
|
||||
|
||||
Here is the documentation of the 'set -eo pipefail' option:
|
||||
Here is the `help` entry for `set`:
|
||||
```
|
||||
help set
|
||||
Options:
|
||||
@@ -166,13 +165,19 @@ A few notes:
|
||||
the last command to exit with a non-zero status,
|
||||
or zero if no command exited with a non-zero status
|
||||
```
|
||||
- As some plugins require access to set app config settings and do not want/require the default Heroku-style behavior of a restart, we have the following "internal" commands that provide this functionality :
|
||||
- In the case that your plugin needs to set application configuration settings and you want to avoid having to restart (default Heroku-style behavior) these "internal" commands provide this functionality:
|
||||
|
||||
```shell
|
||||
dokku config:set --no-restart node-js-app KEY1=VALUE1 [KEY2=VALUE2 ...]
|
||||
dokku config:unset --no-restart node-js-app KEY1 [KEY2 ...]
|
||||
```
|
||||
- From time to time you may want to allow other plugins access to (some of) your plugin's functionality. You can expose this by including a `functions` file in your plugin for others to source. Consider all functions in that file to be publicly accessible by other plugins. Any functions not wished to be made "public" should reside within your plugin trigger or commands files.
|
||||
- As of 0.4.0, we allow image tagging and deployment of said tagged images. Therefore, hard-coding of `$IMAGE` as `dokku/$APP` is no longer sufficient. Instead, for non `pre/post-build-*` plugins, use `get_running_image_tag()` & `get_app_image_name()` as sourced from common/functions. See the [plugin triggers](/docs/development/plugin-triggers.md) doc for examples.
|
||||
- As of 0.5.0, we use container labels to help cleanup intermediate containers with `dokku cleanup`. If manually calling `docker run`, include `$DOKKU_GLOBAL_RUN_ARGS`. This will ensure you intermediate containers labeled correctly.
|
||||
- As of 0.6.0, we advise you to *not* call the `dokku` binary directly from within plugins. Clients using the `--app` argument are potentially broken, amongst other issues, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call Dokku internal functions
|
||||
- If you want to allow other plugins access to (some of) your plugin's functionality, you can expose this by including a `functions` file in your plugin for others to source
|
||||
- You should consider all functions in that file to be publicly accessible by other plugins
|
||||
- Any functions you want to keep private should reside in your plugin's `trigger/` or `commands/` directories
|
||||
- As of 0.4.0, Dokku allows image tagging and deployment of tagged images
|
||||
- This means hard-coding the `$IMAGE` as `dokku/$APP` is no longer sufficient
|
||||
- You should now use `get_running_image_tag()` and `get_app_image_name()` as sourced from `common/functions` (see the [plugin triggers](/docs/development/plugin-triggers.md) doc for examples). **Note:** This is only for plugins that are not `pre/post-build-*` plugins
|
||||
- As of 0.5.0, we use container labels to help cleanup intermediate containers with `dokku cleanup
|
||||
- This means that if you manually call `docker run`, you should include `$DOKKU_GLOBAL_RUN_ARGS` to ensure your intermediate containers are labeled correctly
|
||||
- As of 0.6.0, you should not **not** call the `dokku` binary directly from within plugins because clients using the `--app` argument are potentially broken when doing so (as well as other issues)
|
||||
- You should instead source the `functions` file for a given plugin when attempting to call Dokku internal functions
|
||||
|
||||
@@ -381,6 +381,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
since it does not get called for commands that use `git-upload-archive` such
|
||||
as `git archive`. Instead, use the [`user-auth`](#user-auth) trigger.
|
||||
|
||||
### `git-revision`
|
||||
|
||||
- Description: Allows you to fetch the current git revision for a given application
|
||||
- Invoked by:
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `install`
|
||||
|
||||
- Description: Used to setup any files/configuration for a plugin.
|
||||
@@ -571,6 +586,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`
|
||||
@@ -1305,6 +1322,43 @@ 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
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when retrieving container logs
|
||||
- Invoked by: `dokku logs:failed`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $PROCESS_TYPE $TAIL $PRETTY_PRINT $NUM`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; PROCESS_TYPE="$3"; TAIL="$4"; PRETTY_PRINT="$5"; NUM="$6"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-logs-failed`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
@@ -1319,7 +1373,26 @@ DOKKU_SCHEDULER="$1"; APP="$2";
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; ARGS="${@:3}";
|
||||
DOKKU_SCHEDULER="$1"; APP="$2";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-retire`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when containers should be force retired from the system
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$DOKKU_SCHEDULER`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
@@ -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.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.16.3-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'
|
||||
|
||||
@@ -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.2/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.15.2 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.3/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.16.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -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.2/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.2/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.2/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.2/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.2/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.2/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.2/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.2/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.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/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.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.3/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.2/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.2/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.16.3/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.15.2 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.16.3 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
|
||||
@@ -14,6 +14,8 @@ In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into
|
||||
|
||||
## 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
|
||||
|
||||
@@ -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.2/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.2/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.2/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.2/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.2/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.2/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.2/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.2/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.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/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.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.3/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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.2/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.16.3/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>
|
||||
@@ -157,6 +157,7 @@
|
||||
<a href="/{{NAME}}/advanced-usage/persistent-storage/" class="list-group-item">Persistent Storage</a>
|
||||
<a href="/{{NAME}}/advanced-usage/plugin-management/" class="list-group-item">Plugin Management</a>
|
||||
<a href="/{{NAME}}/advanced-usage/repository-management/" class="list-group-item">Repository Management</a>
|
||||
<a href="/{{NAME}}/advanced-usage/resource-management/" class="list-group-item">Resource Management</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Schedulers</a>
|
||||
|
||||
|
||||
2
dokku
2
dokku
@@ -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"}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -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/^/ /"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core build-env plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -26,7 +26,7 @@ clean:
|
||||
rm -rf commands subcommands triggers install post-delete post-extract report
|
||||
|
||||
src-clean:
|
||||
rm -rf .gitignore src triggers vendor Makefile *.go
|
||||
rm -rf .gitignore src triggers vendor Makefile *.go glide.*
|
||||
|
||||
triggers: $(TRIGGERS)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core buildpacks plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -26,7 +26,7 @@ func main() {
|
||||
}
|
||||
|
||||
buildpacksPath := path.Join(tmpWorkDir, ".buildpacks")
|
||||
file, err := os.OpenFile(buildpacksPath, os.O_RDWR|os.O_TRUNC, 0600)
|
||||
file, err := os.OpenFile(buildpacksPath, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0600)
|
||||
if err != nil {
|
||||
common.LogFail(fmt.Sprintf("Error writing .buildpacks file: %s", err.Error()))
|
||||
return
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -264,6 +264,7 @@ get_app_scheduler() {
|
||||
declare APP="$1"
|
||||
local DOKKU_APP_SCHEDULER DOKKU_GLOBAL_SCHEDULER DOKKU_SCHEDULER
|
||||
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
[[ -n "$APP" ]] && DOKKU_APP_SCHEDULER="$(config_get "$APP" DOKKU_SCHEDULER || true)"
|
||||
DOKKU_GLOBAL_SCHEDULER="$(config_get --global DOKKU_SCHEDULER || true)"
|
||||
|
||||
@@ -290,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
|
||||
@@ -449,14 +454,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() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -25,4 +25,4 @@ clean:
|
||||
rm -rf commands subcommands
|
||||
|
||||
src-clean:
|
||||
rm -rf .gitignore src triggers vendor Makefile *.go
|
||||
rm -rf .gitignore src triggers vendor Makefile *.go glide.*
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"archive/tar"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"archive/tar"
|
||||
|
||||
"os"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/ryanuber/columnize"
|
||||
@@ -31,6 +30,10 @@ const (
|
||||
ExportFormatShell
|
||||
//ExportFormatPretty format: pretty-printed in columns
|
||||
ExportFormatPretty
|
||||
//ExportFormatJSON format: json key/value output
|
||||
ExportFormatJSON
|
||||
//ExportFormatJSONList format: json output as a list of objects
|
||||
ExportFormatJSONList
|
||||
)
|
||||
|
||||
//Env is a representation for global or app environment
|
||||
@@ -168,6 +171,10 @@ func (e *Env) Export(format ExportFormat) string {
|
||||
return e.ShellString()
|
||||
case ExportFormatPretty:
|
||||
return prettyPrintEnvEntries("", e.Map())
|
||||
case ExportFormatJSON:
|
||||
return e.JSONString()
|
||||
case ExportFormatJSONList:
|
||||
return e.JSONListString()
|
||||
default:
|
||||
common.LogFail(fmt.Sprintf("Unknown export format: %v", format))
|
||||
return ""
|
||||
@@ -190,6 +197,35 @@ func (e *Env) DockerArgsString() string {
|
||||
return e.stringWithPrefixAndSeparator("--env=", " ")
|
||||
}
|
||||
|
||||
//JSONString returns the contents of this Env as a key/value json object
|
||||
func (e *Env) JSONString() string {
|
||||
data, err := json.Marshal(e.Map())
|
||||
if err != nil {
|
||||
return "{}"
|
||||
}
|
||||
|
||||
return string(data)
|
||||
}
|
||||
|
||||
//JSONListString returns the contents of this Env as a json list of objects containing the name and the value of the env var
|
||||
func (e *Env) JSONListString() string {
|
||||
var list []map[string]string
|
||||
for _, key := range e.Keys() {
|
||||
value, _ := e.Get(key)
|
||||
list = append(list, map[string]string{
|
||||
"name": key,
|
||||
"value": value,
|
||||
})
|
||||
}
|
||||
|
||||
data, err := json.Marshal(list)
|
||||
if err != nil {
|
||||
return "[]"
|
||||
}
|
||||
|
||||
return string(data)
|
||||
}
|
||||
|
||||
//ShellString gets the contents of this Env in the form "KEY='value' KEY2='value'"
|
||||
// for passing the environment in the shell
|
||||
func (e *Env) ShellString() string {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core config plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -21,12 +21,12 @@ Additional commands:`
|
||||
|
||||
helpContent = `
|
||||
config (<app>|--global), Pretty-print an app or global environment
|
||||
config:bundle (<app>|--global) [--merged], Bundle environment into tarfile
|
||||
config:export (<app>|--global) [--envfile], Export a global or app environment
|
||||
config:get (<app>|--global) KEY, Display a global or app-specific config value
|
||||
config:keys (<app>|--global) [--merged], Show keys set in environment
|
||||
config:set [--encoded] [--no-restart] (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...], Set one or more config vars
|
||||
config:unset [--no-restart] (<app>|--global) KEY1 [KEY2 ...], Unset one or more config vars
|
||||
config:export (<app>|--global) [--envfile], Export a global or app environment
|
||||
config:keys (<app>|--global) [--merged], Show keys set in environment
|
||||
config:bundle (<app>|--global) [--merged], Bundle environment into tarfile
|
||||
`
|
||||
)
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ func main() {
|
||||
args := flag.NewFlagSet("config:export", flag.ExitOnError)
|
||||
global := args.Bool("global", false, "--global: use the global environment")
|
||||
merged := args.Bool("merged", false, "--merged: merge app environment and global environment")
|
||||
format := args.String("format", "exports", "--format: [ exports | envfile | docker-args | shell ] which format to export as)")
|
||||
format := args.String("format", "exports", "--format: [ exports | envfile | docker-args | shell | pretty | json | json-list ] which format to export as)")
|
||||
args.Parse(os.Args[2:])
|
||||
config.CommandExport(args.Args(), *global, *merged, *format)
|
||||
}
|
||||
|
||||
@@ -117,6 +117,10 @@ func CommandExport(args []string, global bool, merged bool, format string) {
|
||||
suffix = " "
|
||||
case "pretty":
|
||||
exportType = ExportFormatPretty
|
||||
case "json":
|
||||
exportType = ExportFormatJSON
|
||||
case "json-list":
|
||||
exportType = ExportFormatJSONList
|
||||
default:
|
||||
common.LogFail(fmt.Sprintf("Unknown export format: %v", format))
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core docker-options plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -10,6 +10,11 @@ cmd-domains-report() {
|
||||
local INSTALLED_APPS=$(dokku_apps)
|
||||
local APP="$2" INFO_FLAG="$3"
|
||||
|
||||
if [[ "$APP" == "--global" ]]; then
|
||||
cmd-domains-report-single "$APP" "$INFO_FLAG"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then
|
||||
INFO_FLAG="$APP"
|
||||
APP=""
|
||||
@@ -33,16 +38,29 @@ cmd-domains-report-single() {
|
||||
if [[ "$INFO_FLAG" == "true" ]]; then
|
||||
INFO_FLAG=""
|
||||
fi
|
||||
verify_app_name "$APP"
|
||||
local flag_map=(
|
||||
"--domains-app-enabled: $(fn-domains-app-enabled "$APP")"
|
||||
"--domains-app-vhosts: $(fn-domains-app-vhosts "$APP")"
|
||||
local flag_map=() app_flags=() global_flags=()
|
||||
|
||||
if [[ "$APP" != "--global" ]]; then
|
||||
verify_app_name "$APP"
|
||||
app_flags=(
|
||||
"--domains-app-enabled: $(fn-domains-app-enabled "$APP")"
|
||||
"--domains-app-vhosts: $(fn-domains-app-vhosts "$APP")"
|
||||
)
|
||||
fi
|
||||
|
||||
global_flags=(
|
||||
"--domains-global-enabled: $(fn-domains-global-enabled)"
|
||||
"--domains-global-vhosts: $(fn-domains-global-vhosts)"
|
||||
)
|
||||
|
||||
flag_map=("${app_flags[@]}" "${global_flags[@]}")
|
||||
|
||||
if [[ -z "$INFO_FLAG" ]]; then
|
||||
dokku_log_info2_quiet "$APP domains information"
|
||||
if [[ "$APP" == "--global" ]]; then
|
||||
dokku_log_info2_quiet "Global domains information"
|
||||
else
|
||||
dokku_log_info2_quiet "$APP domains information"
|
||||
fi
|
||||
for flag in "${flag_map[@]}"; do
|
||||
key="$(echo "${flag#--}" | cut -f1 -d' ' | tr - ' ')"
|
||||
dokku_log_verbose "$(printf "%-30s %-25s" "${key^}" "${flag#*: }")"
|
||||
@@ -63,7 +81,6 @@ cmd-domains-report-single() {
|
||||
fi
|
||||
done
|
||||
[[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}"
|
||||
[[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -74,11 +91,12 @@ 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
|
||||
domains:remove-global <domain> [<domain> ...], Remove global domain names
|
||||
domains:report [<app>] [<flag>], Displays a domains report for one or more apps
|
||||
domains:report [<app>|--global] [<flag>], Displays a domains report for one or more apps
|
||||
domains:set <app> <domain> [<domain> ...], Set domains for app
|
||||
domains:set-global <domain> [<domain> ...], Set global domain names
|
||||
help_content
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core domains plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core enter plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
23
plugins/git/git-revision
Executable file
23
plugins/git/git-revision
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-git-git-revision() {
|
||||
declare desc="fetches the current git revision value for an application"
|
||||
declare APP="$1"
|
||||
|
||||
ENV_VAR_NAME="$(fn-plugin-property-get "git" "$APP" "rev-env-var")"
|
||||
if [[ -z "$ENV_VAR_NAME" ]] && ! fn-plugin-property-exists "git" "$APP" "rev-env-var"; then
|
||||
ENV_VAR_NAME="GIT_REV"
|
||||
fi
|
||||
|
||||
if [[ -z "$ENV_VAR_NAME" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
config_get "$APP" "$ENV_VAR_NAME" || true
|
||||
}
|
||||
|
||||
trigger-git-git-revision "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core git plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core logs plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -10,8 +10,6 @@ logs_default_cmd() {
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
local APP="$2"
|
||||
verify_app_name "$2"
|
||||
local APP_ROOT="$DOKKU_ROOT/$APP"
|
||||
local COLORS=(36 33 32 35 31)
|
||||
|
||||
! (is_deployed "$APP") && dokku_log_fail "App $APP has not been deployed"
|
||||
|
||||
@@ -24,23 +22,23 @@ logs_default_cmd() {
|
||||
fi
|
||||
eval set -- "$TEMP"
|
||||
|
||||
local DOKKU_LOGS_LINE_NUMBERS="100"
|
||||
local NUM="100"
|
||||
while true; do
|
||||
case "$1" in
|
||||
-t | --tail)
|
||||
local DOKKU_LOGS_ARGS+="--follow "
|
||||
local TAIL=true
|
||||
shift
|
||||
;;
|
||||
-n | --num)
|
||||
local DOKKU_LOGS_LINE_NUMBERS="$2"
|
||||
local NUM="$2"
|
||||
shift 2
|
||||
;;
|
||||
-p | --ps)
|
||||
local DOKKU_LOGS_ONLY_PROCESS="$2"
|
||||
local PROCESS_TYPE="$2"
|
||||
shift 2
|
||||
;;
|
||||
-q | --quiet)
|
||||
local DOKKU_LOGS_NO_PRETTY_PRINT="true"
|
||||
local PRETTY_PRINT=true
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
@@ -51,32 +49,8 @@ logs_default_cmd() {
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -n $DOKKU_LOGS_ONLY_PROCESS ]]; then
|
||||
local CONTAINERS=("$APP_ROOT/CONTAINER.$DOKKU_LOGS_ONLY_PROCESS".*)
|
||||
else
|
||||
local CONTAINERS=("$APP_ROOT"/CONTAINER.*)
|
||||
fi
|
||||
[[ -z $(stat -t "${CONTAINERS[0]}" 2>/dev/null) ]] && exit 0
|
||||
|
||||
local DOKKU_LOGS_ARGS+="--tail $DOKKU_LOGS_LINE_NUMBERS"
|
||||
((MAX_INDEX = ${#CONTAINERS[*]} - 1)) || true
|
||||
for i in ${!CONTAINERS[*]}; do
|
||||
local DYNO=$(echo "${CONTAINERS[i]}" | sed -r 's/.*CONTAINER\.(.*)/\1/')
|
||||
local CID=$(<"${CONTAINERS[i]}")
|
||||
local COLOR=${COLORS[i % ${#COLORS[*]}]}
|
||||
if [[ $DOKKU_LOGS_NO_PRETTY_PRINT == "true" ]]; then
|
||||
local DOKKU_LOGS_CMD+="(docker logs $DOKKU_LOGS_ARGS $CID 2>&1)"
|
||||
else
|
||||
local DOKKU_LOGS_PRETTY_PRINT_CMD="sed -r 's/^([^Z]+Z )/\x1b[${COLOR}m\1app[$DYNO]:\x1b[0m /gm'"
|
||||
local DOKKU_LOGS_CMD+="(docker logs -t $DOKKU_LOGS_ARGS $CID 2>&1 | $DOKKU_LOGS_PRETTY_PRINT_CMD)"
|
||||
fi
|
||||
if [[ $i != "$MAX_INDEX" ]]; then
|
||||
local DOKKU_LOGS_CMD+="& "
|
||||
else
|
||||
local DOKKU_LOGS_CMD+="; "
|
||||
fi
|
||||
done
|
||||
bash -c "($DOKKU_LOGS_CMD)"
|
||||
DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||
plugn trigger scheduler-logs "$DOKKU_SCHEDULER" "$APP" "$PROCESS_TYPE" "$TAIL" "$PRETTY_PRINT" "$NUM"
|
||||
}
|
||||
|
||||
logs_default_cmd "$@"
|
||||
|
||||
@@ -26,7 +26,7 @@ clean:
|
||||
rm -rf commands subcommands triggers network-* install post-app-clone-setup post-create post-delete report
|
||||
|
||||
src-clean:
|
||||
rm -rf .gitignore src triggers vendor Makefile *.go
|
||||
rm -rf .gitignore src triggers vendor Makefile *.go glide.*
|
||||
|
||||
triggers: $(TRIGGERS)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core network plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core nginx-vhosts plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core plugin plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -13,7 +13,7 @@ plugin_install_cmd() {
|
||||
[[ "$#" -gt 2 ]] && dokku_log_info1_quiet "Cannot install additional core plugins, running core plugin install trigger"
|
||||
PLUGIN_PATH="$PLUGIN_CORE_PATH" plugn trigger install
|
||||
;;
|
||||
https:* | git* | ssh:* | *.tar.gz | *.tgz)
|
||||
https:* | git* | ssh:* | file:* | *.tar.gz | *.tgz)
|
||||
shift
|
||||
download_and_enable_plugin "$@"
|
||||
plugn trigger install
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core proxy plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -100,7 +100,7 @@ set_scale() {
|
||||
for procscale in "${SCALE_SETTINGS[@]}"; do
|
||||
local PROC_NAME=${procscale%%=*}
|
||||
local PROC_COUNT=${procscale#*=}
|
||||
if [[ -f "$DOKKU_PROCFILE" ]] && ! procfile-util exists --procfile "$DOKKU_PROCFILE" --process-type "$PROC_NAME" >/dev/null 2>&1; then
|
||||
if [[ -f "$DOKKU_PROCFILE" ]] && [[ "$PROC_COUNT" != "0" ]] && ! procfile-util exists --procfile "$DOKKU_PROCFILE" --process-type "$PROC_NAME" >/dev/null 2>&1; then
|
||||
dokku_log_fail "${PROC_NAME} is not a valid process name"
|
||||
fi
|
||||
is_number "$PROC_COUNT" || dokku_log_fail "ps:scale $PROC_COUNT is not a number"
|
||||
@@ -185,13 +185,13 @@ ps_scale() {
|
||||
[[ ! -e $DOKKU_SCALE_FILE ]] && generate_scale_file "$APP" "$IMAGE_TAG"
|
||||
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" "$@"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ps plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -25,4 +25,4 @@ clean:
|
||||
rm -rf commands subcommands
|
||||
|
||||
src-clean:
|
||||
rm -rf .gitignore src triggers vendor Makefile *.go
|
||||
rm -rf .gitignore src triggers vendor Makefile *.go glide.*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core repo plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -26,7 +26,7 @@ clean:
|
||||
rm -rf commands subcommands triggers docker-args-process-deploy docker-args-process-run install post-delete report resource-get-property
|
||||
|
||||
src-clean:
|
||||
rm -rf .gitignore src triggers vendor Makefile *.go
|
||||
rm -rf .gitignore src triggers vendor Makefile *.go glide.*
|
||||
|
||||
triggers: $(TRIGGERS)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core resource plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core scheduler-docker-local plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
23
plugins/scheduler-docker-local/scheduler-is-deployed
Executable file
23
plugins/scheduler-docker-local/scheduler-is-deployed
Executable 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 "$@"
|
||||
50
plugins/scheduler-docker-local/scheduler-logs
Executable file
50
plugins/scheduler-docker-local/scheduler-logs
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
scheduler-docker-local-scheduler-logs() {
|
||||
declare desc="scheduler-docker-local scheduler-logs plugin trigger"
|
||||
declare trigger="scheduler-docker-local scheduler-logs"
|
||||
declare DOKKU_SCHEDULER="$1" APP="$2" PROCESS_TYPE="$3" TAIL="$4" PRETTY_PRINT="$5" NUM="$6"
|
||||
local DOKKU_LOGS_ARGS=""
|
||||
|
||||
if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "$TAIL" == "true" ]]; then
|
||||
DOKKU_LOGS_ARGS="--follow "
|
||||
fi
|
||||
|
||||
local APP_ROOT="$DOKKU_ROOT/$APP"
|
||||
local COLORS=(36 33 32 35 31)
|
||||
if [[ -n "$PROCESS_TYPE" ]]; then
|
||||
local CONTAINERS=("$APP_ROOT/CONTAINER.$PROCESS_TYPE".*)
|
||||
else
|
||||
local CONTAINERS=("$APP_ROOT"/CONTAINER.*)
|
||||
fi
|
||||
[[ -z $(stat -t "${CONTAINERS[0]}" 2>/dev/null) ]] && exit 0
|
||||
|
||||
local DOKKU_LOGS_ARGS+="--tail $NUM"
|
||||
((MAX_INDEX = ${#CONTAINERS[*]} - 1)) || true
|
||||
for i in ${!CONTAINERS[*]}; do
|
||||
local DYNO=$(echo "${CONTAINERS[i]}" | sed -r 's/.*CONTAINER\.(.*)/\1/')
|
||||
local CID=$(<"${CONTAINERS[i]}")
|
||||
local COLOR=${COLORS[i % ${#COLORS[*]}]}
|
||||
if [[ $PRETTY_PRINT == "true" ]]; then
|
||||
local DOKKU_LOGS_CMD+="(docker logs $DOKKU_LOGS_ARGS $CID 2>&1)"
|
||||
else
|
||||
local DOKKU_LOGS_PRETTY_PRINT_CMD="sed -r 's/^([^Z]+Z )/\x1b[${COLOR}m\1app[$DYNO]:\x1b[0m /gm'"
|
||||
local DOKKU_LOGS_CMD+="(docker logs -t $DOKKU_LOGS_ARGS $CID 2>&1 | $DOKKU_LOGS_PRETTY_PRINT_CMD)"
|
||||
fi
|
||||
if [[ $i != "$MAX_INDEX" ]]; then
|
||||
local DOKKU_LOGS_CMD+="& "
|
||||
else
|
||||
local DOKKU_LOGS_CMD+="; "
|
||||
fi
|
||||
done
|
||||
bash -c "($DOKKU_LOGS_CMD)"
|
||||
}
|
||||
|
||||
scheduler-docker-local-scheduler-logs "$@"
|
||||
@@ -47,11 +47,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
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core shell plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ssh-keys plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core storage plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tags plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tar plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.16.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
source "https://rubygems.org"
|
||||
|
||||
ruby '2.2.4'
|
||||
ruby '2.6.2'
|
||||
|
||||
gem 'compass', ">= 1.0.1"
|
||||
gem 'sass-globbing'
|
||||
|
||||
@@ -109,11 +109,11 @@ teardown() {
|
||||
assert_success
|
||||
done
|
||||
|
||||
run /bin/bash -c "dokku ps:scale $TEST_APP web=0 worker=0"
|
||||
run /bin/bash -c "dokku ps:scale $TEST_APP web=0 worker=0 invalid-process=0"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
for PROC_TYPE in web worker; do
|
||||
for PROC_TYPE in web worker invalid-process; do
|
||||
CIDS=""
|
||||
shopt -s nullglob
|
||||
for CID_FILE in $DOKKU_ROOT/$TEST_APP/CONTAINER.$PROC_TYPE.*; do
|
||||
|
||||
@@ -155,6 +155,32 @@ teardown() {
|
||||
run /bin/bash -c "dokku --app $TEST_APP config:show"
|
||||
echo "output: $output"
|
||||
echo "status: "$stat
|
||||
|
||||
assert_output "=====> $TEST_APP env vars"$'\nBKEY: true\naKey: true\nbKey: true\nzKey: true'
|
||||
}
|
||||
|
||||
@test "(config) config:export" {
|
||||
run /bin/bash -c "dokku --app $TEST_APP config:set zKey=true bKey=true BKEY=true aKey=true"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku config:export --format docker-args $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: "$stat
|
||||
assert_output "--env=BKEY='true' --env=aKey='true' --env=bKey='true' --env=zKey='true'"
|
||||
|
||||
run /bin/bash -c "dokku config:export --format shell $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: "$stat
|
||||
assert_output "BKEY='true' aKey='true' bKey='true' zKey='true' "
|
||||
|
||||
run /bin/bash -c "dokku config:export --format json $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: "$stat
|
||||
assert_output '{"BKEY":"true","aKey":"true","bKey":"true","zKey":"true"}'
|
||||
|
||||
run /bin/bash -c "dokku config:export --format json-list $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: "$stat
|
||||
assert_output '[{"name":"BKEY","value":"true"},{"name":"aKey","value":"true"},{"name":"bKey","value":"true"},{"name":"zKey","value":"true"}]'
|
||||
}
|
||||
|
||||
@@ -173,6 +173,11 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku domains:report $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku domains:clear $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
@@ -183,6 +188,11 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
refute_line test.app.dokku.me
|
||||
|
||||
run /bin/bash -c "dokku domains:report $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(domains) domains:add-global" {
|
||||
@@ -191,6 +201,11 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku domains:report --global"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku domains 2>/dev/null | egrep -qw '^global.dokku.me\$'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
@@ -219,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"
|
||||
|
||||
@@ -209,3 +209,25 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_output_not_exists
|
||||
}
|
||||
|
||||
@test "(buildpacks) buildpacks deploy" {
|
||||
destroy_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
create_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku buildpacks:set $TEST_APP https://github.com/heroku/heroku-buildpack-nodejs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run deploy_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@@ -3,13 +3,20 @@
|
||||
load test_helper
|
||||
TEST_PLUGIN_NAME=smoke-test-plugin
|
||||
TEST_PLUGIN_GIT_REPO=https://github.com/dokku/${TEST_PLUGIN_NAME}.git
|
||||
TEST_PLUGIN_LOCAL_REPO="$(mktemp -d)/$TEST_PLUGIN_NAME"
|
||||
|
||||
clone_test_plugin() {
|
||||
git clone "$TEST_PLUGIN_GIT_REPO" "$TEST_PLUGIN_LOCAL_REPO"
|
||||
}
|
||||
|
||||
setup() {
|
||||
global_setup
|
||||
clone_test_plugin
|
||||
}
|
||||
|
||||
remove_test_plugin() {
|
||||
rm -rf $PLUGIN_ENABLED_PATH/$TEST_PLUGIN_NAME $PLUGIN_AVAILABLE_PATH/$TEST_PLUGIN_NAME
|
||||
rm -rf $TEST_PLUGIN_LOCAL_REPO
|
||||
}
|
||||
|
||||
teardown() {
|
||||
@@ -59,6 +66,48 @@ teardown() {
|
||||
assert_failure
|
||||
}
|
||||
|
||||
@test "(plugin) plugin:install, plugin:disable, plugin:update plugin:uninstall (with file://)" {
|
||||
run /bin/bash -c "dokku plugin:install file://$TEST_PLUGIN_LOCAL_REPO --name $TEST_PLUGIN_NAME"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku plugin:update $TEST_PLUGIN_NAME"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku plugin | grep enabled | grep $TEST_PLUGIN_NAME"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "sudo -E -u nobody dokku plugin:uninstall $TEST_PLUGIN_NAME"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
|
||||
run /bin/bash -c "dokku plugin:disable $TEST_PLUGIN_NAME"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku plugin | grep disabled | grep $TEST_PLUGIN_NAME"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku plugin:uninstall $TEST_PLUGIN_NAME"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku plugin | grep $TEST_PLUGIN_NAME"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
}
|
||||
|
||||
@test "(plugin) plugin:install plugin:update (with tag)" {
|
||||
run /bin/bash -c "dokku plugin:install $TEST_PLUGIN_GIT_REPO --committish v0.2.0 --name $TEST_PLUGIN_NAME"
|
||||
echo "output: $output"
|
||||
|
||||
Reference in New Issue
Block a user