Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
767ba96186 | ||
|
|
55213e1045 | ||
|
|
1843d42e0b | ||
|
|
065f5e5922 | ||
|
|
f7beb3d95d | ||
|
|
c09dfb8ec8 | ||
|
|
87b90e96b6 | ||
|
|
e556be1a0d | ||
|
|
88fddf2a6d | ||
|
|
97fe71a829 | ||
|
|
988cdbd6bb | ||
|
|
be84325de1 | ||
|
|
e7d9d6b19e | ||
|
|
bd378e8a44 | ||
|
|
82da43cfba | ||
|
|
a96ad0c10c | ||
|
|
670e679a09 | ||
|
|
7115839fd5 |
32
HISTORY.md
32
HISTORY.md
@@ -1,5 +1,37 @@
|
||||
# History
|
||||
|
||||
## 0.23.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.23.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4388: @josegonzalez Do not inject max-size option when not using local or json-file log-drivers
|
||||
- #4386: @josegonzalez Update to docker-image-labeler that handles in-use images
|
||||
|
||||
### New Features
|
||||
|
||||
- #4387: @josegonzalez Only warn if the vector container is stopped when fetching logs
|
||||
- #4372: @josegonzalez Add ability to clear an individual resource
|
||||
- #4384: @josegonzalez Add support for injected cron entries from external plugins
|
||||
|
||||
### Refactors
|
||||
|
||||
- #4373: @josegonzalez Do not attempt to extract Procfile in ps:scale
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4377: @josegonzalez Add note about the dokku user cron being overwritten by Dokku
|
||||
|
||||
### Other
|
||||
|
||||
- #3757: @pickettd Add provision line to Windows Vagrant box for dokku-installer
|
||||
|
||||
## 0.23.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
DOKKU_VERSION ?= master
|
||||
|
||||
DOCKER_IMAGE_LABELER_VERSION ?= 0.2.0
|
||||
DOCKER_IMAGE_LABELER_VERSION ?= 0.2.2
|
||||
HEROKUISH_VERSION ?= 0.5.19
|
||||
PLUGN_VERSION ?= 0.6.1
|
||||
PROCFILE_VERSION ?= 0.11.0
|
||||
|
||||
@@ -99,8 +99,8 @@ Otherwise, you will need to import the keypair manually after installation using
|
||||
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.23.1 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.23.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
|
||||
1
Vagrantfile
vendored
1
Vagrantfile
vendored
@@ -74,6 +74,7 @@ Vagrant::configure("2") do |config|
|
||||
vm.vm.network :private_network, ip: DOKKU_IP
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update -qq >/dev/null && apt-get -qq -y --no-install-recommends install git dos2unix >/dev/null"
|
||||
vm.vm.provision :shell, :inline => "cd /vagrant/ && export DOKKU_BRANCH=`git symbolic-ref -q --short HEAD 2>/dev/null` && export DOKKU_TAG=`git describe --tags --exact-match 2>/dev/null` && cd /root/ && cp /vagrant/bootstrap.sh ./ && dos2unix bootstrap.sh && bash bootstrap.sh"
|
||||
vm.vm.provision :shell, :inline => "cd /root/dokku && make dokku-installer"
|
||||
end
|
||||
|
||||
config.vm.define "dokku-deb", autostart: false do |vm|
|
||||
|
||||
@@ -15,7 +15,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.23.1'
|
||||
VERSION = 'v0.23.2'
|
||||
|
||||
def bytes_to_string(b):
|
||||
if type(b) == bytes:
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -1,9 +1,9 @@
|
||||
Package: dokku
|
||||
Version: 0.23.1
|
||||
Version: 0.23.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.0), net-tools, software-properties-common, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsyslog, dos2unix, jq
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), net-tools, software-properties-common, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsyslog, dos2unix, jq
|
||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update, dokku-event-listener
|
||||
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
|
||||
@@ -35,35 +35,35 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.23.1 enabled dokku core standard plugin
|
||||
20_events 0.23.1 enabled dokku core events logging plugin
|
||||
app-json 0.23.1 enabled dokku core app-json plugin
|
||||
apps 0.23.1 enabled dokku core apps plugin
|
||||
build-env 0.23.1 enabled dokku core build-env plugin
|
||||
buildpacks 0.23.1 enabled dokku core buildpacks plugin
|
||||
certs 0.23.1 enabled dokku core certificate management plugin
|
||||
checks 0.23.1 enabled dokku core checks plugin
|
||||
common 0.23.1 enabled dokku core common plugin
|
||||
config 0.23.1 enabled dokku core config plugin
|
||||
docker-options 0.23.1 enabled dokku core docker-options plugin
|
||||
domains 0.23.1 enabled dokku core domains plugin
|
||||
enter 0.23.1 enabled dokku core enter plugin
|
||||
git 0.23.1 enabled dokku core git plugin
|
||||
logs 0.23.1 enabled dokku core logs plugin
|
||||
network 0.23.1 enabled dokku core network plugin
|
||||
nginx-vhosts 0.23.1 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.23.1 enabled dokku core plugin plugin
|
||||
proxy 0.23.1 enabled dokku core proxy plugin
|
||||
ps 0.23.1 enabled dokku core ps plugin
|
||||
repo 0.23.1 enabled dokku core repo plugin
|
||||
resource 0.23.1 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.23.1 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.23.1 enabled dokku core shell plugin
|
||||
ssh-keys 0.23.1 enabled dokku core ssh-keys plugin
|
||||
storage 0.23.1 enabled dokku core storage plugin
|
||||
tags 0.23.1 enabled dokku core tags plugin
|
||||
tar 0.23.1 enabled dokku core tar plugin
|
||||
trace 0.23.1 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.23.2 enabled dokku core standard plugin
|
||||
20_events 0.23.2 enabled dokku core events logging plugin
|
||||
app-json 0.23.2 enabled dokku core app-json plugin
|
||||
apps 0.23.2 enabled dokku core apps plugin
|
||||
build-env 0.23.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.23.2 enabled dokku core buildpacks plugin
|
||||
certs 0.23.2 enabled dokku core certificate management plugin
|
||||
checks 0.23.2 enabled dokku core checks plugin
|
||||
common 0.23.2 enabled dokku core common plugin
|
||||
config 0.23.2 enabled dokku core config plugin
|
||||
docker-options 0.23.2 enabled dokku core docker-options plugin
|
||||
domains 0.23.2 enabled dokku core domains plugin
|
||||
enter 0.23.2 enabled dokku core enter plugin
|
||||
git 0.23.2 enabled dokku core git plugin
|
||||
logs 0.23.2 enabled dokku core logs plugin
|
||||
network 0.23.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.23.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.23.2 enabled dokku core plugin plugin
|
||||
proxy 0.23.2 enabled dokku core proxy plugin
|
||||
ps 0.23.2 enabled dokku core ps plugin
|
||||
repo 0.23.2 enabled dokku core repo plugin
|
||||
resource 0.23.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.23.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.23.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.23.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.23.2 enabled dokku core storage plugin
|
||||
tags 0.23.2 enabled dokku core tags plugin
|
||||
tar 0.23.2 enabled dokku core tar plugin
|
||||
trace 0.23.2 enabled dokku core trace plugin
|
||||
```
|
||||
|
||||
> Warning: All plugin commands other than `plugin:list` and `plugin:help` require sudo access and must be run directly from the Dokku server.
|
||||
|
||||
@@ -71,6 +71,17 @@ dokku resource:limit --cpu 100 --memory 100 --process-type worker node-js-app
|
||||
memory: 100
|
||||
```
|
||||
|
||||
A resource value can be individually cleared by setting the value to the special value `clear`.
|
||||
|
||||
```shell
|
||||
dokku resource:limit --cpu clear node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Setting resource limits for node-js-app
|
||||
cpu: cleared
|
||||
```
|
||||
|
||||
#### Displaying Resource Limits
|
||||
|
||||
Running the `resource:limit` command without any flags will display the currently configured default app limits.
|
||||
@@ -169,6 +180,17 @@ dokku resource:reserve --cpu 100 --memory 100 --process-type worker node-js-app
|
||||
memory: 100
|
||||
```
|
||||
|
||||
A resource value can be individually cleared by setting the value to the special value `clear`.
|
||||
|
||||
```shell
|
||||
dokku resource:reserve --cpu clear node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Setting resource reservation for node-js-app
|
||||
cpu: cleared
|
||||
```
|
||||
|
||||
#### Displaying Resource Reservations
|
||||
|
||||
Running the `resource:reserve` command without any flags will display the currently configured default app reservations.
|
||||
|
||||
@@ -4,3 +4,5 @@
|
||||
|
||||
- The `plugin:list` command no longer outputs the version for the `plugn` binary.
|
||||
- Users building docker images that run Dokku will need to use a new sudoer wrapper for the `docker-image-labeler` binary to work correctly. A reference version has been placed in the `docker` skeleton directory. This should only impact platform developers, and users of our Docker image will already have the file available.
|
||||
- The `dokku` user's cron is now in use by Dokku itself. Customizations will be overwritten. Users are encouraged to use a cron entry in `/etc/cron.d/dokku` to avoid this issue.
|
||||
- As of 0.23.0, Dokku will now inject the `max-size` log driver option for applications. This is restricted to app-configured log driver values empty, `local` or `json-file` in 0.23.1 to increase setup compatibility. Users who configure alternative log drivers at the system level will need to either set the global `max-size` property to `unlimited` or switch to the built-in `vector` logging support.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.1\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.1\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.1\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.1\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.1\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.1\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -39,13 +39,13 @@ h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
"0.20.4",
|
||||
"0.21.4",
|
||||
"0.22.9",
|
||||
"0.23.1"
|
||||
"0.23.2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -309,6 +309,40 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
curl "http://httpstat.us/200"
|
||||
```
|
||||
|
||||
### `cron-write`
|
||||
|
||||
- Description: Force triggers writing out cron entries
|
||||
- Invoked by:
|
||||
- Arguments:
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `cron-entries`
|
||||
|
||||
- Description: Allows injecting cron entries into the written out scheduled cron task list. Each entry is newline delimited, and individual entries come in the form `$SCHEDULE;$FULL_COMMAND;$ARBITRARY_DATA`. Individual implementations of cron writing can decide whether and how to include these cron entries. The `ARBITRARY_DATA` includes the log file path for the basic `docker-local` cron implementation.
|
||||
- Invoked by:
|
||||
- Arguments: `$DOKKU_SCHEDULER`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
DOKKU_SCHEDULER="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `dependencies`
|
||||
|
||||
- Description: Used to install system-level dependencies.
|
||||
|
||||
@@ -29,7 +29,7 @@ The workflow looks like this:
|
||||
```shell
|
||||
# having dokku-arch in ../dokku-arch
|
||||
vagrant up build-arch
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.23.1-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.23.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.23.1
|
||||
docker pull dokku/dokku:0.23.2
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
@@ -17,7 +17,7 @@ docker run \
|
||||
--publish 8443:443 \
|
||||
--volume /var/lib/dokku:/mnt/dokku \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
dokku/dokku:0.23.1
|
||||
dokku/dokku:0.23.2
|
||||
```
|
||||
|
||||
Dokku is run in the following configuration:
|
||||
|
||||
@@ -21,8 +21,8 @@ To install the latest stable version of Dokku, you can run the following shell c
|
||||
|
||||
```shell
|
||||
# for debian systems, installs Dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.1/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.23.1 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.2/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.23.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.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.23.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
.sponsors {
|
||||
@@ -130,12 +130,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.23.1/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.23.2/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.23.1 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.23.2 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
|
||||
@@ -141,7 +141,7 @@ For tasks that will properly resume, you *should* use the above method, as runni
|
||||
|
||||
Regularly scheduled tasks can be a bit of a pain with Dokku. The following are general recommendations to follow to help ensure successful task runs.
|
||||
|
||||
- Use the `dokku` user's crontab.
|
||||
- Use the `dokku` user in your cron entry.
|
||||
- If you do not, the `dokku` binary will attempt to execute with `sudo`, and your cron run with fail with `sudo: no tty present and no askpass program specified`.
|
||||
- Add a `MAILTO` environment variable to ship cron emails to yourself.
|
||||
- Add a `PATH` environment variable or specify the full path to binaries on the host.
|
||||
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.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.23.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -42,7 +42,7 @@
|
||||
</script>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.1/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/20_events/cron-entries
Symbolic link
1
plugins/20_events/cron-entries
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/cron-write
Symbolic link
1
plugins/20_events/cron-write
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-cnb plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-dockerfile plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-herokuish plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core buildpacks plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core config plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/cron/.gitignore
vendored
1
plugins/cron/.gitignore
vendored
@@ -2,5 +2,6 @@
|
||||
/subcommands/*
|
||||
/triggers/*
|
||||
/triggers
|
||||
/cron-*
|
||||
/post-*
|
||||
/report
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SUBCOMMANDS = subcommands/list subcommands/report
|
||||
TRIGGERS = triggers/post-delete triggers/post-deploy triggers/report
|
||||
TRIGGERS = triggers/cron-write triggers/post-delete triggers/post-deploy triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = cron
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
appjson "github.com/dokku/dokku/plugins/app-json"
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
@@ -17,10 +17,23 @@ import (
|
||||
)
|
||||
|
||||
type templateCommand struct {
|
||||
ID string
|
||||
App string
|
||||
Command string
|
||||
Schedule string
|
||||
ID string
|
||||
App string
|
||||
Command string
|
||||
Schedule string
|
||||
AltCommand string
|
||||
LogFile string
|
||||
}
|
||||
|
||||
func (t templateCommand) CronCommand() string {
|
||||
if t.AltCommand != "" {
|
||||
if t.LogFile != "" {
|
||||
return fmt.Sprintf("%s &>> %s", t.AltCommand, t.LogFile)
|
||||
}
|
||||
return t.AltCommand
|
||||
}
|
||||
|
||||
return fmt.Sprintf("dokku --rm run --cron-id %s %s", t.ID, t.App, t.Command)
|
||||
}
|
||||
|
||||
func fetchCronEntries(appName string) ([]templateCommand, error) {
|
||||
@@ -86,11 +99,7 @@ func deleteCrontab() error {
|
||||
}
|
||||
|
||||
func writeCronEntries() error {
|
||||
apps, err := common.DokkuApps()
|
||||
if err != nil {
|
||||
return deleteCrontab()
|
||||
}
|
||||
|
||||
apps, _ := common.DokkuApps()
|
||||
commands := []templateCommand{}
|
||||
for _, appName := range apps {
|
||||
scheduler := common.GetAppScheduler(appName)
|
||||
@@ -106,6 +115,30 @@ func writeCronEntries() error {
|
||||
commands = append(commands, c...)
|
||||
}
|
||||
|
||||
b, _ := common.PlugnTriggerOutput("cron-entries", "docker-local")
|
||||
common.Log(fmt.Sprintf("output: %s", string(b)))
|
||||
for _, line := range strings.Split(strings.TrimSpace(string(b[:])), "\n") {
|
||||
if strings.TrimSpace(line) == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
parts := strings.Split(line, ";")
|
||||
if len(parts) != 2 && len(parts) != 3 {
|
||||
return fmt.Errorf("Invalid injected cron task: %v", line)
|
||||
}
|
||||
|
||||
id := base64.StdEncoding.EncodeToString([]byte(strings.Join(parts, ";;;")))
|
||||
command := templateCommand{
|
||||
ID: id,
|
||||
Schedule: parts[0],
|
||||
AltCommand: parts[1],
|
||||
}
|
||||
if len(parts) == 3 {
|
||||
command.LogFile = parts[2]
|
||||
}
|
||||
commands = append(commands, command)
|
||||
}
|
||||
|
||||
if len(commands) == 0 {
|
||||
return deleteCrontab()
|
||||
}
|
||||
@@ -119,7 +152,7 @@ func writeCronEntries() error {
|
||||
return err
|
||||
}
|
||||
|
||||
tmpFile, err := ioutil.TempFile(os.TempDir(), fmt.Sprintf("dokku-%s-%s", common.MustGetEnv("DOKKU_PID"), "CopyFromImage"))
|
||||
tmpFile, err := ioutil.TempFile(os.TempDir(), fmt.Sprintf("dokku-%s-%s", common.MustGetEnv("DOKKU_PID"), "WriteCronEntries"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("Cannot create temporary schedule file: %v", err)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core cron plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -18,6 +18,8 @@ func main() {
|
||||
|
||||
var err error
|
||||
switch trigger {
|
||||
case "cron-write":
|
||||
err = cron.TriggerCronWrite()
|
||||
case "post-delete":
|
||||
err = cron.TriggerPostDelete()
|
||||
case "post-deploy":
|
||||
|
||||
@@ -2,5 +2,5 @@ PATH=/usr/local/bin:/usr/bin:/bin
|
||||
SHELL=/bin/bash
|
||||
|
||||
{{ range $entry := .Commands -}}
|
||||
{{ $entry.Schedule }} dokku --rm run --cron-id {{ $entry.ID }} {{ $entry.App }} {{ $entry.Command }}
|
||||
{{ $entry.Schedule }} {{ $entry.CronCommand }}
|
||||
{{ end -}}
|
||||
|
||||
@@ -9,3 +9,8 @@ func TriggerPostDelete() error {
|
||||
func TriggerPostDeploy() error {
|
||||
return writeCronEntries()
|
||||
}
|
||||
|
||||
// TriggerCronWrite force updates the cron file for all apps
|
||||
func TriggerCronWrite() error {
|
||||
return writeCronEntries()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core docker-options plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core domains plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core enter plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core git plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -5,9 +5,11 @@ go 1.15
|
||||
require (
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27
|
||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||
github.com/dokku/dokku/plugins/docker-options v0.0.0-20210208020425-f7beb3d95ddd
|
||||
github.com/joncalhoun/qson v0.0.0-20200422171543-84433dcd3da0
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
)
|
||||
|
||||
replace github.com/dokku/dokku/plugins/common => ../common
|
||||
replace github.com/dokku/dokku/plugins/docker-options => ../docker-options
|
||||
|
||||
@@ -4,6 +4,7 @@ github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4qu
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/joncalhoun/qson v0.0.0-20200422171543-84433dcd3da0 h1:ct2XA1aDw8A07Dr8gtrrZgIgLKcZNAl2o9nn0WRMK4Y=
|
||||
github.com/joncalhoun/qson v0.0.0-20200422171543-84433dcd3da0/go.mod h1:DFXrEwSRX0p/aSvxE21319menCBFeQO0jXpRj7LEZUA=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 h1:utdYOikI1XjNtTFGCwSM6OmFJblU4ld4gACoJsbadJg=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core logs plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -88,7 +88,7 @@ func CommandVectorLogs(lines int, tail bool) error {
|
||||
}
|
||||
|
||||
if !common.ContainerIsRunning(vectorContainerName) {
|
||||
return errors.New("Vector container is not running")
|
||||
common.LogWarn("Vector container is not running")
|
||||
}
|
||||
|
||||
common.LogInfo1Quiet("Vector container logs")
|
||||
|
||||
@@ -6,8 +6,10 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
dockeroptions "github.com/dokku/dokku/plugins/docker-options"
|
||||
)
|
||||
|
||||
// TriggerDockerArgsProcessDeploy outputs the logs plugin docker options for an app
|
||||
@@ -17,13 +19,38 @@ func TriggerDockerArgsProcessDeploy(appName string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
maxSize := common.PropertyGet("logs", appName, "max-size")
|
||||
if maxSize == "" {
|
||||
maxSize = common.PropertyGetDefault("logs", "--global", "max-size", MaxSize)
|
||||
allowedDrivers := map[string]bool{
|
||||
"local": true,
|
||||
"json-file": true,
|
||||
}
|
||||
|
||||
if maxSize != "unlimited" {
|
||||
fmt.Printf(" --log-opt max-size=%s ", maxSize)
|
||||
ignoreMaxSize := false
|
||||
options, err := dockeroptions.GetDockerOptionsForPhase(appName, "deploy")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, option := range options {
|
||||
if !strings.HasPrefix(option, "--log-driver=") {
|
||||
continue
|
||||
}
|
||||
|
||||
logDriver := strings.TrimPrefix(option, "--log-driver=")
|
||||
if !allowedDrivers[logDriver] {
|
||||
ignoreMaxSize = true
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
if !ignoreMaxSize {
|
||||
maxSize := common.PropertyGet("logs", appName, "max-size")
|
||||
if maxSize == "" {
|
||||
maxSize = common.PropertyGetDefault("logs", "--global", "max-size", MaxSize)
|
||||
}
|
||||
|
||||
if maxSize != "unlimited" {
|
||||
fmt.Printf(" --log-opt max-size=%s ", maxSize)
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Print(string(stdin))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core network plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core nginx-vhosts plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core plugin plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core proxy plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/ps/.gitignore
vendored
1
plugins/ps/.gitignore
vendored
@@ -9,3 +9,4 @@
|
||||
/pre-*
|
||||
/procfile-*
|
||||
/app-restart
|
||||
/core-post-deploy
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ps plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -121,21 +121,6 @@ func CommandScale(appName string, skipDeploy bool, processTuples []string) error
|
||||
}
|
||||
|
||||
procfilePath := getProcfilePath(appName)
|
||||
if !common.FileExists(procfilePath) {
|
||||
extract := func() error {
|
||||
image, err := common.GetDeployingAppImageName(appName, "", "")
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return extractProcfile(appName, image)
|
||||
}
|
||||
|
||||
if err := common.SuppressOutput(extract); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if !hasScaleFile(appName) || common.FileExists(procfilePath) {
|
||||
update := func() error {
|
||||
return updateScalefile(appName, make(map[string]int))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core repo plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -86,10 +86,17 @@ func setResourceType(appName string, processType string, r Resource, resourceTyp
|
||||
continue
|
||||
}
|
||||
|
||||
common.LogVerbose(fmt.Sprintf("%v: %v", key, value))
|
||||
property := propertyKey(processType, resourceType, key)
|
||||
err := common.PropertyWrite("resource", appName, property, value)
|
||||
if err != nil {
|
||||
if value == "clear" {
|
||||
common.LogVerbose(fmt.Sprintf("%v: cleared", key))
|
||||
if err := common.PropertyDelete("resource", appName, property); err != nil {
|
||||
return err
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
common.LogVerbose(fmt.Sprintf("%v: %v", key, value))
|
||||
if err := common.PropertyWrite("resource", appName, property, value); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core resource plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core scheduler-docker-local plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core shell plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ssh-keys plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core storage plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tags plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tar plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core trace plugin"
|
||||
version = "0.23.1"
|
||||
version = "0.23.2"
|
||||
[plugin.config]
|
||||
|
||||
2
rpm.mk
2
rpm.mk
@@ -35,7 +35,7 @@ endif
|
||||
--depends 'cpio' \
|
||||
--depends 'curl' \
|
||||
--depends 'dos2unix' \
|
||||
--depends 'docker-image-labeler >= 0.2.0' \
|
||||
--depends 'docker-image-labeler >= 0.2.2' \
|
||||
--depends 'git' \
|
||||
--depends 'gliderlabs-sigil' \
|
||||
--depends 'jq' \
|
||||
|
||||
@@ -5,9 +5,20 @@ load test_helper
|
||||
setup() {
|
||||
global_setup
|
||||
create_app
|
||||
mkdir -p /var/lib/dokku/plugins/available/cron-entries
|
||||
mkdir -p /var/lib/dokku/plugins/enabled/cron-entries
|
||||
cat >"/var/lib/dokku/plugins/available/cron-entries/plugin.toml" <<EOF
|
||||
[plugin]
|
||||
description = "dokku test cron-entries plugin"
|
||||
version = "0.0.1"
|
||||
[plugin.config]
|
||||
EOF
|
||||
cp /var/lib/dokku/plugins/available/cron-entries/plugin.toml /var/lib/dokku/plugins/enabled/cron-entries/plugin.toml
|
||||
|
||||
}
|
||||
|
||||
teardown() {
|
||||
rm -rf /var/lib/dokku/plugins/available/cron-entries /var/lib/dokku/plugins/enabled/cron-entries
|
||||
destroy_app
|
||||
global_teardown
|
||||
}
|
||||
@@ -99,6 +110,68 @@ teardown() {
|
||||
assert_output_contains "python task.py second"
|
||||
}
|
||||
|
||||
@test "(cron) injected entries" {
|
||||
echo "echo '@daily;/bin/true'" > /var/lib/dokku/plugins/enabled/cron-entries/cron-entries
|
||||
chmod +x /var/lib/dokku/plugins/enabled/cron-entries/cron-entries
|
||||
|
||||
run /bin/bash -c "dokku plugin:trigger cron-write"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "cat /var/spool/cron/crontabs/dokku"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "@daily /bin/true"
|
||||
|
||||
# log file
|
||||
echo "echo '@daily;/bin/true;/var/log/dokku/log.log'" > /var/lib/dokku/plugins/enabled/cron-entries/cron-entries
|
||||
chmod +x /var/lib/dokku/plugins/enabled/cron-entries/cron-entries
|
||||
|
||||
run /bin/bash -c "dokku plugin:trigger cron-write"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
|
||||
run /bin/bash -c "cat /var/spool/cron/crontabs/dokku"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "@daily /bin/true &>> /var/log/dokku/log.log"
|
||||
|
||||
# specify matching scheduler
|
||||
echo "[[ \$1 == 'docker-local' ]] && echo '@daily;/bin/true'" > /var/lib/dokku/plugins/enabled/cron-entries/cron-entries
|
||||
chmod +x /var/lib/dokku/plugins/enabled/cron-entries/cron-entries
|
||||
|
||||
run /bin/bash -c "dokku plugin:trigger cron-write"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
|
||||
run /bin/bash -c "cat /var/spool/cron/crontabs/dokku"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "@daily /bin/true"
|
||||
|
||||
# specify non-matching scheduler
|
||||
echo "[[ \$1 == 'kubernetes' ]] && echo '@daily;/bin/true'" > /var/lib/dokku/plugins/enabled/cron-entries/cron-entries
|
||||
chmod +x /var/lib/dokku/plugins/enabled/cron-entries/cron-entries
|
||||
|
||||
run /bin/bash -c "dokku plugin:trigger cron-write"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
|
||||
run /bin/bash -c "cat /var/spool/cron/crontabs/dokku"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
}
|
||||
|
||||
template_cron_file_invalid() {
|
||||
local APP="$1"
|
||||
|
||||
@@ -369,6 +369,58 @@ teardown() {
|
||||
assert_output "10m"
|
||||
}
|
||||
|
||||
@test "(logs) logs:set max-size with alternate log-driver" {
|
||||
run create_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku logs:set $TEST_APP max-size 20m" 2>&1
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "Setting max-size"
|
||||
|
||||
run /bin/bash -c "echo "" | dokku plugin:trigger docker-args-process-deploy $TEST_APP 2>&1 | xargs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "--log-opt max-size=20m"
|
||||
|
||||
run /bin/bash -c "dokku docker-options:add $TEST_APP deploy --log-driver=local" 2>&1
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "echo "" | dokku plugin:trigger docker-args-process-deploy $TEST_APP 2>&1 | xargs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "--log-opt max-size=20m"
|
||||
|
||||
run /bin/bash -c "dokku docker-options:add $TEST_APP deploy --log-driver=json-file" 2>&1
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "echo "" | dokku plugin:trigger docker-args-process-deploy $TEST_APP 2>&1 | xargs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "--log-opt max-size=20m"
|
||||
|
||||
run /bin/bash -c "dokku docker-options:add $TEST_APP deploy --log-driver=journald" 2>&1
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "echo "" | dokku plugin:trigger docker-args-process-deploy $TEST_APP 2>&1"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output ""
|
||||
}
|
||||
|
||||
@test "(logs) logs:vector" {
|
||||
run /bin/bash -c "dokku logs:vector-logs 2>&1"
|
||||
echo "output: $output"
|
||||
@@ -404,6 +456,18 @@ teardown() {
|
||||
assert_output_contains "vector:" 5
|
||||
assert_line_count 6
|
||||
|
||||
run /bin/bash -c "docker stop vector"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku logs:vector-logs 2>&1"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "Vector container logs"
|
||||
assert_output_contains "Vector container is not running"
|
||||
|
||||
run /bin/bash -c "dokku logs:vector-stop 2>&1"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
|
||||
@@ -111,3 +111,26 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(resource) resource:limit clear single" {
|
||||
run /bin/bash -c "dokku resource:limit --memory 512MB $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku resource:report --resource-_default_.limit.memory $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "512MB"
|
||||
|
||||
run /bin/bash -c "dokku resource:limit --memory clear $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku resource:report --resource-_default_.limit.memory $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
}
|
||||
|
||||
@@ -102,3 +102,26 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(resource) resource:reserve clear single" {
|
||||
run /bin/bash -c "dokku resource:reserve --memory 512MB $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku resource:report --resource-_default_.reserve.memory $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "512MB"
|
||||
|
||||
run /bin/bash -c "dokku resource:reserve --memory clear $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku resource:report --resource-_default_.reserve.memory $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user