Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
161380d639 | ||
|
|
5f36b138fb | ||
|
|
024fd958e8 | ||
|
|
a848d92823 | ||
|
|
3696757e8f | ||
|
|
2cabf0a21f | ||
|
|
283ff056da | ||
|
|
9bcd81c8bd | ||
|
|
0ebb400d91 | ||
|
|
fc5544ac70 | ||
|
|
4a7f13c3d8 | ||
|
|
737e4a5bf4 | ||
|
|
d047db108b | ||
|
|
73f5fde99d | ||
|
|
a17ed7981e | ||
|
|
8a5504574d | ||
|
|
8ac35766f3 | ||
|
|
5fd5e235d8 | ||
|
|
8d526b964b | ||
|
|
084906d684 | ||
|
|
79d4f4578d | ||
|
|
785d9b4937 | ||
|
|
0e03c82139 | ||
|
|
84e33f2c57 | ||
|
|
a6408c0c56 | ||
|
|
915ef6a8d5 | ||
|
|
684f9fd175 | ||
|
|
e276ebbc27 | ||
|
|
0988e62418 | ||
|
|
bbc8c8a533 | ||
|
|
082e9458e5 | ||
|
|
0a17358352 |
95
HISTORY.md
95
HISTORY.md
@@ -1,5 +1,100 @@
|
|||||||
# History
|
# History
|
||||||
|
|
||||||
|
## 0.17.8
|
||||||
|
|
||||||
|
Install/update via the bootstrap script:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.8/bootstrap.sh
|
||||||
|
sudo DOKKU_TAG=v0.17.8 bash bootstrap.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- #3591: @palfrey Allow SSH keys with no ending newline
|
||||||
|
|
||||||
|
### New Features
|
||||||
|
|
||||||
|
- #3587: @josegonzalez feat: drop make and gcc as dependencies
|
||||||
|
|
||||||
|
## 0.17.7
|
||||||
|
|
||||||
|
Install/update via the bootstrap script:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.7/bootstrap.sh
|
||||||
|
sudo DOKKU_TAG=v0.17.7 bash bootstrap.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### New Features
|
||||||
|
|
||||||
|
- #3586: @josegonzalez ps plugin parallel usage cleanup
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
- #3584: @josegonzalez Fix no-install-recommends documentation
|
||||||
|
|
||||||
|
### Other
|
||||||
|
|
||||||
|
- #3579: @znz Update plugin list
|
||||||
|
|
||||||
|
## 0.17.6
|
||||||
|
|
||||||
|
Install/update via the bootstrap script:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.6/bootstrap.sh
|
||||||
|
sudo DOKKU_TAG=v0.17.6 bash bootstrap.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### New Features
|
||||||
|
|
||||||
|
- #3578: @josegonzalez Allow omitting resource args by setting DOKKU_OMIT_RESOURCE_ARGS
|
||||||
|
|
||||||
|
## 0.17.5
|
||||||
|
|
||||||
|
Install/update via the bootstrap script:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.5/bootstrap.sh
|
||||||
|
sudo DOKKU_TAG=v0.17.5 bash bootstrap.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### New Features
|
||||||
|
|
||||||
|
- #3576: @josegonzalez Allow setting DOCKER_BIN path for docker execution
|
||||||
|
|
||||||
|
## 0.17.4
|
||||||
|
|
||||||
|
Install/update via the bootstrap script:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.4/bootstrap.sh
|
||||||
|
sudo DOKKU_TAG=v0.17.4 bash bootstrap.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### New Features
|
||||||
|
|
||||||
|
- #3575: @josegonzalez Add a way to cleanup apps for specific schedulers
|
||||||
|
|
||||||
|
## 0.17.3
|
||||||
|
|
||||||
|
Install/update via the bootstrap script:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.3/bootstrap.sh
|
||||||
|
sudo DOKKU_TAG=v0.17.3 bash bootstrap.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- #3570: @znz Fix typos in trace help
|
||||||
|
|
||||||
|
### New Features
|
||||||
|
|
||||||
|
- #3574: @josegonzalez Add support for pulling app status from scheduler plugins
|
||||||
|
- #3571: @znz Simplify hostname_regex
|
||||||
|
|
||||||
## 0.17.2
|
## 0.17.2
|
||||||
|
|
||||||
Install/update via the bootstrap script:
|
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`:
|
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.2/bootstrap.sh
|
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.8/bootstrap.sh
|
||||||
sudo DOKKU_TAG=v0.17.2 bash bootstrap.sh
|
sudo DOKKU_TAG=v0.17.8 bash bootstrap.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
VERSION = 'v0.17.2'
|
VERSION = 'v0.17.8'
|
||||||
|
|
||||||
hostname = ''
|
hostname = ''
|
||||||
try:
|
try:
|
||||||
|
|||||||
4
debian/control
vendored
4
debian/control
vendored
@@ -1,9 +1,9 @@
|
|||||||
Package: dokku
|
Package: dokku
|
||||||
Version: 0.17.2
|
Version: 0.17.8
|
||||||
Section: web
|
Section: web
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Depends: locales, git, make, curl, gcc, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker.io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog
|
Depends: locales, git, curl, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker.io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog
|
||||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update
|
Recommends: herokuish (>= 0.3.4), parallel, dokku-update
|
||||||
Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf
|
Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf
|
||||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||||
|
|||||||
@@ -24,39 +24,43 @@ dokku plugins-install
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
You can list all installed plugins using the `plugin` command:
|
You can list all installed plugins using the `plugin:list` command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku plugin
|
dokku plugin:list
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
plugn: dev
|
plugn: dev
|
||||||
00_dokku-standard 0.17.2 enabled dokku core standard plugin
|
00_dokku-standard 0.17.8 enabled dokku core standard plugin
|
||||||
20_events 0.17.2 enabled dokku core events logging plugin
|
20_events 0.17.8 enabled dokku core events logging plugin
|
||||||
apps 0.17.2 enabled dokku core apps plugin
|
app-json 0.17.8 enabled dokku core app-json plugin
|
||||||
build-env 0.17.2 enabled dokku core build-env plugin
|
apps 0.17.8 enabled dokku core apps plugin
|
||||||
certs 0.17.2 enabled dokku core certificate management plugin
|
build-env 0.17.8 enabled dokku core build-env plugin
|
||||||
checks 0.17.2 enabled dokku core checks plugin
|
buildpacks 0.17.8 enabled dokku core buildpacks plugin
|
||||||
common 0.17.2 enabled dokku core common plugin
|
certs 0.17.8 enabled dokku core certificate management plugin
|
||||||
config 0.17.2 enabled dokku core config plugin
|
checks 0.17.8 enabled dokku core checks plugin
|
||||||
docker-options 0.17.2 enabled dokku core docker-options plugin
|
common 0.17.8 enabled dokku core common plugin
|
||||||
domains 0.17.2 enabled dokku core domains plugin
|
config 0.17.8 enabled dokku core config plugin
|
||||||
enter 0.17.2 enabled dokku core enter plugin
|
docker-options 0.17.8 enabled dokku core docker-options plugin
|
||||||
git 0.17.2 enabled dokku core git plugin
|
domains 0.17.8 enabled dokku core domains plugin
|
||||||
logs 0.17.2 enabled dokku core logs plugin
|
enter 0.17.8 enabled dokku core enter plugin
|
||||||
named-containers 0.17.2 enabled dokku core named containers plugin
|
git 0.17.8 enabled dokku core git plugin
|
||||||
network 0.17.2 enabled dokku core network plugin
|
logs 0.17.8 enabled dokku core logs plugin
|
||||||
nginx-vhosts 0.17.2 enabled dokku core nginx-vhosts plugin
|
network 0.17.8 enabled dokku core network plugin
|
||||||
plugin 0.17.2 enabled dokku core plugin plugin
|
nginx-vhosts 0.17.8 enabled dokku core nginx-vhosts plugin
|
||||||
proxy 0.17.2 enabled dokku core proxy plugin
|
plugin 0.17.8 enabled dokku core plugin plugin
|
||||||
ps 0.17.2 enabled dokku core ps plugin
|
proxy 0.17.8 enabled dokku core proxy plugin
|
||||||
repo 0.17.2 enabled dokku core repo plugin
|
ps 0.17.8 enabled dokku core ps plugin
|
||||||
shell 0.17.2 enabled dokku core shell plugin
|
repo 0.17.8 enabled dokku core repo plugin
|
||||||
ssh-keys 0.17.2 enabled dokku core ssh-keys plugin
|
resource 0.17.8 enabled dokku core resource plugin
|
||||||
storage 0.17.2 enabled dokku core storage plugin
|
scheduler-docker-local 0.17.8 enabled dokku core scheduler-docker-local plugin
|
||||||
tags 0.17.2 enabled dokku core tags plugin
|
shell 0.17.8 enabled dokku core shell plugin
|
||||||
tar 0.17.2 enabled dokku core tar plugin
|
ssh-keys 0.17.8 enabled dokku core ssh-keys plugin
|
||||||
|
storage 0.17.8 enabled dokku core storage plugin
|
||||||
|
tags 0.17.8 enabled dokku core tags plugin
|
||||||
|
tar 0.17.8 enabled dokku core tar plugin
|
||||||
|
trace 0.17.8 enabled dokku core trace 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.
|
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<browserconfig>
|
<browserconfig>
|
||||||
<msapplication>
|
<msapplication>
|
||||||
<tile>
|
<tile>
|
||||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-70x70.png"/>
|
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-70x70.png"/>
|
||||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-150x150.png"/>
|
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-150x150.png"/>
|
||||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-310x310.png"/>
|
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-310x310.png"/>
|
||||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-310x150.png"/>
|
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-310x150.png"/>
|
||||||
<TileColor>#da532c</TileColor>
|
<TileColor>#da532c</TileColor>
|
||||||
</tile>
|
</tile>
|
||||||
</msapplication>
|
</msapplication>
|
||||||
|
|||||||
@@ -2,37 +2,37 @@
|
|||||||
"name": "Dokku",
|
"name": "Dokku",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||||
"sizes": "36x36",
|
"sizes": "36x36",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "0.75"
|
"density": "0.75"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||||
"sizes": "48x48",
|
"sizes": "48x48",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "1.0"
|
"density": "1.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||||
"sizes": "72x72",
|
"sizes": "72x72",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "1.5"
|
"density": "1.5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||||
"sizes": "96x96",
|
"sizes": "96x96",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "2.0"
|
"density": "2.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||||
"sizes": "144x144",
|
"sizes": "144x144",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "3.0"
|
"density": "3.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "4.0"
|
"density": "4.0"
|
||||||
|
|||||||
@@ -39,13 +39,13 @@ h1 {
|
|||||||
font-size: 1.6em;
|
font-size: 1.6em;
|
||||||
}
|
}
|
||||||
.header .navbar-brand a {
|
.header .navbar-brand a {
|
||||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/dokku.png);
|
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/dokku.png);
|
||||||
text-indent: 40px;
|
text-indent: 40px;
|
||||||
}
|
}
|
||||||
.blurb {
|
.blurb {
|
||||||
color: #424242;
|
color: #424242;
|
||||||
background-color: #ededed;
|
background-color: #ededed;
|
||||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/gplaypattern.png);
|
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/gplaypattern.png);
|
||||||
padding: 45px 0;
|
padding: 45px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
"0.14.6",
|
"0.14.6",
|
||||||
"0.15.5",
|
"0.15.5",
|
||||||
"0.16.4",
|
"0.16.4",
|
||||||
"0.17.2"
|
"0.17.8"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ The following list config variables have special meaning and can be set in a var
|
|||||||
| `DOKKU_DOCKERFILE_ENTRYPOINT` | dockerfile entrypoint | `dokku config:set` | |
|
| `DOKKU_DOCKERFILE_ENTRYPOINT` | dockerfile entrypoint | `dokku config:set` | |
|
||||||
| `DOKKU_DOCKERFILE_PORTS` | dockerfile ports | `dokku config:set` | |
|
| `DOKKU_DOCKERFILE_PORTS` | dockerfile ports | `dokku config:set` | |
|
||||||
| `DOKKU_DOCKERFILE_START_CMD` | none | `dokku config:set` | |
|
| `DOKKU_DOCKERFILE_START_CMD` | none | `dokku config:set` | |
|
||||||
|
| `DOKKU_PARALLEL_ARGUMENTS`. | none | `dokku config:set` | Allows passing custom arguments to parallel for `ps:*all` commands |
|
||||||
| `DOKKU_PROXY_PORT` | automatically assigned | `dokku config:set` | |
|
| `DOKKU_PROXY_PORT` | automatically assigned | `dokku config:set` | |
|
||||||
| `DOKKU_PROXY_SSL_PORT` | automatically assigned | `dokku config:set` | |
|
| `DOKKU_PROXY_SSL_PORT` | automatically assigned | `dokku config:set` | |
|
||||||
| `DOKKU_PROXY_PORT_MAP` | automatically assigned | `dokku proxy:ports-add` <br /> `dokku proxy:ports-remove`, `dokku proxy:ports-clear` | |
|
| `DOKKU_PROXY_PORT_MAP` | automatically assigned | `dokku proxy:ports-add` <br /> `dokku proxy:ports-remove`, `dokku proxy:ports-clear` | |
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ The workflow looks like this:
|
|||||||
```shell
|
```shell
|
||||||
# having dokku-arch in ../dokku-arch
|
# having dokku-arch in ../dokku-arch
|
||||||
vagrant up build-arch
|
vagrant up build-arch
|
||||||
# wait for "==> build-arch: ==> Finished making: dokku 0.17.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
# wait for "==> build-arch: ==> Finished making: dokku 0.17.8-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||||
cd ../dokku-arch
|
cd ../dokku-arch
|
||||||
git add PKGBUILD .SRCINFO
|
git add PKGBUILD .SRCINFO
|
||||||
git commit -m 'Update to dokku 0.9.9'
|
git commit -m 'Update to dokku 0.9.9'
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make
|
|||||||
|
|
||||||
## Skipping Herokuish installation
|
## Skipping Herokuish installation
|
||||||
|
|
||||||
The Herokuish package is recommended but not required if not using Heroku buildpacks for deployment. Debian-based OS users can run the bootstrap installer via `sudo DOKKU_NO_INSTALL_RECOMMENDS=true bash bootstrap.sh` to skip the dependency. Please note that this will _also_ skip installation of other recommended dependencies.
|
The Herokuish package is recommended but not required if not using Heroku buildpacks for deployment. Debian-based OS users can run the bootstrap installer via `sudo DOKKU_NO_INSTALL_RECOMMENDS=" --no-install-recommends " bash bootstrap.sh` to skip the dependency. Please note that this will _also_ skip installation of other recommended dependencies.
|
||||||
|
|
||||||
## Configuring an unattended installation
|
## Configuring an unattended installation
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ To install the latest stable version of Dokku, you can run the following shell c
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# for debian systems, installs Dokku via apt-get
|
# for debian systems, installs Dokku via apt-get
|
||||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.2/bootstrap.sh;
|
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.8/bootstrap.sh;
|
||||||
sudo DOKKU_TAG=v0.17.2 bash bootstrap.sh
|
sudo DOKKU_TAG=v0.17.8 bash bootstrap.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||||
|
|||||||
@@ -10,30 +10,30 @@
|
|||||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||||
|
|
||||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.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.17.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/manifest.json">
|
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/manifest.json">
|
||||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon.ico">
|
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon.ico">
|
||||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||||
<meta name="application-name" content="Dokku">
|
<meta name="application-name" content="Dokku">
|
||||||
<meta name="msapplication-TileColor" content="#da532c">
|
<meta name="msapplication-TileColor" content="#da532c">
|
||||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-144x144.png">
|
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-144x144.png">
|
||||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/browserconfig.xml">
|
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/browserconfig.xml">
|
||||||
<meta name="theme-color" content="#ffffff">
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/style.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/style.css" rel="stylesheet">
|
||||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||||
<style>
|
<style>
|
||||||
.sponsors {
|
.sponsors {
|
||||||
@@ -127,12 +127,12 @@
|
|||||||
<p class="line">
|
<p class="line">
|
||||||
<span class="path"></span>
|
<span class="path"></span>
|
||||||
<span class="prompt">$</span>
|
<span class="prompt">$</span>
|
||||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.17.2/bootstrap.sh</span>
|
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.17.8/bootstrap.sh</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="line">
|
<p class="line">
|
||||||
<span class="path"></span>
|
<span class="path"></span>
|
||||||
<span class="prompt">$</span>
|
<span class="prompt">$</span>
|
||||||
<span class="command">sudo DOKKU_TAG=v0.17.2 bash bootstrap.sh</span>
|
<span class="command">sudo DOKKU_TAG=v0.17.8 bash bootstrap.sh</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="line">
|
<p class="line">
|
||||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||||
|
|||||||
@@ -9,26 +9,26 @@
|
|||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||||
|
|
||||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.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.17.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/manifest.json">
|
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/manifest.json">
|
||||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon.ico">
|
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon.ico">
|
||||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||||
<meta name="application-name" content="Dokku">
|
<meta name="application-name" content="Dokku">
|
||||||
<meta name="msapplication-TileColor" content="#da532c">
|
<meta name="msapplication-TileColor" content="#da532c">
|
||||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-144x144.png">
|
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-144x144.png">
|
||||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/browserconfig.xml">
|
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/browserconfig.xml">
|
||||||
<meta name="theme-color" content="#ffffff">
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/style.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/style.css" rel="stylesheet">
|
||||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
5
dokku
5
dokku
@@ -2,6 +2,7 @@
|
|||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
|
export DOCKER_BIN=docker
|
||||||
if [[ -r /etc/default/dokku ]]; then
|
if [[ -r /etc/default/dokku ]]; then
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
source /etc/default/dokku
|
source /etc/default/dokku
|
||||||
@@ -36,6 +37,10 @@ DOKKU_DISTRO=$(
|
|||||||
echo "$ID"
|
echo "$ID"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Specify twice so that only host-level
|
||||||
|
# configuration can ever override the DOCKER_BIN value
|
||||||
|
export DOCKER_BIN=${DOCKER_BIN:="docker"}
|
||||||
|
|
||||||
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish:latest"}
|
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish:latest"}
|
||||||
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
|
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core standard plugin"
|
description = "dokku core standard plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ dokku_report_cmd() {
|
|||||||
dokku_log_info1 "memory: "
|
dokku_log_info1 "memory: "
|
||||||
free -m | sed "s/^/ /"
|
free -m | sed "s/^/ /"
|
||||||
dokku_log_info1 "docker version: "
|
dokku_log_info1 "docker version: "
|
||||||
docker version | sed "s/^/ /"
|
"$DOCKER_BIN" version | sed "s/^/ /"
|
||||||
dokku_log_info1 "docker daemon info: "
|
dokku_log_info1 "docker daemon info: "
|
||||||
docker -D info | sed "s/^/ /"
|
"$DOCKER_BIN" -D info | sed "s/^/ /"
|
||||||
dokku_log_info1 "sigil version: $(sigil -v)"
|
dokku_log_info1 "sigil version: $(sigil -v)"
|
||||||
dokku_log_info1 "herokuish version: "
|
dokku_log_info1 "herokuish version: "
|
||||||
docker run --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
|
"$DOCKER_BIN" run --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
|
||||||
dokku_log_info1 "dokku version: $(dokku version)"
|
dokku_log_info1 "dokku version: $(dokku version)"
|
||||||
dokku_log_info1 "dokku plugins: "
|
dokku_log_info1 "dokku plugins: "
|
||||||
dokku plugin:list | sed "s/^/ /"
|
dokku plugin:list | sed "s/^/ /"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core events logging plugin"
|
description = "dokku core events logging plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ execute_script() {
|
|||||||
DOKKU_APP_SHELL="$(config_get "$APP" DOKKU_APP_SHELL || echo "$DOKKU_APP_SHELL")"
|
DOKKU_APP_SHELL="$(config_get "$APP" DOKKU_APP_SHELL || echo "$DOKKU_APP_SHELL")"
|
||||||
[[ -z "$DOKKU_APP_SHELL" ]] && DOKKU_APP_SHELL="/bin/bash"
|
[[ -z "$DOKKU_APP_SHELL" ]] && DOKKU_APP_SHELL="/bin/bash"
|
||||||
|
|
||||||
id=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_HOST_DIR:/cache" "${ARG_ARRAY[@]}" "$IMAGE" "$DOKKU_APP_SHELL" -c "$COMMAND")
|
id=$("$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_HOST_DIR:/cache" "${ARG_ARRAY[@]}" "$IMAGE" "$DOKKU_APP_SHELL" -c "$COMMAND")
|
||||||
if test "$(docker wait "$id")" -ne 0; then
|
if test "$("$DOCKER_BIN" wait "$id")" -ne 0; then
|
||||||
dokku_container_log_verbose_quiet "$id"
|
dokku_container_log_verbose_quiet "$id"
|
||||||
dokku_log_fail "execution of '$SCRIPT_CMD' failed!"
|
dokku_log_fail "execution of '$SCRIPT_CMD' failed!"
|
||||||
fi
|
fi
|
||||||
@@ -120,5 +120,5 @@ execute_script() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
eval docker commit $DOCKER_COMMIT_ARGS "$id" "$IMAGE" >/dev/null
|
eval "$DOCKER_BIN" commit $DOCKER_COMMIT_ARGS "$id" "$IMAGE" >/dev/null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core app-json plugin"
|
description = "dokku core app-json plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ apps_destroy() {
|
|||||||
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||||
local REMOVE_CONTAINERS="true"
|
local REMOVE_CONTAINERS="true"
|
||||||
plugn trigger scheduler-stop "$DOKKU_SCHEDULER" "$APP" "$REMOVE_CONTAINERS"
|
plugn trigger scheduler-stop "$DOKKU_SCHEDULER" "$APP" "$REMOVE_CONTAINERS"
|
||||||
|
plugn trigger scheduler-post-delete "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG"
|
||||||
plugn trigger post-delete "$APP" "$IMAGE_TAG"
|
plugn trigger post-delete "$APP" "$IMAGE_TAG"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core apps plugin"
|
description = "dokku core apps plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ app_post_delete() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rmi $(docker images -q "$IMAGE_REPO" | xargs) &>/dev/null || true
|
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -q "$IMAGE_REPO" | xargs) &>/dev/null || true
|
||||||
}
|
}
|
||||||
|
|
||||||
app_post_delete "$@"
|
app_post_delete "$@"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ apps_pre_delete() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d $CACHE_DIR ]]; then
|
if [[ -d $CACHE_DIR ]]; then
|
||||||
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$CACHE_HOST_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
"$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$CACHE_HOST_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ apps_clone_cmd() {
|
|||||||
plugn trigger post-app-clone-setup "$OLD_APP" "$NEW_APP"
|
plugn trigger post-app-clone-setup "$OLD_APP" "$NEW_APP"
|
||||||
|
|
||||||
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
|
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
|
||||||
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$NEW_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
"$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$NEW_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||||
fi
|
fi
|
||||||
rm -rf "$NEW_CACHE_DIR"
|
rm -rf "$NEW_CACHE_DIR"
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ apps_rename_cmd() {
|
|||||||
local OLD_CACHE_HOST_DIR="$DOKKU_HOST_ROOT/$OLD_APP/cache"
|
local OLD_CACHE_HOST_DIR="$DOKKU_HOST_ROOT/$OLD_APP/cache"
|
||||||
|
|
||||||
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR" >/dev/null 2>&1; then
|
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR" >/dev/null 2>&1; then
|
||||||
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$OLD_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
"$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$OLD_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||||
fi
|
fi
|
||||||
rm -rf "$OLD_CACHE_DIR"
|
rm -rf "$OLD_CACHE_DIR"
|
||||||
apps_create "$NEW_APP"
|
apps_create "$NEW_APP"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core build-env plugin"
|
description = "dokku core build-env plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -19,14 +19,14 @@ build_env_pre_build_buildpack() {
|
|||||||
dokku_log_info1 "Adding BUILD_ENV to build environment..."
|
dokku_log_info1 "Adding BUILD_ENV to build environment..."
|
||||||
# create build env files for use in buildpacks like this:
|
# create build env files for use in buildpacks like this:
|
||||||
# https://github.com/niteoweb/heroku-buildpack-buildout/blob/5879fa3418f7d8e079f1aa5816ba1adde73f4948/bin/compile#L34
|
# https://github.com/niteoweb/heroku-buildpack-buildout/blob/5879fa3418f7d8e079f1aa5816ba1adde73f4948/bin/compile#L34
|
||||||
id=$(config_bundle --merged "$APP" | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /tmp/env; cat | tar -x -C /tmp/env")
|
id=$(config_bundle --merged "$APP" | "$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /tmp/env; cat | tar -x -C /tmp/env")
|
||||||
test "$(docker wait "$id")" -eq 0
|
test "$("$DOCKER_BIN" wait "$id")" -eq 0
|
||||||
docker commit "$id" "$IMAGE" >/dev/null
|
"$DOCKER_BIN" commit "$id" "$IMAGE" >/dev/null
|
||||||
|
|
||||||
# create build env for 'old style' buildpacks and dokku plugins
|
# create build env for 'old style' buildpacks and dokku plugins
|
||||||
id=$(config_export app "$APP" --format envfile --merged | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "cat >> /app/.env")
|
id=$(config_export app "$APP" --format envfile --merged | "$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "cat >> /app/.env")
|
||||||
test "$(docker wait "$id")" -eq 0
|
test "$("$DOCKER_BIN" wait "$id")" -eq 0
|
||||||
docker commit "$id" "$IMAGE" >/dev/null
|
"$DOCKER_BIN" commit "$id" "$IMAGE" >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
build_env_pre_build_buildpack "$@"
|
build_env_pre_build_buildpack "$@"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core buildpacks plugin"
|
description = "dokku core buildpacks plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core certificate management plugin"
|
description = "dokku core certificate management plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core checks plugin"
|
description = "dokku core checks plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ func DirectoryExists(filePath string) bool {
|
|||||||
|
|
||||||
// DockerInspect runs an inspect command with a given format against a container id
|
// DockerInspect runs an inspect command with a given format against a container id
|
||||||
func DockerInspect(containerID, format string) (output string, err error) {
|
func DockerInspect(containerID, format string) (output string, err error) {
|
||||||
b, err := sh.Command("docker", "inspect", "--format", format, containerID).Output()
|
b, err := sh.Command(DockerBin(), "inspect", "--format", format, containerID).Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@@ -253,7 +253,7 @@ func IsImageHerokuishBased(image string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dockerGlobalArgs := os.Getenv("DOKKU_GLOBAL_RUN_ARGS")
|
dockerGlobalArgs := os.Getenv("DOKKU_GLOBAL_RUN_ARGS")
|
||||||
parts := []string{"docker", "run", dockerGlobalArgs, "--entrypoint=\"/bin/sh\"", dockerArgs, image, "-c", "\"test -f /exec\""}
|
parts := []string{DockerBin(), "run", dockerGlobalArgs, "--entrypoint=\"/bin/sh\"", dockerArgs, image, "-c", "\"test -f /exec\""}
|
||||||
|
|
||||||
var dockerCmdParts []string
|
var dockerCmdParts []string
|
||||||
for _, str := range parts {
|
for _, str := range parts {
|
||||||
@@ -339,11 +339,21 @@ func VerifyAppName(appName string) (err error) {
|
|||||||
|
|
||||||
// VerifyImage returns true if docker image exists in local repo
|
// VerifyImage returns true if docker image exists in local repo
|
||||||
func VerifyImage(image string) bool {
|
func VerifyImage(image string) bool {
|
||||||
imageCmd := NewShellCmd(strings.Join([]string{"docker inspect", image}, " "))
|
imageCmd := NewShellCmd(strings.Join([]string{DockerBin(), "inspect", image}, " "))
|
||||||
imageCmd.ShowOutput = false
|
imageCmd.ShowOutput = false
|
||||||
return imageCmd.Execute()
|
return imageCmd.Execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DockerBin returns a string which contains a path to the current docker binary
|
||||||
|
func DockerBin() string {
|
||||||
|
dockerBin := os.Getenv("DOCKER_BIN")
|
||||||
|
if dockerBin == "" {
|
||||||
|
dockerBin = "docker"
|
||||||
|
}
|
||||||
|
|
||||||
|
return dockerBin
|
||||||
|
}
|
||||||
|
|
||||||
//PlugnTrigger fire the given plugn trigger with the given args
|
//PlugnTrigger fire the given plugn trigger with the given args
|
||||||
func PlugnTrigger(triggerName string, args ...string) error {
|
func PlugnTrigger(triggerName string, args ...string) error {
|
||||||
shellArgs := make([]interface{}, len(args)+2)
|
shellArgs := make([]interface{}, len(args)+2)
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ dokku_container_log_verbose_quiet() {
|
|||||||
OIFS=$IFS
|
OIFS=$IFS
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
local line
|
local line
|
||||||
for line in $(docker logs "$CID" 2>&1); do
|
for line in $("$DOCKER_BIN" logs "$CID" 2>&1); do
|
||||||
dokku_log_verbose_quiet "$line"
|
dokku_log_verbose_quiet "$line"
|
||||||
done
|
done
|
||||||
IFS=$OIFS
|
IFS=$OIFS
|
||||||
@@ -203,7 +203,7 @@ verify_app_name() {
|
|||||||
verify_image() {
|
verify_image() {
|
||||||
declare desc="verify image existence"
|
declare desc="verify image existence"
|
||||||
local IMAGE="$1"
|
local IMAGE="$1"
|
||||||
if (docker inspect "$IMAGE" &>/dev/null); then
|
if "$DOCKER_BIN" inspect "$IMAGE" &>/dev/null; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
@@ -282,7 +282,7 @@ get_running_image_tag() {
|
|||||||
verify_app_name "$APP"
|
verify_app_name "$APP"
|
||||||
|
|
||||||
local CIDS=($(get_app_container_ids "$APP"))
|
local CIDS=($(get_app_container_ids "$APP"))
|
||||||
local RUNNING_IMAGE_TAG=$(docker inspect -f '{{ .Config.Image }}' "${CIDS[0]}" 2>/dev/null | awk -F: '{ print $2 }' || echo '')
|
local RUNNING_IMAGE_TAG=$("$DOCKER_BIN" inspect -f '{{ .Config.Image }}' "${CIDS[0]}" 2>/dev/null | awk -F: '{ print $2 }' || echo '')
|
||||||
echo "$RUNNING_IMAGE_TAG"
|
echo "$RUNNING_IMAGE_TAG"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,13 +296,13 @@ is_image_herokuish_based() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# due to how the build process works, all herokuish images have the Environment variable USER=herokuishuser
|
# 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="$("$DOCKER_BIN" inspect -f '{{range .Config.Env}}{{if eq . "USER=herokuishuser" }}{{println .}}{{end}}{{end}}' "$IMAGE")"
|
||||||
[[ "$USER_VALUE" == "" ]] && return 1
|
[[ "$USER_VALUE" == "" ]] && return 1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
get_docker_version() {
|
get_docker_version() {
|
||||||
CLIENT_VERSION_STRING="$(docker version -f="{{ .Client.Version }}")"
|
CLIENT_VERSION_STRING="$("$DOCKER_BIN" version -f="{{ .Client.Version }}")"
|
||||||
echo "$CLIENT_VERSION_STRING"
|
echo "$CLIENT_VERSION_STRING"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,19 +376,19 @@ copy_from_image() {
|
|||||||
if is_image_herokuish_based "$IMAGE"; then
|
if is_image_herokuish_based "$IMAGE"; then
|
||||||
WORKDIR="/app"
|
WORKDIR="/app"
|
||||||
else
|
else
|
||||||
WORKDIR="$(docker inspect -f '{{.Config.WorkingDir}}' "$IMAGE")"
|
WORKDIR="$("$DOCKER_BIN" inspect -f '{{.Config.WorkingDir}}' "$IMAGE")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$WORKDIR" ]]; then
|
if [[ -n "$WORKDIR" ]]; then
|
||||||
SRC_FILE="${WORKDIR}/${SRC_FILE}"
|
SRC_FILE="${WORKDIR}/${SRC_FILE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
local CID=$(docker create "$DOKKU_GLOBAL_RUN_ARGS" "$IMAGE")
|
local CID=$("$DOCKER_BIN" create "$DOKKU_GLOBAL_RUN_ARGS" "$IMAGE")
|
||||||
if ! docker cp "$CID:$SRC_FILE" "$DST_DIR"; then
|
if ! "$DOCKER_BIN" cp "$CID:$SRC_FILE" "$DST_DIR"; then
|
||||||
docker rm -f "$CID" &>/dev/null
|
"$DOCKER_BIN" rm -f "$CID" &>/dev/null
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
docker rm -f "$CID" &>/dev/null
|
"$DOCKER_BIN" rm -f "$CID" &>/dev/null
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@@ -470,7 +470,7 @@ is_container_running() {
|
|||||||
local CONTAINER_STATUS
|
local CONTAINER_STATUS
|
||||||
|
|
||||||
dokku_log_warn "Deprecated: common#is_container_status"
|
dokku_log_warn "Deprecated: common#is_container_status"
|
||||||
CONTAINER_STATUS=$(docker inspect -f '{{.State.Running}}' "$CID" || true)
|
CONTAINER_STATUS=$("$DOCKER_BIN" inspect -f '{{.State.Running}}' "$CID" || true)
|
||||||
|
|
||||||
if [[ "$CONTAINER_STATUS" == "true" ]]; then
|
if [[ "$CONTAINER_STATUS" == "true" ]]; then
|
||||||
return 0
|
return 0
|
||||||
@@ -483,7 +483,7 @@ is_container_status() {
|
|||||||
declare desc="return 0 if given docker container id is in given state"
|
declare desc="return 0 if given docker container id is in given state"
|
||||||
local CID=$1
|
local CID=$1
|
||||||
local TEMPLATE="{{.State.$2}}"
|
local TEMPLATE="{{.State.$2}}"
|
||||||
local CONTAINER_STATUS=$(docker inspect -f "$TEMPLATE" "$CID" 2>/dev/null || true)
|
local CONTAINER_STATUS=$("$DOCKER_BIN" inspect -f "$TEMPLATE" "$CID" 2>/dev/null || true)
|
||||||
|
|
||||||
if [[ "$CONTAINER_STATUS" == "true" ]]; then
|
if [[ "$CONTAINER_STATUS" == "true" ]]; then
|
||||||
return 0
|
return 0
|
||||||
@@ -529,9 +529,9 @@ dokku_build() {
|
|||||||
case "$IMAGE_SOURCE_TYPE" in
|
case "$IMAGE_SOURCE_TYPE" in
|
||||||
herokuish)
|
herokuish)
|
||||||
DOKKU_IMAGE="$(config_get "$APP" DOKKU_IMAGE || echo "$DOKKU_IMAGE")"
|
DOKKU_IMAGE="$(config_get "$APP" DOKKU_IMAGE || echo "$DOKKU_IMAGE")"
|
||||||
cid=$(tar -c . | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$DOKKU_IMAGE" /bin/bash -c "mkdir -p /app && tar -xC /app")
|
cid=$(tar -c . | "$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$DOKKU_IMAGE" /bin/bash -c "mkdir -p /app && tar -xC /app")
|
||||||
test "$(docker wait "$cid")" -eq 0
|
test "$("$DOCKER_BIN" wait "$cid")" -eq 0
|
||||||
docker commit "$cid" "$IMAGE" >/dev/null
|
"$DOCKER_BIN" commit "$cid" "$IMAGE" >/dev/null
|
||||||
[[ -d $DOKKU_APP_CACHE_DIR ]] || mkdir -p "$DOKKU_APP_CACHE_DIR"
|
[[ -d $DOKKU_APP_CACHE_DIR ]] || mkdir -p "$DOKKU_APP_CACHE_DIR"
|
||||||
plugn trigger pre-build-buildpack "$APP"
|
plugn trigger pre-build-buildpack "$APP"
|
||||||
|
|
||||||
@@ -543,10 +543,10 @@ dokku_build() {
|
|||||||
declare -a ARG_ARRAY
|
declare -a ARG_ARRAY
|
||||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
cid=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d -v $DOKKU_APP_HOST_CACHE_DIR:/cache -e CACHE_PATH=/cache "${ARG_ARRAY[@]}" $IMAGE /build)
|
cid=$("$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS -d -v $DOKKU_APP_HOST_CACHE_DIR:/cache -e CACHE_PATH=/cache "${ARG_ARRAY[@]}" $IMAGE /build)
|
||||||
docker attach "$cid"
|
"$DOCKER_BIN" attach "$cid"
|
||||||
test "$(docker wait "$cid")" -eq 0
|
test "$("$DOCKER_BIN" wait "$cid")" -eq 0
|
||||||
docker commit "$cid" "$IMAGE" >/dev/null
|
"$DOCKER_BIN" commit "$cid" "$IMAGE" >/dev/null
|
||||||
|
|
||||||
plugn trigger post-build-buildpack "$APP"
|
plugn trigger post-build-buildpack "$APP"
|
||||||
;;
|
;;
|
||||||
@@ -574,7 +574,7 @@ dokku_build() {
|
|||||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker build "${ARG_ARRAY[@]}" $DOKKU_DOCKER_BUILD_OPTS -t $IMAGE .
|
"$DOCKER_BIN" build "${ARG_ARRAY[@]}" $DOKKU_DOCKER_BUILD_OPTS -t $IMAGE .
|
||||||
|
|
||||||
plugn trigger post-build-dockerfile "$APP"
|
plugn trigger post-build-dockerfile "$APP"
|
||||||
;;
|
;;
|
||||||
@@ -600,14 +600,14 @@ dokku_release() {
|
|||||||
herokuish)
|
herokuish)
|
||||||
plugn trigger pre-release-buildpack "$APP" "$IMAGE_TAG"
|
plugn trigger pre-release-buildpack "$APP" "$IMAGE_TAG"
|
||||||
if [[ -n $(config_export global) ]]; then
|
if [[ -n $(config_export global) ]]; then
|
||||||
cid=$(config_export global | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
|
cid=$(config_export global | "$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
|
||||||
test "$(docker wait "$cid")" -eq 0
|
test "$("$DOCKER_BIN" wait "$cid")" -eq 0
|
||||||
docker commit "$cid" "$IMAGE" >/dev/null
|
"$DOCKER_BIN" commit "$cid" "$IMAGE" >/dev/null
|
||||||
fi
|
fi
|
||||||
if [[ -n $(config_export app "$APP") ]]; then
|
if [[ -n $(config_export app "$APP") ]]; then
|
||||||
cid=$(config_export app "$APP" | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
|
cid=$(config_export app "$APP" | "$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
|
||||||
test "$(docker wait "$cid")" -eq 0
|
test "$("$DOCKER_BIN" wait "$cid")" -eq 0
|
||||||
docker commit "$cid" "$IMAGE" >/dev/null
|
"$DOCKER_BIN" commit "$cid" "$IMAGE" >/dev/null
|
||||||
fi
|
fi
|
||||||
plugn trigger post-release-buildpack "$APP" "$IMAGE_TAG"
|
plugn trigger post-release-buildpack "$APP" "$IMAGE_TAG"
|
||||||
;;
|
;;
|
||||||
@@ -713,15 +713,15 @@ docker_cleanup() {
|
|||||||
|
|
||||||
# delete all non-running containers
|
# delete all non-running containers
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm $(docker ps -a -f "status=exited" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
|
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=exited" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
|
||||||
|
|
||||||
# delete all dead containers
|
# delete all dead containers
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm $(docker ps -a -f "status=dead" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
|
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=dead" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
|
||||||
|
|
||||||
# delete unused images
|
# delete unused images
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rmi $(docker images -f 'dangling=true' -q) &>/dev/null &
|
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -q) &>/dev/null &
|
||||||
}
|
}
|
||||||
|
|
||||||
get_available_port() {
|
get_available_port() {
|
||||||
@@ -797,7 +797,7 @@ get_exposed_ports_from_image() {
|
|||||||
local IMAGE="$1"
|
local IMAGE="$1"
|
||||||
verify_image "$IMAGE"
|
verify_image "$IMAGE"
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
local DOCKER_IMAGE_EXPOSED_PORTS="$(docker inspect -f '{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}' "$IMAGE")"
|
local DOCKER_IMAGE_EXPOSED_PORTS="$("$DOCKER_BIN" inspect -f '{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}' "$IMAGE")"
|
||||||
echo "$DOCKER_IMAGE_EXPOSED_PORTS"
|
echo "$DOCKER_IMAGE_EXPOSED_PORTS"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -805,7 +805,7 @@ get_entrypoint_from_image() {
|
|||||||
declare desc="return .Config.Entrypoint from passed image name"
|
declare desc="return .Config.Entrypoint from passed image name"
|
||||||
local IMAGE="$1"
|
local IMAGE="$1"
|
||||||
verify_image "$IMAGE"
|
verify_image "$IMAGE"
|
||||||
local DOCKER_IMAGE_ENTRYPOINT="$(docker inspect --format '{{range .Config.Entrypoint}}{{.}} {{end}}' "$IMAGE")"
|
local DOCKER_IMAGE_ENTRYPOINT="$("$DOCKER_BIN" inspect --format '{{range .Config.Entrypoint}}{{.}} {{end}}' "$IMAGE")"
|
||||||
echo "ENTRYPOINT $DOCKER_IMAGE_ENTRYPOINT"
|
echo "ENTRYPOINT $DOCKER_IMAGE_ENTRYPOINT"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -813,7 +813,7 @@ get_cmd_from_image() {
|
|||||||
declare desc="return .Config.Cmd from passed image name"
|
declare desc="return .Config.Cmd from passed image name"
|
||||||
local IMAGE="$1"
|
local IMAGE="$1"
|
||||||
verify_image "$IMAGE"
|
verify_image "$IMAGE"
|
||||||
local DOCKER_IMAGE_CMD="$(docker inspect --format '{{range .Config.Cmd}}{{.}} {{end}}' "$IMAGE")"
|
local DOCKER_IMAGE_CMD="$("$DOCKER_BIN" inspect --format '{{range .Config.Cmd}}{{.}} {{end}}' "$IMAGE")"
|
||||||
DOCKER_IMAGE_CMD="${DOCKER_IMAGE_CMD/\/bin\/sh -c/}"
|
DOCKER_IMAGE_CMD="${DOCKER_IMAGE_CMD/\/bin\/sh -c/}"
|
||||||
echo "CMD $DOCKER_IMAGE_CMD"
|
echo "CMD $DOCKER_IMAGE_CMD"
|
||||||
}
|
}
|
||||||
@@ -851,7 +851,7 @@ get_container_ports() {
|
|||||||
local cid
|
local cid
|
||||||
|
|
||||||
for cid in $APP_CIDS; do
|
for cid in $APP_CIDS; do
|
||||||
local container_ports="$(docker port "$cid" | awk '{ print $3 "->" $1}' | awk -F ":" '{ print $2 }')"
|
local container_ports="$("$DOCKER_BIN" port "$cid" | awk '{ print $3 "->" $1}' | awk -F ":" '{ print $2 }')"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "$container_ports"
|
echo "$container_ports"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core common plugin"
|
description = "dokku core common plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core config plugin"
|
description = "dokku core config plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core docker-options plugin"
|
description = "dokku core docker-options plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ is_global_vhost_enabled() {
|
|||||||
is_valid_hostname() {
|
is_valid_hostname() {
|
||||||
declare desc="return 0 if argument is a valid hostname; else return 1"
|
declare desc="return 0 if argument is a valid hostname; else return 1"
|
||||||
local hostname_string="${1,,}"
|
local hostname_string="${1,,}"
|
||||||
local hostname_regex='^([a-z0-9\.\*-]+\.)*[a-z0-9\*-]+$'
|
local hostname_regex='^[a-z0-9\.\*-]*[a-z0-9\*-]$'
|
||||||
if [[ $hostname_string =~ $hostname_regex ]]; then
|
if [[ $hostname_string =~ $hostname_regex ]]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core domains plugin"
|
description = "dokku core domains plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core enter plugin"
|
description = "dokku core enter plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ enter_default_cmd() {
|
|||||||
has_tty && local DOKKU_RUN_OPTS+=" -i -t"
|
has_tty && local DOKKU_RUN_OPTS+=" -i -t"
|
||||||
is_image_herokuish_based "$IMAGE" && local EXEC_CMD="/exec"
|
is_image_herokuish_based "$IMAGE" && local EXEC_CMD="/exec"
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker exec $DOKKU_RUN_OPTS $ID $EXEC_CMD "${@:-$DOKKU_APP_SHELL}"
|
"$DOCKER_BIN" exec $DOKKU_RUN_OPTS $ID $EXEC_CMD "${@:-$DOKKU_APP_SHELL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
enter_default_cmd "$@"
|
enter_default_cmd "$@"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core git plugin"
|
description = "dokku core git plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core logs plugin"
|
description = "dokku core logs plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ func GetContainerPort(appName, processType string, isHerokuishContainer bool, co
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmd := sh.Command("docker", "port", containerID, port)
|
cmd := sh.Command(common.DockerBin(), "port", containerID, port)
|
||||||
cmd.Stderr = ioutil.Discard
|
cmd.Stderr = ioutil.Discard
|
||||||
b, err := cmd.Output()
|
b, err := cmd.Output()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core network plugin"
|
description = "dokku core network plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core nginx-vhosts plugin"
|
description = "dokku core nginx-vhosts plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core plugin plugin"
|
description = "dokku core plugin plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core proxy plugin"
|
description = "dokku core proxy plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -118,6 +118,13 @@ set_scale() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ps_restore() {
|
||||||
|
declare desc="restores app"
|
||||||
|
local APP="$1"
|
||||||
|
|
||||||
|
ps_start "$APP"
|
||||||
|
}
|
||||||
|
|
||||||
ps_start() {
|
ps_start() {
|
||||||
declare desc="starts app"
|
declare desc="starts app"
|
||||||
local APP="$1"
|
local APP="$1"
|
||||||
@@ -222,27 +229,9 @@ get_restart_policies() {
|
|||||||
|
|
||||||
fn-ps-app-status() {
|
fn-ps-app-status() {
|
||||||
declare APP="$1"
|
declare APP="$1"
|
||||||
local PROCS=0 RUNNING=""
|
|
||||||
local APP_CIDS=$(get_app_container_ids "$APP")
|
|
||||||
|
|
||||||
for CID in $APP_CIDS; do
|
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||||
if (is_container_status "$CID" "Running"); then
|
plugn trigger scheduler-app-status "$DOKKU_SCHEDULER" "$APP"
|
||||||
RUNNING+="0"
|
|
||||||
else
|
|
||||||
RUNNING+="1"
|
|
||||||
fi
|
|
||||||
PROCS=$((PROCS + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ "${#RUNNING}" -eq 0 ]] || [[ "${#RUNNING}" -ne 0 ]] && [[ "$RUNNING" != *"0"* ]]; then
|
|
||||||
RUNNING="false"
|
|
||||||
elif [[ "$RUNNING" != *"1"* ]] && [[ "${#RUNNING}" -ne 0 ]]; then
|
|
||||||
RUNNING="true"
|
|
||||||
else
|
|
||||||
RUNNING="mixed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$PROCS $RUNNING"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn-ps-is-app-running() {
|
fn-ps-is-app-running() {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
[[ $DOKKU_TRACE ]] && set -x
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
@@ -61,7 +62,7 @@ cmd-ps-report-single() {
|
|||||||
local APP_CONTAINER_STATUS
|
local APP_CONTAINER_STATUS
|
||||||
for CONTAINER_FILE in $CONTAINER_FILES; do
|
for CONTAINER_FILE in $CONTAINER_FILES; do
|
||||||
CID=$(<"$DOKKU_ROOT/$APP/$CONTAINER_FILE")
|
CID=$(<"$DOKKU_ROOT/$APP/$CONTAINER_FILE")
|
||||||
APP_CONTAINER_STATUS=$(docker inspect -f '{{.State.Status}}' "$CID" 2>/dev/null || true)
|
APP_CONTAINER_STATUS=$("$DOCKER_BIN" inspect -f '{{.State.Status}}' "$CID" 2>/dev/null || true)
|
||||||
[[ -z "$APP_CONTAINER_STATUS" ]] && APP_CONTAINER_STATUS="missing"
|
[[ -z "$APP_CONTAINER_STATUS" ]] && APP_CONTAINER_STATUS="missing"
|
||||||
STATUSES+=("${CONTAINER_FILE#*.}:$APP_CONTAINER_STATUS#${CID:0:12}")
|
STATUSES+=("${CONTAINER_FILE#*.}:$APP_CONTAINER_STATUS#${CID:0:12}")
|
||||||
done
|
done
|
||||||
@@ -117,3 +118,53 @@ cmd-ps-report-single() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn-ps-parallel-cmd() {
|
||||||
|
declare desc="Run a ps command against all apps"
|
||||||
|
declare CMD="$1"
|
||||||
|
local GNU_PARALLEL has_apps=false
|
||||||
|
|
||||||
|
for APP in $(dokku_apps); do
|
||||||
|
has_apps=true
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "$has_apps" == "false" ]]; then
|
||||||
|
dokku_log_info1 "No apps detected"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if which parallel >/dev/null 2>&1; then
|
||||||
|
dokku_log_info1 "Running 'dokku ps:${CMD}' in parallel"
|
||||||
|
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
|
||||||
|
if [[ -z "$GNU_PARALLEL" ]]; then
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
parallel $DOKKU_PARALLEL_ARGUMENTS -i bash -c "dokku ps:${CMD} {}" -- $(dokku_apps)
|
||||||
|
else
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
dokku_apps | parallel $DOKKU_PARALLEL_ARGUMENTS "dokku ps:${CMD} {}"
|
||||||
|
fi
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
dokku_log_info1 "Running 'dokku ps:${CMD}' in serially"
|
||||||
|
for APP in $(dokku_apps); do
|
||||||
|
if ! (is_deployed "$APP"); then
|
||||||
|
dokku_log_warn "App $APP has not been deployed"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$CMD" == "restore" ]]; then
|
||||||
|
local DOKKU_APP_RESTORE=$(config_get "$APP" DOKKU_APP_RESTORE || true)
|
||||||
|
if [[ "$DOKKU_APP_RESTORE" == 0 ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
dokku_log_verbose "Running 'dokku ps:${CMD} $APP' ..."
|
||||||
|
if ps_${CMD} "$APP"; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
dokku_log_warn "dokku ps:${CMD} $APP failed"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core ps plugin"
|
description = "dokku core ps plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ ps_main_cmd() {
|
|||||||
has_tty && local DOKKU_RUN_OPTS="-i -t"
|
has_tty && local DOKKU_RUN_OPTS="-i -t"
|
||||||
dokku_log_info1_quiet "running processes in container: $CID"
|
dokku_log_info1_quiet "running processes in container: $CID"
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker exec $DOKKU_RUN_OPTS $CID /bin/sh -c "ps auxwww"
|
"$DOCKER_BIN" exec $DOKKU_RUN_OPTS $CID /bin/sh -c "ps auxwww"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,38 +2,13 @@
|
|||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
[[ $DOKKU_TRACE ]] && set -x
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
|
||||||
|
|
||||||
ps_rebuildall_cmd() {
|
ps_rebuildall_cmd() {
|
||||||
declare desc="rebuilds all apps from source"
|
declare desc="rebuilds all apps from source"
|
||||||
local cmd="ps:rebuildall"
|
local cmd="ps:rebuildall"
|
||||||
local GNU_PARALLEL
|
|
||||||
|
|
||||||
if which parallel >/dev/null 2>&1; then
|
fn-ps-parallel-cmd "rebuild"
|
||||||
dokku_log_info1 "Rebuilding in parallel"
|
|
||||||
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
|
|
||||||
if [[ -z "$GNU_PARALLEL" ]]; then
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
parallel -i bash -c "dokku ps:rebuild {}" -- $(dokku_apps)
|
|
||||||
else
|
|
||||||
dokku_apps | parallel 'dokku ps:rebuild {}'
|
|
||||||
fi
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
for app in $(dokku_apps); do
|
|
||||||
if ! (is_deployed "$app"); then
|
|
||||||
dokku_log_warn "App $app has not been deployed"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
dokku_log_verbose "Rebuilding app $app ..."
|
|
||||||
if ps_rebuild "$app"; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
dokku_log_warn "dokku ps:rebuild ${app} failed"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ps_rebuildall_cmd "$@"
|
ps_rebuildall_cmd "$@"
|
||||||
|
|||||||
@@ -2,38 +2,13 @@
|
|||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
[[ $DOKKU_TRACE ]] && set -x
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
|
||||||
|
|
||||||
ps_restartall_cmd() {
|
ps_restartall_cmd() {
|
||||||
declare desc="restarts all apps via command line"
|
declare desc="restarts all apps via command line"
|
||||||
local cmd="ps:restartall"
|
local cmd="ps:restartall"
|
||||||
local GNU_PARALLEL
|
|
||||||
|
|
||||||
if which parallel >/dev/null 2>&1; then
|
fn-ps-parallel-cmd "restart"
|
||||||
dokku_log_info1 "Restarting in parallel"
|
|
||||||
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
|
|
||||||
if [[ -z "$GNU_PARALLEL" ]]; then
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
parallel -i bash -c "dokku ps:restart {}" -- $(dokku_apps)
|
|
||||||
else
|
|
||||||
dokku_apps | parallel 'dokku ps:restart {}'
|
|
||||||
fi
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
for app in $(dokku_apps); do
|
|
||||||
if ! (is_deployed "$app"); then
|
|
||||||
dokku_log_warn "App $app has not been deployed"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
dokku_log_verbose "Restarting app $app ..."
|
|
||||||
if ps_restart "$app"; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
dokku_log_warn "dokku ps:restart ${app} failed"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ps_restartall_cmd "$@"
|
ps_restartall_cmd "$@"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ set -eo pipefail
|
|||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
|
||||||
|
|
||||||
ps_restore_cmd() {
|
ps_restore_cmd() {
|
||||||
declare desc="starts all apps with DOKKU_APP_RESTORE not set to 0 via command line"
|
declare desc="starts all apps with DOKKU_APP_RESTORE not set to 0 via command line"
|
||||||
@@ -12,7 +13,7 @@ ps_restore_cmd() {
|
|||||||
local DOKKU_SCHEDULER
|
local DOKKU_SCHEDULER
|
||||||
|
|
||||||
DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||||
plugn trigger pre-restore "$DOKKU_SCHEDULER"
|
plugn trigger pre-restore "$DOKKU_SCHEDULER" "$APP"
|
||||||
|
|
||||||
if [[ -n "$APP" ]]; then
|
if [[ -n "$APP" ]]; then
|
||||||
if ! (is_deployed "$APP"); then
|
if ! (is_deployed "$APP"); then
|
||||||
@@ -22,43 +23,11 @@ ps_restore_cmd() {
|
|||||||
|
|
||||||
DOKKU_APP_RESTORE="$(config_get "$APP" DOKKU_APP_RESTORE || true)"
|
DOKKU_APP_RESTORE="$(config_get "$APP" DOKKU_APP_RESTORE || true)"
|
||||||
if [[ $DOKKU_APP_RESTORE != 0 ]]; then
|
if [[ $DOKKU_APP_RESTORE != 0 ]]; then
|
||||||
ps_start "$APP" || dokku_log_warn "dokku ps:restore ${APP} failed"
|
ps_restore "$APP" || dokku_log_warn "dokku ps:restore ${APP} failed"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
ps_restore_all
|
fn-ps-parallel-cmd "restore"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
ps_restore_all() {
|
|
||||||
local GNU_PARALLEL
|
|
||||||
|
|
||||||
if which parallel >/dev/null 2>&1; then
|
|
||||||
dokku_log_info1 "Restarting in parallel"
|
|
||||||
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
|
|
||||||
if [[ -z "$GNU_PARALLEL" ]]; then
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
parallel -i bash -c "dokku ps:restore {}" -- $(dokku_apps)
|
|
||||||
else
|
|
||||||
dokku_apps | parallel 'dokku ps:restore {}'
|
|
||||||
fi
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
for app in $(dokku_apps); do
|
|
||||||
if ! (is_deployed "$app"); then
|
|
||||||
dokku_log_warn "App $app has not been deployed"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
local DOKKU_APP_RESTORE=$(config_get "$app" DOKKU_APP_RESTORE || true)
|
|
||||||
if [[ $DOKKU_APP_RESTORE != 0 ]]; then
|
|
||||||
dokku_log_verbose "Restoring app $app ..."
|
|
||||||
if ps_start "$app"; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
dokku_log_warn "dokku ps:restore ${app} failed"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
ps_restore_cmd "$@"
|
ps_restore_cmd "$@"
|
||||||
|
|||||||
@@ -2,38 +2,13 @@
|
|||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
[[ $DOKKU_TRACE ]] && set -x
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
|
||||||
|
|
||||||
ps_startall_cmd() {
|
ps_startall_cmd() {
|
||||||
declare desc="starts all apps via command line"
|
declare desc="starts all apps via command line"
|
||||||
local cmd="ps:startall"
|
local cmd="ps:startall"
|
||||||
local GNU_PARALLEL
|
|
||||||
|
|
||||||
if which parallel >/dev/null 2>&1; then
|
fn-ps-parallel-cmd "start"
|
||||||
dokku_log_info1 "Starting in parallel"
|
|
||||||
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
|
|
||||||
if [[ -z "$GNU_PARALLEL" ]]; then
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
parallel -i bash -c "dokku ps:start {}" -- $(dokku_apps)
|
|
||||||
else
|
|
||||||
dokku_apps | parallel 'dokku ps:start {}'
|
|
||||||
fi
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
for app in $(dokku_apps); do
|
|
||||||
if ! (is_deployed "$app"); then
|
|
||||||
dokku_log_warn "App $app has not been deployed"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
dokku_log_verbose "Starting app $app ..."
|
|
||||||
if ps_start "$app"; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
dokku_log_warn "dokku ps:start ${app} failed"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ps_startall_cmd "$@"
|
ps_startall_cmd "$@"
|
||||||
|
|||||||
@@ -2,38 +2,13 @@
|
|||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
[[ $DOKKU_TRACE ]] && set -x
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
|
||||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
|
||||||
|
|
||||||
ps_stopall_cmd() {
|
ps_stopall_cmd() {
|
||||||
declare desc="stops all apps via command line"
|
declare desc="stops all apps via command line"
|
||||||
local cmd="ps:stopall"
|
local cmd="ps:stopall"
|
||||||
local GNU_PARALLEL
|
|
||||||
|
|
||||||
if which parallel >/dev/null 2>&1; then
|
fn-ps-parallel-cmd "stop"
|
||||||
dokku_log_info1 "Stopping in parallel"
|
|
||||||
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
|
|
||||||
if [[ -z "$GNU_PARALLEL" ]]; then
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
parallel -i bash -c "dokku ps:stop {}" -- $(dokku_apps)
|
|
||||||
else
|
|
||||||
dokku_apps | parallel 'dokku ps:stop {}'
|
|
||||||
fi
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
for app in $(dokku_apps); do
|
|
||||||
if ! (is_deployed "$app"); then
|
|
||||||
dokku_log_warn "App $app has not been deployed"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
dokku_log_verbose "Stopping app $app ..."
|
|
||||||
if ps_stop "$app"; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
dokku_log_warn "dokku ps:stop ${app} failed"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ps_stopall_cmd "$@"
|
ps_stopall_cmd "$@"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core repo plugin"
|
description = "dokku core repo plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ func main() {
|
|||||||
dokkuGlobalRunArgs := common.MustGetEnv("DOKKU_GLOBAL_RUN_ARGS")
|
dokkuGlobalRunArgs := common.MustGetEnv("DOKKU_GLOBAL_RUN_ARGS")
|
||||||
image := common.GetDeployingAppImageName(appName, "", "")
|
image := common.GetDeployingAppImageName(appName, "", "")
|
||||||
if info, _ := os.Stat(cacheDir); info != nil && info.IsDir() {
|
if info, _ := os.Stat(cacheDir); info != nil && info.IsDir() {
|
||||||
purgeCacheCmd := common.NewShellCmd(strings.Join([]string{"docker run --rm", dokkuGlobalRunArgs,
|
purgeCacheCmd := common.NewShellCmd(strings.Join([]string{
|
||||||
|
common.DockerBin(),
|
||||||
|
"run --rm", dokkuGlobalRunArgs,
|
||||||
"-v", strings.Join([]string{cacheHostDir, ":/cache"}, ""), image,
|
"-v", strings.Join([]string{cacheHostDir, ":/cache"}, ""), image,
|
||||||
`find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} ;`}, " "))
|
`find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} ;`}, " "))
|
||||||
purgeCacheCmd.Execute()
|
purgeCacheCmd.Execute()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core resource plugin"
|
description = "dokku core resource plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ func main() {
|
|||||||
appName := flag.Arg(0)
|
appName := flag.Arg(0)
|
||||||
processType := flag.Arg(3)
|
processType := flag.Arg(3)
|
||||||
|
|
||||||
|
if os.Getenv("DOKKU_OMIT_RESOURCE_ARGS") == "1" {
|
||||||
|
fmt.Print(string(stdin))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
resources, err := common.PropertyGetAll("resource", appName)
|
resources, err := common.PropertyGetAll("resource", appName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Print(string(stdin))
|
fmt.Print(string(stdin))
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ scheduler-docker-local-check-deploy() {
|
|||||||
# after successfully copying the file. Thus, we suppress stderr.
|
# after successfully copying the file. Thus, we suppress stderr.
|
||||||
# ref: https://github.com/dotcloud/docker/issues/3986
|
# ref: https://github.com/dotcloud/docker/issues/3986
|
||||||
local CHECK_DEPLOY_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku-${FUNCNAME[0]}.XXXX")
|
local CHECK_DEPLOY_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku-${FUNCNAME[0]}.XXXX")
|
||||||
docker cp "$DOKKU_APP_CONTAINER_ID:/app/CHECKS" "$CHECK_DEPLOY_TMP_WORK_DIR" 2>/dev/null || true
|
"$DOCKER_BIN" cp "$DOKKU_APP_CONTAINER_ID:/app/CHECKS" "$CHECK_DEPLOY_TMP_WORK_DIR" 2>/dev/null || true
|
||||||
|
|
||||||
local FILENAME=${CHECK_DEPLOY_TMP_WORK_DIR}/CHECKS
|
local FILENAME=${CHECK_DEPLOY_TMP_WORK_DIR}/CHECKS
|
||||||
|
|
||||||
@@ -119,10 +119,10 @@ scheduler-docker-local-check-deploy() {
|
|||||||
sleep "$DOKKU_DEFAULT_CHECKS_WAIT"
|
sleep "$DOKKU_DEFAULT_CHECKS_WAIT"
|
||||||
|
|
||||||
! (is_container_status "$DOKKU_APP_CONTAINER_ID" "Running") && dokku_log_fail "App container failed to start!!"
|
! (is_container_status "$DOKKU_APP_CONTAINER_ID" "Running") && dokku_log_fail "App container failed to start!!"
|
||||||
local container_restarts="$(docker inspect -f "{{ .RestartCount }}" "$DOKKU_APP_CONTAINER_ID")"
|
local container_restarts="$("$DOCKER_BIN" inspect -f "{{ .RestartCount }}" "$DOKKU_APP_CONTAINER_ID")"
|
||||||
if [[ $container_restarts -ne 0 ]]; then
|
if [[ $container_restarts -ne 0 ]]; then
|
||||||
docker container update --restart=no "$DOKKU_APP_CONTAINER_ID" &>/dev/null || true
|
"$DOCKER_BIN" container update --restart=no "$DOKKU_APP_CONTAINER_ID" &>/dev/null || true
|
||||||
docker stop "$DOKKU_APP_CONTAINER_ID" || true
|
"$DOCKER_BIN" stop "$DOKKU_APP_CONTAINER_ID" || true
|
||||||
dokku_log_fail "App container failed to start!!"
|
dokku_log_fail "App container failed to start!!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -36,26 +36,26 @@ scheduler-docker-local-core-post-deploy() {
|
|||||||
local NAME="$APP.$DYNO"
|
local NAME="$APP.$DYNO"
|
||||||
local CURRENT_CONTAINER_ID="$(<"$container")"
|
local CURRENT_CONTAINER_ID="$(<"$container")"
|
||||||
# TODO: Ensure these are from the current service
|
# TODO: Ensure these are from the current service
|
||||||
local PREVIOUS_CIDS=$(docker ps -a -q -f name="^.?$NAME\$" | xargs) || true
|
local PREVIOUS_CIDS=$("$DOCKER_BIN" ps -a -q -f name="^.?$NAME\$" | xargs) || true
|
||||||
if [[ -n $PREVIOUS_CIDS ]]; then
|
if [[ -n $PREVIOUS_CIDS ]]; then
|
||||||
dokku_log_info1_quiet "Found previous container(s) ($PREVIOUS_CIDS) named $NAME"
|
dokku_log_info1_quiet "Found previous container(s) ($PREVIOUS_CIDS) named $NAME"
|
||||||
# in case $PREVIOUS_CIDS has more than one entry
|
# in case $PREVIOUS_CIDS has more than one entry
|
||||||
local cid
|
local cid
|
||||||
for cid in $PREVIOUS_CIDS; do
|
for cid in $PREVIOUS_CIDS; do
|
||||||
local PREVIOUS_CONTAINER_STATUS=$(docker inspect -f '{{.State.Status}}' "$cid" || echo "dead")
|
local PREVIOUS_CONTAINER_STATUS=$("$DOCKER_BIN" inspect -f '{{.State.Status}}' "$cid" || echo "dead")
|
||||||
# dead containers cannot be renamed
|
# dead containers cannot be renamed
|
||||||
if [[ "$PREVIOUS_CONTAINER_STATUS" != "dead" ]]; then
|
if [[ "$PREVIOUS_CONTAINER_STATUS" != "dead" ]]; then
|
||||||
local CONTAINER_DATE_NAME="$NAME.$(date +%s)"
|
local CONTAINER_DATE_NAME="$NAME.$(date +%s)"
|
||||||
dokku_log_info2_quiet "Renaming container ($cid) ${NAME} to $CONTAINER_DATE_NAME"
|
dokku_log_info2_quiet "Renaming container ($cid) ${NAME} to $CONTAINER_DATE_NAME"
|
||||||
docker rename "$NAME" "$CONTAINER_DATE_NAME" >/dev/null 2>&1 || dokku_log_warn "Unable to rename container"
|
"$DOCKER_BIN" rename "$NAME" "$CONTAINER_DATE_NAME" >/dev/null 2>&1 || dokku_log_warn "Unable to rename container"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
local ID=$(cat "$container")
|
local ID=$(cat "$container")
|
||||||
local CURRENT_NAME=$(docker inspect -f '{{.Name}}' "$ID" | tr -d /)
|
local CURRENT_NAME=$("$DOCKER_BIN" inspect -f '{{.Name}}' "$ID" | tr -d /)
|
||||||
if [[ -n "$CURRENT_NAME" ]]; then
|
if [[ -n "$CURRENT_NAME" ]]; then
|
||||||
dokku_log_info2_quiet "Renaming container (${ID:0:12}) $CURRENT_NAME to $NAME"
|
dokku_log_info2_quiet "Renaming container (${ID:0:12}) $CURRENT_NAME to $NAME"
|
||||||
docker rename "$CURRENT_NAME" "$NAME" >/dev/null
|
"$DOCKER_BIN" rename "$CURRENT_NAME" "$NAME" >/dev/null
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
shopt -u nullglob
|
shopt -u nullglob
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ fn-scheduler-docker-local-retire-container() {
|
|||||||
declare APP="$1" CID="$2" DEAD_TIME="$3"
|
declare APP="$1" CID="$2" DEAD_TIME="$3"
|
||||||
local STATE
|
local STATE
|
||||||
|
|
||||||
STATE="$(docker inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
|
STATE="$("$DOCKER_BIN" inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
|
||||||
if [[ -z "$STATE" ]]; then
|
if [[ -z "$STATE" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
@@ -104,7 +104,7 @@ fn-scheduler-docker-local-retire-container() {
|
|||||||
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
|
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
|
||||||
|
|
||||||
if [[ "$STATE" == "restarting" ]]; then
|
if [[ "$STATE" == "restarting" ]]; then
|
||||||
docker update --restart=no "$CID" >/dev/null 2>&1
|
"$DOCKER_BIN" update --restart=no "$CID" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$STATE" != "dead" ]] && [[ "$STATE" != "exited" ]]; then
|
if [[ "$STATE" != "dead" ]] && [[ "$STATE" != "exited" ]]; then
|
||||||
@@ -112,18 +112,18 @@ fn-scheduler-docker-local-retire-container() {
|
|||||||
# to not send SIGKILL as the docs would indicate. If that fails, move
|
# to not send SIGKILL as the docs would indicate. If that fails, move
|
||||||
# on to the next.
|
# on to the next.
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker stop $DOCKER_STOP_TIME_ARG "$CID" \
|
"$DOCKER_BIN" stop $DOCKER_STOP_TIME_ARG "$CID" \
|
||||||
|| docker kill "$CID" \
|
|| "$DOCKER_BIN" kill "$CID" \
|
||||||
|| dokku_log_warn "Unable to kill container ${CID}"
|
|| dokku_log_warn "Unable to kill container ${CID}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
STATE="$(docker inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
|
STATE="$("$DOCKER_BIN" inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
|
||||||
if [[ -z "$STATE" ]]; then
|
if [[ -z "$STATE" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$STATE" != "dead" ]] && [[ "$STATE" != "exited" ]]; then
|
if [[ "$STATE" != "dead" ]] && [[ "$STATE" != "exited" ]]; then
|
||||||
if ! docker kill "$CID"; then
|
if ! "$DOCKER_BIN" kill "$CID"; then
|
||||||
dokku_log_warn "Unable to kill container ${CID}"
|
dokku_log_warn "Unable to kill container ${CID}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core scheduler-docker-local plugin"
|
description = "dokku core scheduler-docker-local plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ scheduler-docker-local-post-delete() {
|
|||||||
|
|
||||||
# remove all application containers & images
|
# remove all application containers & images
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
local DOKKU_APP_CIDS=$(docker ps -a --no-trunc | egrep "dokku/${APP}:" | awk '{ print $1 }' | xargs)
|
local DOKKU_APP_CIDS=$("$DOCKER_BIN" ps -a --no-trunc | egrep "dokku/${APP}:" | awk '{ print $1 }' | xargs)
|
||||||
if [[ -n "$DOKKU_APP_CIDS" ]]; then
|
if [[ -n "$DOKKU_APP_CIDS" ]]; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker rm -f $DOKKU_APP_CIDS >/dev/null 2>&1 || true
|
"$DOCKER_BIN" rm -f $DOKKU_APP_CIDS >/dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rmi $(docker images -q "$IMAGE_REPO" | xargs) &>/dev/null || true
|
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -q "$IMAGE_REPO" | xargs) &>/dev/null || true
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduler-docker-local-post-delete "$@"
|
scheduler-docker-local-post-delete "$@"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ scheduler-docker-local-pre-deploy() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker run $DOKKU_GLOBAL_RUN_ARGS "${ARG_ARRAY[@]}" $IMAGE /bin/bash -c "find $CONTAINER_PATHS -not -user $DOKKU_APP_USER -print0 | xargs -0 -r chown -R $DOKKU_APP_USER" || true
|
"$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS "${ARG_ARRAY[@]}" $IMAGE /bin/bash -c "find $CONTAINER_PATHS -not -user $DOKKU_APP_USER -print0 | xargs -0 -r chown -R $DOKKU_APP_USER" || true
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduler-docker-local-pre-deploy "$@"
|
scheduler-docker-local-pre-deploy "$@"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ scheduler-docker-local-pre-restore() {
|
|||||||
|
|
||||||
# delete all "old" containers
|
# delete all "old" containers
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm $(docker ps --format "{{.Names}}" -a -f "label=$DOKKU_CONTAINER_LABEL" -q | grep -E '(.+\..+\.[0-9]+\.[0-9]+$)') &>/dev/null || true
|
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps --format "{{.Names}}" -a -f "label=$DOKKU_CONTAINER_LABEL" -q | grep -E '(.+\..+\.[0-9]+\.[0-9]+$)') &>/dev/null || true
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduler-docker-local-pre-restore "$@"
|
scheduler-docker-local-pre-restore "$@"
|
||||||
|
|||||||
38
plugins/scheduler-docker-local/scheduler-app-status
Executable file
38
plugins/scheduler-docker-local/scheduler-app-status
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail
|
||||||
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
|
||||||
|
scheduler-app-status() {
|
||||||
|
declare desc="fetches the status for a given app"
|
||||||
|
declare trigger="scheduler-docker-local scheduler-app-status"
|
||||||
|
declare DOKKU_SCHEDULER="$1" APP="$2"
|
||||||
|
|
||||||
|
if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local PROCS=0 RUNNING=""
|
||||||
|
local APP_CIDS=$(get_app_container_ids "$APP")
|
||||||
|
|
||||||
|
for CID in $APP_CIDS; do
|
||||||
|
if (is_container_status "$CID" "Running"); then
|
||||||
|
RUNNING+="0"
|
||||||
|
else
|
||||||
|
RUNNING+="1"
|
||||||
|
fi
|
||||||
|
PROCS=$((PROCS + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "${#RUNNING}" -eq 0 ]] || [[ "${#RUNNING}" -ne 0 ]] && [[ "$RUNNING" != *"0"* ]]; then
|
||||||
|
RUNNING="false"
|
||||||
|
elif [[ "$RUNNING" != *"1"* ]] && [[ "${#RUNNING}" -ne 0 ]]; then
|
||||||
|
RUNNING="true"
|
||||||
|
else
|
||||||
|
RUNNING="mixed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$PROCS $RUNNING"
|
||||||
|
}
|
||||||
|
|
||||||
|
scheduler-app-status "$@"
|
||||||
@@ -52,10 +52,10 @@ scheduler-docker-local-scheduler-deploy() {
|
|||||||
dokku_log_info2 "stopping $APP.$PROC_TYPE ($cid)"
|
dokku_log_info2 "stopping $APP.$PROC_TYPE ($cid)"
|
||||||
|
|
||||||
# Disable the container restart policy
|
# Disable the container restart policy
|
||||||
docker container update --restart=no "$cid" &>/dev/null || true
|
"$DOCKER_BIN" container update --restart=no "$cid" &>/dev/null || true
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker stop $DOCKER_STOP_TIME_ARG "$cid" &>/dev/null
|
"$DOCKER_BIN" stop $DOCKER_STOP_TIME_ARG "$cid" &>/dev/null
|
||||||
# remove cid from oldids to skip the old container finish processing
|
# remove cid from oldids to skip the old container finish processing
|
||||||
oldids="$(remove_val_from_list "$cid" "$oldids" " ")"
|
oldids="$(remove_val_from_list "$cid" "$oldids" " ")"
|
||||||
done
|
done
|
||||||
@@ -94,16 +94,16 @@ scheduler-docker-local-scheduler-deploy() {
|
|||||||
START_CMD=$(fn-scheduler-docker-local-extract-start-cmd "$APP" "$PROC_TYPE" "$START_CMD" "$DOKKU_HEROKUISH" "$DOKKU_PORT")
|
START_CMD=$(fn-scheduler-docker-local-extract-start-cmd "$APP" "$PROC_TYPE" "$START_CMD" "$DOKKU_HEROKUISH" "$DOKKU_PORT")
|
||||||
if [[ "$DOKKU_NETWORK_BIND_ALL" == "false" ]]; then
|
if [[ "$DOKKU_NETWORK_BIND_ALL" == "false" ]]; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
cid=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d -e PORT=$DOKKU_PORT "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
|
cid=$("$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS -d -e PORT=$DOKKU_PORT "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
|
||||||
else
|
else
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
cid=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $DOKKU_DOCKER_PORT_ARGS -e PORT=$DOKKU_PORT "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
|
cid=$("$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS -d $DOKKU_DOCKER_PORT_ARGS -e PORT=$DOKKU_PORT "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
START_CMD=$(fn-scheduler-docker-local-extract-start-cmd "$APP" "$PROC_TYPE" "$START_CMD" "$DOKKU_HEROKUISH")
|
START_CMD=$(fn-scheduler-docker-local-extract-start-cmd "$APP" "$PROC_TYPE" "$START_CMD" "$DOKKU_HEROKUISH")
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
cid=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
|
cid=$("$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS -d "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ipaddr=$(plugn trigger network-get-ipaddr "$APP" "$PROC_TYPE" "$cid")
|
ipaddr=$(plugn trigger network-get-ipaddr "$APP" "$PROC_TYPE" "$cid")
|
||||||
@@ -114,10 +114,10 @@ scheduler-docker-local-scheduler-deploy() {
|
|||||||
declare CID="$1" PROC_TYPE="$2" CONTAINER_INDEX="$3"
|
declare CID="$1" PROC_TYPE="$2" CONTAINER_INDEX="$3"
|
||||||
mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP"
|
mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP"
|
||||||
echo "${CID} ${PROC_TYPE}.${CONTAINER_INDEX}" >>"${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/failed-containers"
|
echo "${CID} ${PROC_TYPE}.${CONTAINER_INDEX}" >>"${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/failed-containers"
|
||||||
docker inspect "$CID" &>/dev/null && {
|
"$DOCKER_BIN" inspect "$CID" &>/dev/null && {
|
||||||
# Disable the container restart policy
|
# Disable the container restart policy
|
||||||
docker container update --restart=no "$CID" &>/dev/null || true
|
"$DOCKER_BIN" container update --restart=no "$CID" &>/dev/null || true
|
||||||
docker stop "$CID" >/dev/null && docker kill "$CID" &>/dev/null
|
"$DOCKER_BIN" stop "$CID" >/dev/null && "$DOCKER_BIN" kill "$CID" &>/dev/null
|
||||||
}
|
}
|
||||||
trap - INT TERM EXIT
|
trap - INT TERM EXIT
|
||||||
kill -9 $$
|
kill -9 $$
|
||||||
@@ -181,14 +181,14 @@ scheduler-docker-local-scheduler-deploy() {
|
|||||||
sleep "$WAIT"
|
sleep "$WAIT"
|
||||||
for oldid in $oldids; do
|
for oldid in $oldids; do
|
||||||
# Disable the container restart policy
|
# Disable the container restart policy
|
||||||
docker container update --restart=no "$oldid" &>/dev/null || true
|
"$DOCKER_BIN" container update --restart=no "$oldid" &>/dev/null || true
|
||||||
|
|
||||||
# Attempt to stop, if that fails, then force a kill as docker seems
|
# Attempt to stop, if that fails, then force a kill as docker seems
|
||||||
# to not send SIGKILL as the docs would indicate. If that fails, move
|
# to not send SIGKILL as the docs would indicate. If that fails, move
|
||||||
# on to the next.
|
# on to the next.
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker stop $DOCKER_STOP_TIME_ARG "$oldid" \
|
"$DOCKER_BIN" stop $DOCKER_STOP_TIME_ARG "$oldid" \
|
||||||
|| docker kill "$oldid" \
|
|| "$DOCKER_BIN" kill "$oldid" \
|
||||||
|| plugn trigger retire-container-failed "$APP" "$oldid" # plugin trigger for event logging
|
|| plugn trigger retire-container-failed "$APP" "$oldid" # plugin trigger for event logging
|
||||||
done
|
done
|
||||||
) &
|
) &
|
||||||
|
|||||||
@@ -14,15 +14,15 @@ scheduler-docker-local-scheduler-docker-cleanup() {
|
|||||||
|
|
||||||
# delete all non-running containers
|
# delete all non-running containers
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm $(docker ps -a -f "status=exited" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
|
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=exited" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
|
||||||
|
|
||||||
# delete all dead containers
|
# delete all dead containers
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm $(docker ps -a -f "status=dead" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
|
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=dead" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
|
||||||
|
|
||||||
# delete unused images
|
# delete unused images
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rmi $(docker images -f 'dangling=true' -q) &>/dev/null &
|
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -q) &>/dev/null &
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduler-docker-local-scheduler-docker-cleanup "$@"
|
scheduler-docker-local-scheduler-docker-cleanup "$@"
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ EOF
|
|||||||
for CONTAINER_FILE in $CONTAINER_FILES; do
|
for CONTAINER_FILE in $CONTAINER_FILES; do
|
||||||
CIDS+="$(<"$DOKKU_ROOT/$APP/$CONTAINER_FILE")"
|
CIDS+="$(<"$DOKKU_ROOT/$APP/$CONTAINER_FILE")"
|
||||||
done
|
done
|
||||||
docker inspect "${CIDS[@]}" | python2.7 "$TMP_INSPECT_CMD"
|
"$DOCKER_BIN" inspect "${CIDS[@]}" | python2.7 "$TMP_INSPECT_CMD"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,10 @@ scheduler-docker-local-scheduler-logs() {
|
|||||||
local CID=$(<"${CONTAINERS[i]}")
|
local CID=$(<"${CONTAINERS[i]}")
|
||||||
local COLOR=${COLORS[i % ${#COLORS[*]}]}
|
local COLOR=${COLORS[i % ${#COLORS[*]}]}
|
||||||
if [[ $PRETTY_PRINT == "true" ]]; then
|
if [[ $PRETTY_PRINT == "true" ]]; then
|
||||||
local DOKKU_LOGS_CMD+="(docker logs $DOKKU_LOGS_ARGS $CID 2>&1)"
|
local DOKKU_LOGS_CMD+="($DOCKER_BIN logs $DOKKU_LOGS_ARGS $CID 2>&1)"
|
||||||
else
|
else
|
||||||
local DOKKU_LOGS_PRETTY_PRINT_CMD="sed -r 's/^([^Z]+Z )/\x1b[${COLOR}m\1app[$DYNO]:\x1b[0m /gm'"
|
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)"
|
local DOKKU_LOGS_CMD+="($DOCKER_BIN logs -t $DOKKU_LOGS_ARGS $CID 2>&1 | $DOKKU_LOGS_PRETTY_PRINT_CMD)"
|
||||||
fi
|
fi
|
||||||
if [[ $i != "$MAX_INDEX" ]]; then
|
if [[ $i != "$MAX_INDEX" ]]; then
|
||||||
local DOKKU_LOGS_CMD+="& "
|
local DOKKU_LOGS_CMD+="& "
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ scheduler-docker-local-scheduler-logs-failed() {
|
|||||||
while read -r LINE || [[ -n "$LINE" ]]; do
|
while read -r LINE || [[ -n "$LINE" ]]; do
|
||||||
CID="$(echo "$LINE" | cut -d ' ' -f1)"
|
CID="$(echo "$LINE" | cut -d ' ' -f1)"
|
||||||
PREFIX="$(echo "$LINE" | cut -d ' ' -f2)"
|
PREFIX="$(echo "$LINE" | cut -d ' ' -f2)"
|
||||||
if docker inspect "${CID}" >/dev/null 2>&1; then
|
if "$DOCKER_BIN" inspect "${CID}" >/dev/null 2>&1; then
|
||||||
RUNNING_CONTAINERS+=("$CID")
|
RUNNING_CONTAINERS+=("$CID")
|
||||||
else
|
else
|
||||||
DEAD_CONTAINERS+=("$CID")
|
DEAD_CONTAINERS+=("$CID")
|
||||||
@@ -44,7 +44,7 @@ scheduler-docker-local-scheduler-logs-failed() {
|
|||||||
((MAX_INDEX = ${#RUNNING_CONTAINERS[*]} - 1)) || true
|
((MAX_INDEX = ${#RUNNING_CONTAINERS[*]} - 1)) || true
|
||||||
for i in ${!RUNNING_CONTAINERS[*]}; do
|
for i in ${!RUNNING_CONTAINERS[*]}; do
|
||||||
local CID="${RUNNING_CONTAINERS[i]}"
|
local CID="${RUNNING_CONTAINERS[i]}"
|
||||||
DOKKU_LOGS_CMD+="(docker logs $DOKKU_LOGS_ARGS $CID 2>&1)"
|
DOKKU_LOGS_CMD+="($DOCKER_BIN logs $DOKKU_LOGS_ARGS $CID 2>&1)"
|
||||||
if [[ $i != "$MAX_INDEX" ]]; then
|
if [[ $i != "$MAX_INDEX" ]]; then
|
||||||
local DOKKU_LOGS_CMD+="& "
|
local DOKKU_LOGS_CMD+="& "
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ scheduler-docker-local-scheduler-retire() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
fn-scheduler-docker-local-retire-container "$APP" "$CID" "$DEAD_TIME"
|
fn-scheduler-docker-local-retire-container "$APP" "$CID" "$DEAD_TIME"
|
||||||
STATE="$(docker inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
|
STATE="$("$DOCKER_BIN" inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
|
||||||
if [[ -z "$STATE" ]]; then
|
if [[ -z "$STATE" ]]; then
|
||||||
DEAD_CONTAINERS+=("$CID")
|
DEAD_CONTAINERS+=("$CID")
|
||||||
continue
|
continue
|
||||||
@@ -38,8 +38,8 @@ scheduler-docker-local-scheduler-retire() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker rm -f "$CID" >/dev/null 2>&1 || true
|
"$DOCKER_BIN" rm -f "$CID" >/dev/null 2>&1 || true
|
||||||
if docker inspect "${CID}" >/dev/null 2>&1; then
|
if "$DOCKER_BIN" inspect "${CID}" >/dev/null 2>&1; then
|
||||||
dokku_log_warn "Container ${CID} still running"
|
dokku_log_warn "Container ${CID} still running"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ scheduler-docker-local-scheduler-run() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker run $DOKKU_GLOBAL_RUN_ARGS "${DOCKER_ARGS_ARRAY[@]}" $IMAGE $EXEC_CMD "$@"
|
"$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS "${DOCKER_ARGS_ARRAY[@]}" $IMAGE $EXEC_CMD "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduler-docker-local-scheduler-run "$@"
|
scheduler-docker-local-scheduler-run "$@"
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ scheduler-docker-local-scheduler-stop() {
|
|||||||
if [[ -n "$DOKKU_APP_RUNNING_CONTAINER_IDS" ]]; then
|
if [[ -n "$DOKKU_APP_RUNNING_CONTAINER_IDS" ]]; then
|
||||||
# Disable the container restart policy
|
# Disable the container restart policy
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker container update --restart=no $DOKKU_APP_RUNNING_CONTAINER_IDS &>/dev/null || true
|
"$DOCKER_BIN" container update --restart=no $DOKKU_APP_RUNNING_CONTAINER_IDS &>/dev/null || true
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker stop $DOCKER_STOP_TIME_ARG $DOKKU_APP_RUNNING_CONTAINER_IDS >/dev/null || true
|
"$DOCKER_BIN" stop $DOCKER_STOP_TIME_ARG $DOKKU_APP_RUNNING_CONTAINER_IDS >/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$REMOVE_CONTAINERS" == "true" ]]; then
|
if [[ "$REMOVE_CONTAINERS" == "true" ]]; then
|
||||||
@@ -32,7 +32,7 @@ scheduler-docker-local-scheduler-stop() {
|
|||||||
|
|
||||||
if [[ -n "$DOKKU_APP_CIDS" ]]; then
|
if [[ -n "$DOKKU_APP_CIDS" ]]; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker rm -f $DOKKU_APP_CIDS >/dev/null 2>&1 || true
|
"$DOCKER_BIN" rm -f $DOKKU_APP_CIDS >/dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ scheduler-docker-local-scheduler-tags-create() {
|
|||||||
local TAG_OPTS=""
|
local TAG_OPTS=""
|
||||||
[[ $(is_tag_force_available) ]] && TAG_OPTS="-f"
|
[[ $(is_tag_force_available) ]] && TAG_OPTS="-f"
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
docker tag $TAG_OPTS "$SOURCE_IMAGE" "$TARGET_IMAGE"
|
"$DOCKER_BIN" tag $TAG_OPTS "$SOURCE_IMAGE" "$TARGET_IMAGE"
|
||||||
}
|
}
|
||||||
|
|
||||||
is_tag_force_available() {
|
is_tag_force_available() {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ scheduler-docker-local-scheduler-tags-destroy() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker rmi "$IMAGE_REPO:$IMAGE_TAG"
|
"$DOCKER_BIN" rmi "$IMAGE_REPO:$IMAGE_TAG"
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduler-docker-local-scheduler-tags-destroy "$@"
|
scheduler-docker-local-scheduler-tags-destroy "$@"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core shell plugin"
|
description = "dokku core shell plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core ssh-keys plugin"
|
description = "dokku core ssh-keys plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ add_keys() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local count="$(wc -l "$KEY_FILE" | awk '{ print $1; }')"
|
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>"
|
# Don't check for "-eq 1" as no newlines is also a valid SSH key
|
||||||
|
[[ "$count" -lt 2 ]] || 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"
|
ssh-keygen -lf "$KEY_FILE" &>/dev/null || dokku_log_fail "Key specified in is not a valid ssh public key"
|
||||||
create_ssh_key_file
|
create_ssh_key_file
|
||||||
verify_ssh_key_exists
|
verify_ssh_key_exists
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core storage plugin"
|
description = "dokku core storage plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core tags plugin"
|
description = "dokku core tags plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ tags_main_cmd() {
|
|||||||
verify_app_name "$APP"
|
verify_app_name "$APP"
|
||||||
|
|
||||||
dokku_log_info2_quiet "Image tags for $IMAGE_REPO"
|
dokku_log_info2_quiet "Image tags for $IMAGE_REPO"
|
||||||
docker images "$IMAGE_REPO"
|
"$DOCKER_BIN" images "$IMAGE_REPO"
|
||||||
}
|
}
|
||||||
|
|
||||||
tags_main_cmd "$@"
|
tags_main_cmd "$@"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core tar plugin"
|
description = "dokku core tar plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ trace_help_content_func() {
|
|||||||
declare desc="return trace plugin help content"
|
declare desc="return trace plugin help content"
|
||||||
cat <<help_content
|
cat <<help_content
|
||||||
trace, [DEPRECATED] Enables/Disables trace mode
|
trace, [DEPRECATED] Enables/Disables trace mode
|
||||||
trace:on, Clones an app
|
trace:on, Enable trace mode
|
||||||
trace:off, Create a new app
|
trace:off, Disable trace mode
|
||||||
help_content
|
help_content
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core trace plugin"
|
description = "dokku core trace plugin"
|
||||||
version = "0.17.2"
|
version = "0.17.8"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
2
rpm.mk
2
rpm.mk
@@ -63,10 +63,8 @@ endif
|
|||||||
--depends '/usr/bin/docker' \
|
--depends '/usr/bin/docker' \
|
||||||
--depends 'bind-utils' \
|
--depends 'bind-utils' \
|
||||||
--depends 'curl' \
|
--depends 'curl' \
|
||||||
--depends 'gcc' \
|
|
||||||
--depends 'git' \
|
--depends 'git' \
|
||||||
--depends 'gliderlabs-sigil' \
|
--depends 'gliderlabs-sigil' \
|
||||||
--depends 'make' \
|
|
||||||
--depends 'man-db' \
|
--depends 'man-db' \
|
||||||
--depends 'nc' \
|
--depends 'nc' \
|
||||||
--depends 'nginx >= 1.8.0' \
|
--depends 'nginx >= 1.8.0' \
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ teardown() {
|
|||||||
deploy_app
|
deploy_app
|
||||||
|
|
||||||
create_attach_network
|
create_attach_network
|
||||||
run dokku nginx:build-config "$TEST_APP"
|
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_success
|
assert_success
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ setup() {
|
|||||||
# now create key that will be really used
|
# now create key that will be really used
|
||||||
create_key
|
create_key
|
||||||
|
|
||||||
|
# Test key without a trailing newline
|
||||||
|
echo -n "$KEY" > /tmp/testkey-no-newline.pub
|
||||||
|
|
||||||
# the temporary key is useful for adding in the file with two keys
|
# the temporary key is useful for adding in the file with two keys
|
||||||
# useful for a negative test
|
# useful for a negative test
|
||||||
{ cat /tmp/testkey.pub ; echo "$KEY" ; } > /tmp/testkey-double.pub
|
{ cat /tmp/testkey.pub ; echo "$KEY" ; } > /tmp/testkey-double.pub
|
||||||
@@ -70,6 +73,10 @@ teardown() {
|
|||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
echo "status: $status"
|
echo "status: $status"
|
||||||
assert_success
|
assert_success
|
||||||
|
run /bin/bash -c "dokku ssh-keys:add name5 /tmp/testkey-no-newline.pub"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
|
||||||
# leave this as the last test in the sequence! It introduces an error in authorized_keys
|
# leave this as the last test in the sequence! It introduces an error in authorized_keys
|
||||||
run /bin/bash -c 'echo invalid >> "${DOKKU_ROOT:-/home/dokku}/.ssh/authorized_keys"'
|
run /bin/bash -c 'echo invalid >> "${DOKKU_ROOT:-/home/dokku}/.ssh/authorized_keys"'
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ load test_helper
|
|||||||
setup() {
|
setup() {
|
||||||
global_setup
|
global_setup
|
||||||
deploy_app
|
deploy_app
|
||||||
|
rm -f /tmp/fake-docker-bin
|
||||||
}
|
}
|
||||||
|
|
||||||
teardown() {
|
teardown() {
|
||||||
|
rm -f /tmp/fake-docker-bin
|
||||||
destroy_app
|
destroy_app
|
||||||
global_teardown
|
global_teardown
|
||||||
}
|
}
|
||||||
@@ -46,3 +48,33 @@ teardown() {
|
|||||||
|
|
||||||
dokku --force apps:destroy "${TEST_APP}-2"
|
dokku --force apps:destroy "${TEST_APP}-2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "(report) custom docker bin" {
|
||||||
|
export DOCKER_BIN="docker"
|
||||||
|
run /bin/bash -c "dokku report"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_output_contains "herokuish version:"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
export DOCKER_BIN="/usr/bin/docker"
|
||||||
|
run /bin/bash -c "dokku report"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_output_contains "herokuish version:"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
touch /tmp/fake-docker-bin
|
||||||
|
echo '#!/usr/bin/env bash' >/tmp/fake-docker-bin
|
||||||
|
echo '/usr/bin/docker "$@"' >>/tmp/fake-docker-bin
|
||||||
|
chmod +x /tmp/fake-docker-bin
|
||||||
|
|
||||||
|
export DOCKER_BIN="/tmp/fake-docker-bin"
|
||||||
|
run /bin/bash -c "dokku report"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_output_contains "herokuish version:"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
unset DOCKER_BIN
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user