Compare commits

...

18 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
767ba96186 Release 0.23.2
Some checks failed
bump-formula / bump-formula (push) Has been cancelled
# 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
2021-02-07 22:33:31 -05:00
Jose Diaz-Gonzalez
55213e1045 Merge pull request #4388 from dokku/4376-handle-log-drivers
Do not inject max-size option when not using local or json-file log-drivers
2021-02-07 22:32:54 -05:00
Jose Diaz-Gonzalez
1843d42e0b Merge pull request #4387 from dokku/4385-warn-if-vector-stopped
Only warn if the vector container is stopped when fetching logs
2021-02-07 22:11:09 -05:00
Jose Diaz-Gonzalez
065f5e5922 fix: do not inject max-size option when not using local or json-file log drivers
Closes #4376
2021-02-07 22:10:06 -05:00
Jose Diaz-Gonzalez
f7beb3d95d Merge pull request #3757 from pickettd/fix-installer-windows-vagrant
Add provision line to Windows Vagrant box for dokku-installer
2021-02-07 21:04:25 -05:00
Jose Diaz-Gonzalez
c09dfb8ec8 feat: only warn if the vector container is stopped when fetching logs
Closes #4385
2021-02-07 21:03:21 -05:00
Jose Diaz-Gonzalez
87b90e96b6 Merge pull request #4372 from dokku/clear-individual-resource
Add ability to clear an individual resource
2021-02-07 20:57:33 -05:00
Jose Diaz-Gonzalez
e556be1a0d feat: add ability to clear an individual resource 2021-02-07 20:32:43 -05:00
Jose Diaz-Gonzalez
88fddf2a6d Merge pull request #4384 from dokku/cron-trigger
Add support for injected cron entries from external plugins
2021-02-07 19:28:16 -05:00
Jose Diaz-Gonzalez
97fe71a829 Merge pull request #4386 from dokku/4371-image-labeling
Update to docker-image-labeler that handles in-use images
2021-02-07 19:18:02 -05:00
Jose Diaz-Gonzalez
988cdbd6bb fix: update to docker-image-labeler that handles in-use images
Also ensure we keep track of previous docker image tags.

Refs #4371
2021-02-07 18:26:39 -05:00
Jose Diaz-Gonzalez
be84325de1 feat: add support for injected cron entries
This allows alternative plugins - such as dokku-letsencrypt - to inject scheduled cron tasks into the cron system used by Dokku. Cron systems can choose to include or not include a cron task based on the specified scheduler, and can also optionally use a third parameter to store arbitrary information.
2021-02-07 16:45:34 -05:00
Jose Diaz-Gonzalez
e7d9d6b19e Merge pull request #4373 from dokku/fast-scale
Do not attempt to extract Procfile in ps:scale
2021-02-03 14:50:04 -05:00
Jose Diaz-Gonzalez
bd378e8a44 Merge pull request #4377 from dokku/josegonzalez-patch-1
Add note about the dokku user cron being overwritten by Dokku
2021-02-03 14:49:38 -05:00
Jose Diaz-Gonzalez
82da43cfba docs: fix reference to dokku user crontab in cron docs
[ci skip]
2021-02-03 14:49:25 -05:00
Jose Diaz-Gonzalez
a96ad0c10c docs: add note about the dokku user cron being overwritten by Dokku
This is a BC-incompatible change introduced by 0.23.0.
2021-02-03 14:45:11 -05:00
Jose Diaz-Gonzalez
670e679a09 refactor: do not attempt to extract Procfile in ps:scale
The Procfile is now extracted in the pre-deploy step for every deploy and otherwise not removed. Thus, it should always exist when necessary - web will be scale to 1 automatically and it won't need to be present on future ps:scale calls since we'll have the scale file - and the command can execute faster.
2021-02-03 03:49:44 -05:00
David Pickett
7115839fd5 Add provision line to Windows Vagrant definition so dokku-installer is running/available by default in dokku-windows box 2019-10-23 11:57:20 -10:00
72 changed files with 502 additions and 162 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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
View File

@@ -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|

View File

@@ -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
View File

@@ -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>

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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>

View File

@@ -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"

View File

@@ -39,13 +39,13 @@ h1 {
font-size: 1.6em;
}
.header .navbar-brand a {
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.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;
}

View File

@@ -20,6 +20,6 @@
"0.20.4",
"0.21.4",
"0.22.9",
"0.23.1"
"0.23.2"
]
}

View File

@@ -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.

View File

@@ -29,7 +29,7 @@ The workflow looks like this:
```shell
# having dokku-arch in ../dokku-arch
vagrant up build-arch
# wait for "==> build-arch: ==> Finished making: dokku 0.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'

View File

@@ -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:

View File

@@ -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.

View File

@@ -10,30 +10,30 @@
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.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">&nbsp;# go to your server's IP and follow the web installer</span>

View File

@@ -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.

View File

@@ -9,26 +9,26 @@
<meta name="author" content="">
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.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>

View File

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

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-cnb plugin"
version = "0.23.1"
version = "0.23.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-dockerfile plugin"
version = "0.23.1"
version = "0.23.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-herokuish plugin"
version = "0.23.1"
version = "0.23.2"
[plugin.config]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -2,5 +2,6 @@
/subcommands/*
/triggers/*
/triggers
/cron-*
/post-*
/report

View File

@@ -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

View File

@@ -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)
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core cron plugin"
version = "0.23.1"
version = "0.23.2"
[plugin.config]

View File

@@ -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":

View File

@@ -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 -}}

View File

@@ -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()
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -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

View File

@@ -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=

View File

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

View File

@@ -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")

View File

@@ -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))

View File

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

View File

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

View File

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

View File

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

View File

@@ -9,3 +9,4 @@
/pre-*
/procfile-*
/app-restart
/core-post-deploy

View File

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

View File

@@ -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))

View File

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

View File

@@ -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
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

2
rpm.mk
View File

@@ -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' \

View File

@@ -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"

View File

@@ -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"

View File

@@ -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
}

View File

@@ -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
}