Compare commits

...

60 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
4b399df541 Release 0.22.4
Some checks failed
bump-formula / bump-formula (push) Has been cancelled
# History

## 0.22.4

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.4/bootstrap.sh
sudo DOKKU_TAG=v0.22.4 bash bootstrap.sh
```

### Bug Fixes

- #4274: @josegonzalez Use correct warning message for deprecated code

### New Features

- #4273: @josegonzalez Upgrade to golang 1.15

### Refactors

- #4275: @josegonzalez Add calls to verify app name in subcommands

### Documentation

- #4272: @josegonzalez Correct help output for ssh-keys command

### Tests

- #4276: @josegonzalez Upgrade version of plugn used in tests
2020-12-29 16:07:18 -05:00
Jose Diaz-Gonzalez
f1c7e1113f Merge pull request #4275 from dokku/verify-app-name
Add calls to verify app name in subcommands
2020-12-29 04:56:15 -05:00
Jose Diaz-Gonzalez
90c68ba02f fix: correct position of app name check for nginx:validate-config 2020-12-29 02:46:18 -05:00
Jose Diaz-Gonzalez
7f2180b47b fix: git config can be set globally 2020-12-27 15:27:46 -05:00
Jose Diaz-Gonzalez
21ff68f624 fix: correct unit test 2020-12-27 15:20:32 -05:00
Jose Diaz-Gonzalez
fd162f8895 feat: add verify_app_name calls to all shell subcommands
Without this, folks could potentially run commands against invalid applications.
2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
03e80a76b6 fix: add missing argument.. 2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
08fdfd1e38 feat: drop internal calls to verify_app_name 2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
2a6c411edf docs: remove extra verify_app_name call in documentation 2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
65d7fd9cce refactor: drop extra internal calls to VerifyAppName
These are duplicative of the checks that happen at the subcommand level.
2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
e0570be562 refactor: use common.VerifyAppName for appExists
The duplicative logic didn't make much sense.
2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
ffa303092f feat: add app name verification to all golang plugins
Moving verification of input to the earliest place is the best way to decrease the need to validate this further downstream.

Additionally, some of the existing checks were.... lacking :)
2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
382dc01b33 Merge pull request #4276 from dokku/josegonzalez-patch-1
Upgrade version of plugn used in tests
2020-12-27 15:13:37 -05:00
Jose Diaz-Gonzalez
7f02155ce1 tests: upgrade version of plugn used in tests 2020-12-25 03:08:08 -05:00
Jose Diaz-Gonzalez
8c17a70dc1 Merge pull request #4274 from dokku/josegonzalez-patch-1
Use correct warning message for deprecated code
2020-12-25 03:05:49 -05:00
Jose Diaz-Gonzalez
b39623ab2b Merge pull request #4273 from dokku/upgrade-golang
Upgrade to golang 1.15
2020-12-25 03:05:19 -05:00
Jose Diaz-Gonzalez
98e57287e3 Merge pull request #4272 from dokku/fix-ssh-keys-help
Correct help output for ssh-keys command
2020-12-25 01:44:39 -05:00
Jose Diaz-Gonzalez
68047866be fix: use correct warning message for deprecated code 2020-12-25 00:01:43 -05:00
Jose Diaz-Gonzalez
bacc5cbcab feat: upgrade to golang 1.15
This is what is used for local development.
2020-12-24 23:46:27 -05:00
Jose Diaz-Gonzalez
549280e2b6 docs: correct help output for ssh-keys command
The recent update did not include the new flags.
2020-12-24 23:32:31 -05:00
Jose Diaz-Gonzalez
61af5971d5 Release 0.22.3
Some checks failed
bump-formula / bump-formula (push) Has been cancelled
# History

## 0.22.3

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.3/bootstrap.sh
sudo DOKKU_TAG=v0.22.3 bash bootstrap.sh
```

### Bug Fixes

- #4268: @josegonzalez Properly parse flags for logs command
- #4264: @josegonzalez Correct argument handling when setting the `--app` flag
- #4252: @magikid Allow symbolic links for certificate and key files

### New Features

- #4270: @josegonzalez Allow renaming old applications to new format
- #4261: @josegonzalez Add remove by fingerprint and json format output to ssh-keys plugin
- #4262: @josegonzalez Improve ps:restore logging
- #4263: @josegonzalez Bump the dokku client formula on release

### Documentation

- #4253: @guettli Highlight the default build method used by Dokku
- #4250: @rlnd1 Update upgrading.md
- #4249: @guettli Fix typo in zero downtime docs
- #4247: @josegonzalez Clarify the domain name setting in the docs

### Tests

- #4269: @josegonzalez Rename duplicate test
- #4266: @josegonzalez Update junit test files when a bats retry is successful
- #4265: @josegonzalez Retry failing and skipped tests once
2020-12-23 02:35:25 -05:00
Jose Diaz-Gonzalez
acc206fca7 Merge pull request #4270 from dokku/4267-fix-app-name-verification
Allow renaming old applications to new format
2020-12-23 02:32:10 -05:00
Jose Diaz-Gonzalez
59a81ad3be fix: cleanup apps and containers before each test
- remove all nginx configurations since they may be faulty
- move cleanup commands to helper functions
- fix a few shellcheck violations
2020-12-22 13:29:32 -05:00
Jose Diaz-Gonzalez
d7b23b84f0 fix: allow renaming old applications to new format
0.22.0 changed allowed values for app names, making it more difficult for users to fix their app names - you need to either downgrade+rename or recreate the app. The `apps:rename`  command can now rename these old applications to the new standard.

Also drop some app name verification from internal commands. Duplicate verification doesn't help much, and though it isn't excessively slow, it does prevent us from running commands against old apps that exist.

Refs #4267
2020-12-22 13:29:32 -05:00
Jose Diaz-Gonzalez
3d77de20cc Merge pull request #4269 from dokku/josegonzalez-patch-1
Rename duplicate test
2020-12-22 13:28:33 -05:00
Jose Diaz-Gonzalez
365356eb5f fix: output is expected twice 2020-12-22 11:52:02 -05:00
Jose Diaz-Gonzalez
044cc4a618 fix: rename duplicate test 2020-12-22 01:30:16 -05:00
Jose Diaz-Gonzalez
09541f8aac Merge pull request #4268 from dokku/4256-fix-logs-arguments
Properly parse flags for logs command
2020-12-21 18:29:04 -05:00
Jose Diaz-Gonzalez
4d0979bbcd fix: properly parse flags for logs command
Closes #4256
2020-12-21 16:50:34 -05:00
Jose Diaz-Gonzalez
dba4bb9c2c Merge pull request #4264 from dokku/4255-client-parsing
Correct argument handling when setting the `--app` flag
2020-12-21 15:55:27 -05:00
Jose Diaz-Gonzalez
2e4c886ab2 fix: correct app arg parsing and new test 2020-12-21 13:36:04 -05:00
Jose Diaz-Gonzalez
dd1962f92d fix: add missing docblock 2020-12-21 01:40:40 -05:00
Jose Diaz-Gonzalez
1439e8b30b hack: parse out the info flags for report subcommands separately
pflag doesn't ignore unspecified arguments, so they must be parsed out separately first.
2020-12-21 01:36:59 -05:00
Jose Diaz-Gonzalez
8240790381 fix: correct argument handling when setting the --app flag
When setting the `--app` flag, there was a special case for the config plugin. This plugin used to take the `--no-restart` flag as the first argument - and still did until this change - resulting in an invalid call to the plugin subcommands. What is worse is that this functionality carried over to all other plugins as they were rewritten in golang, and thus the issue spread without us knowing.

The fix is to support GNU flag parsing rules, which Golang does not do by default (Because Of Reasons™). Switching to `github.com/spf13/pflag` fixes this issue, and also allows positional arguments to be placed wherever, even in the middle of flags.

Closes #4255
2020-12-20 22:06:33 -05:00
Jose Diaz-Gonzalez
0050aa6b92 Merge pull request #4266 from dokku/better-bats-retry
Update junit test files when a bats retry is successful
2020-12-20 22:06:03 -05:00
Jose Diaz-Gonzalez
f53b26f3f0 tests: update junit test files when a bats retry is successful 2020-12-20 17:26:27 -05:00
Jose Diaz-Gonzalez
57a9a11ab3 Merge pull request #4261 from dokku/ssh-keys-commands
Add remove by fingerprint and json format output to ssh-keys plugin
2020-12-20 13:52:11 -05:00
Jose Diaz-Gonzalez
a6a0e033a7 Merge pull request #4262 from dokku/4259-better-restore-logging
Improve ps:restore logging
2020-12-20 13:51:10 -05:00
Jose Diaz-Gonzalez
18492ac83c feat: add json format support to ssh-keys:list 2020-12-20 04:15:53 -05:00
Jose Diaz-Gonzalez
13dd8aa224 feat: add ability to remove an ssh key by fingerprint
- add tests for ssh-keys:remove
- upgrade sshcommand
2020-12-20 04:15:53 -05:00
Jose Diaz-Gonzalez
574304486a chore: make the structs internal
They don't need to be exported as they are only used within this plugin.
2020-12-20 04:15:42 -05:00
Jose Diaz-Gonzalez
90feb8dc96 chore: remove unused file
This was forgotten in the ps plugin rewrite.
2020-12-20 04:15:42 -05:00
Jose Diaz-Gonzalez
7bc241dd48 feat: suppress output for nginx init commands
It's not super useful most of the time.
2020-12-20 04:15:42 -05:00
Jose Diaz-Gonzalez
57b884e7c7 feat: enhance logging for parallel commands
This logging change makes it easier to figure out what is breaking where when running commands in parallel.
2020-12-20 04:15:42 -05:00
Jose Diaz-Gonzalez
3ba775d4b3 feat: add better logging to ps:restore output
Without the logging additions, it's a bit more difficult to figure out why a ps:restore is skipping the restore of an app.
2020-12-20 04:15:42 -05:00
Jose Diaz-Gonzalez
89d6f0eb6e Merge pull request #4265 from dokku/bats-retry
Retry failing and skipped tests once
2020-12-20 04:15:09 -05:00
Jose Diaz-Gonzalez
465e220315 feat: retry failing and skipped tests once
Plugn is fairly brittle since the upgrade to bash 5, so this might help decrease the need to retry the whole circleci job.
2020-12-20 02:42:37 -05:00
Jose Diaz-Gonzalez
1b767e7632 Merge pull request #4263 from dokku/bump-formula
Bump the dokku client formula on release
2020-12-19 19:17:31 -05:00
Jose Diaz-Gonzalez
b3304337ca feat: bump the dokku client formula on release
This ensures we always have an up to date version :)
2020-12-19 19:16:37 -05:00
Jose Diaz-Gonzalez
40e7f6d15b Merge pull request #4252 from magikid/fix-symbolic-link-certs
Allow symbolic links for certificate and key files
2020-12-18 12:13:42 -05:00
Jose Diaz-Gonzalez
c95659d57d Merge pull request #4253 from guettli/patch-2
Highlight the default build method used by Dokku
2020-12-18 12:13:30 -05:00
Jose Diaz-Gonzalez
a1e7b99b26 docs: merge note into list
Makes it a little cleaner (though not by much).

[ci skip]
2020-12-18 12:12:59 -05:00
Thomas Güttler
52f1f2495c If unsure use "Heroku buildpacks via Herokuish".
I guess this is the current sane default. Correct me, if I am wrong.
2020-12-17 21:44:10 +01:00
Chris W Jones
112ee88fe9 Allow symbolic links for certificate and key files
This corrects an issue where if a symbolic link was given to the
`certs:add` command, an error would be thrown even though the file was
valid.

Issue: #4251
2020-12-17 15:35:52 -05:00
Jose Diaz-Gonzalez
2ff06ff4c7 Merge pull request #4250 from rlnd1/patch-1
Update upgrading.md
2020-12-17 11:53:44 -05:00
rlnd1
df289be994 Update upgrading.md
Add command for versions 0.22 and higher
2020-12-17 17:15:15 +01:00
Jose Diaz-Gonzalez
ae76e8784c Merge pull request #4249 from guettli/patch-1
Fix typo in zero downtime docs
2020-12-16 17:09:45 -05:00
Thomas Güttler
d537cb70cd typo "by for" 2020-12-16 23:07:02 +01:00
Jose Diaz-Gonzalez
4a70f0bea2 Merge pull request #4247 from dokku/josegonzalez-patch-1
Clarify the domain name setting in the docs
2020-12-16 16:08:21 -05:00
Jose Diaz-Gonzalez
e51165d915 docs: clarify the domain name setting in the docs
No need to mention the vagrant.

Closes #4246

[ci skip]
2020-12-16 16:07:13 -05:00
160 changed files with 920 additions and 650 deletions

View File

@@ -84,7 +84,9 @@ jobs:
- run:
name: run bats tests
command: |
sudo -E make -e test-ci
if ! sudo -E make -e test-ci; then
sudo -E make tests-ci-retry-failed
fi
no_output_timeout: 60m
shell: /bin/bash
- run:

20
.github/workflows/bump-formula.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: bump-formula
on:
push:
tags:
- '*'
jobs:
bump-formula:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get version
id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
- name: Bump Brew
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
run: |
brew tap dokku/repo
brew bump-formula-pr -f --no-browse --no-audit --no-fork --url "https://github.com/dokku/dokku/archive/${{ steps.get_version.outputs.version }}.tar.gz" dokku/repo/dokku

View File

@@ -1,5 +1,69 @@
# History
## 0.22.4
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.4/bootstrap.sh
sudo DOKKU_TAG=v0.22.4 bash bootstrap.sh
```
### Bug Fixes
- #4274: @josegonzalez Use correct warning message for deprecated code
### New Features
- #4273: @josegonzalez Upgrade to golang 1.15
### Refactors
- #4275: @josegonzalez Add calls to verify app name in subcommands
### Documentation
- #4272: @josegonzalez Correct help output for ssh-keys command
### Tests
- #4276: @josegonzalez Upgrade version of plugn used in tests
## 0.22.3
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.3/bootstrap.sh
sudo DOKKU_TAG=v0.22.3 bash bootstrap.sh
```
### Bug Fixes
- #4268: @josegonzalez Properly parse flags for logs command
- #4264: @josegonzalez Correct argument handling when setting the `--app` flag
- #4252: @magikid Allow symbolic links for certificate and key files
### New Features
- #4270: @josegonzalez Allow renaming old applications to new format
- #4261: @josegonzalez Add remove by fingerprint and json format output to ssh-keys plugin
- #4262: @josegonzalez Improve ps:restore logging
- #4263: @josegonzalez Bump the dokku client formula on release
### Documentation
- #4253: @guettli Highlight the default build method used by Dokku
- #4250: @rlnd1 Update upgrading.md
- #4249: @guettli Fix typo in zero downtime docs
- #4247: @josegonzalez Clarify the domain name setting in the docs
### Tests
- #4269: @josegonzalez Rename duplicate test
- #4266: @josegonzalez Update junit test files when a bats retry is successful
- #4265: @josegonzalez Retry failing and skipped tests once
## 0.22.2
Install/update via the bootstrap script:

View File

@@ -2,9 +2,9 @@ DOKKU_VERSION ?= master
HEROKUISH_VERSION ?= 0.5.19
PROCFILE_VERSION ?= 0.11.0
PLUGN_VERSION ?= 0.5.1
PLUGN_VERSION ?= 0.6.0
SIGIL_VERSION ?= 0.6.0
SSHCOMMAND_VERSION ?= 0.11.0
SSHCOMMAND_VERSION ?= 0.12.0
SSHCOMMAND_URL ?= https://github.com/dokku/sshcommand/releases/download/v${SSHCOMMAND_VERSION}/sshcommand_${SSHCOMMAND_VERSION}_linux_x86_64.tgz
PROCFILE_UTIL_URL ?= https://github.com/josegonzalez/go-procfile-util/releases/download/v${PROCFILE_VERSION}/procfile-util_${PROCFILE_VERSION}_linux_x86_64.tgz
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v${PLUGN_VERSION}/plugn_${PLUGN_VERSION}_linux_x86_64.tgz

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.22.2/bootstrap.sh
sudo DOKKU_TAG=v0.22.2 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.4/bootstrap.sh
sudo DOKKU_TAG=v0.22.4 bash bootstrap.sh
```
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.

View File

@@ -1,7 +1,7 @@
GO_ARGS ?=
GO_PLUGIN_MAKE_TARGET ?= build
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
BUILD_IMAGE := golang:1.14.4
BUILD_IMAGE := golang:1.15.6
.PHONY: build-in-docker build clean src-clean

View File

@@ -15,7 +15,7 @@ import subprocess
import sys
import threading
VERSION = 'v0.22.2'
VERSION = 'v0.22.4'
def bytes_to_string(b):
if type(b) == bytes:

View File

@@ -72,6 +72,9 @@ main() {
skip=false
continue
fi
is_flag=false
[[ "$arg" =~ ^--.* ]] && is_flag=true
if [[ "$arg" == "--app" ]]; then
APP=${args[$next_index]}
@@ -82,10 +85,10 @@ main() {
skip=true
shift 2
elif [[ "$arg" =~ ^--.* ]]; then
[[ "$cmd_set" == "true" ]] && APP_ARG="$arg" && break
[[ "$cmd_set" == "true" ]] && [[ "$is_flag" == "false" ]] && APP_ARG="$arg" && break
[[ "$arg" == "--trace" ]] && export DOKKU_TRACE=1 && set -x
else
if [[ "$cmd_set" == "true" ]]; then
if [[ "$cmd_set" == "true" ]] && [[ "$is_flag" == "false" ]]; then
APP_ARG="$arg"
break
else
@@ -110,7 +113,7 @@ main() {
case "$CMD" in
apps:create)
if [[ -z "$APP_ARG" ]]; then
if [[ -z "$APP" ]] && [[ -z "$APP_ARG" ]]; then
APP=$(fn-random-name)
counter=0
while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps 2>/dev/null | grep -q "$APP"; do
@@ -123,7 +126,7 @@ main() {
counter=$((counter + 1))
fi
done
else
elif [[ -z "$APP" ]]; then
APP="$APP_ARG"
fi
if git remote add "$DOKKU_GIT_REMOTE" "dokku@$DOKKU_REMOTE_HOST:$APP"; then

4
debian/control vendored
View File

@@ -1,9 +1,9 @@
Package: dokku
Version: 0.22.2
Version: 0.22.4
Section: web
Priority: optional
Architecture: amd64
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.10.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, 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, 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.22.2 enabled dokku core standard plugin
20_events 0.22.2 enabled dokku core events logging plugin
app-json 0.22.2 enabled dokku core app-json plugin
apps 0.22.2 enabled dokku core apps plugin
build-env 0.22.2 enabled dokku core build-env plugin
buildpacks 0.22.2 enabled dokku core buildpacks plugin
certs 0.22.2 enabled dokku core certificate management plugin
checks 0.22.2 enabled dokku core checks plugin
common 0.22.2 enabled dokku core common plugin
config 0.22.2 enabled dokku core config plugin
docker-options 0.22.2 enabled dokku core docker-options plugin
domains 0.22.2 enabled dokku core domains plugin
enter 0.22.2 enabled dokku core enter plugin
git 0.22.2 enabled dokku core git plugin
logs 0.22.2 enabled dokku core logs plugin
network 0.22.2 enabled dokku core network plugin
nginx-vhosts 0.22.2 enabled dokku core nginx-vhosts plugin
plugin 0.22.2 enabled dokku core plugin plugin
proxy 0.22.2 enabled dokku core proxy plugin
ps 0.22.2 enabled dokku core ps plugin
repo 0.22.2 enabled dokku core repo plugin
resource 0.22.2 enabled dokku core resource plugin
scheduler-docker-local 0.22.2 enabled dokku core scheduler-docker-local plugin
shell 0.22.2 enabled dokku core shell plugin
ssh-keys 0.22.2 enabled dokku core ssh-keys plugin
storage 0.22.2 enabled dokku core storage plugin
tags 0.22.2 enabled dokku core tags plugin
tar 0.22.2 enabled dokku core tar plugin
trace 0.22.2 enabled dokku core trace plugin
00_dokku-standard 0.22.4 enabled dokku core standard plugin
20_events 0.22.4 enabled dokku core events logging plugin
app-json 0.22.4 enabled dokku core app-json plugin
apps 0.22.4 enabled dokku core apps plugin
build-env 0.22.4 enabled dokku core build-env plugin
buildpacks 0.22.4 enabled dokku core buildpacks plugin
certs 0.22.4 enabled dokku core certificate management plugin
checks 0.22.4 enabled dokku core checks plugin
common 0.22.4 enabled dokku core common plugin
config 0.22.4 enabled dokku core config plugin
docker-options 0.22.4 enabled dokku core docker-options plugin
domains 0.22.4 enabled dokku core domains plugin
enter 0.22.4 enabled dokku core enter plugin
git 0.22.4 enabled dokku core git plugin
logs 0.22.4 enabled dokku core logs plugin
network 0.22.4 enabled dokku core network plugin
nginx-vhosts 0.22.4 enabled dokku core nginx-vhosts plugin
plugin 0.22.4 enabled dokku core plugin plugin
proxy 0.22.4 enabled dokku core proxy plugin
ps 0.22.4 enabled dokku core ps plugin
repo 0.22.4 enabled dokku core repo plugin
resource 0.22.4 enabled dokku core resource plugin
scheduler-docker-local 0.22.4 enabled dokku core scheduler-docker-local plugin
shell 0.22.4 enabled dokku core shell plugin
ssh-keys 0.22.4 enabled dokku core ssh-keys plugin
storage 0.22.4 enabled dokku core storage plugin
tags 0.22.4 enabled dokku core tags plugin
tar 0.22.4 enabled dokku core tar plugin
trace 0.22.4 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

@@ -2,10 +2,10 @@
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/mstile-310x150.png"/>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.4/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.4/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.4/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.4/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.22.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"

View File

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

View File

@@ -19,6 +19,6 @@
"0.19.13",
"0.20.4",
"0.21.4",
"0.22.2"
"0.22.4"
]
}

View File

@@ -1,6 +1,6 @@
# Deploying to Dokku
> Note: This walkthrough uses the hostname `dokku.me` in commands. When deploying to your own server, you should set the `DOKKU_DOMAIN` value in the `Vagrantfile` before you initialize the Vagrant VM.
> Note: This walkthrough uses the hostname `dokku.me` in commands. When deploying to your own server, you should substitute the domain `dokku.me` for the domain name or IP address associated with your server. Users of the Vagrant VM included with Dokku can use `dokku.me` which points to the IP of the VM.
## Deploy tutorial
@@ -103,6 +103,7 @@ Once the deploy is complete, the application's web URL will be generated as abov
Dokku supports deploying applications in a few ways:
- [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) via [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks): See the [herokuish buildpacks documentation](/docs/deployment/methods/herokuish-buildpacks.md) to learn about the different ways to specify a buildpack.
- This is the default method used by Dokku.
- [Dockerfile](https://docs.docker.com/reference/builder/): See the [dockerfile documentation](/docs/deployment/methods/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
- [Docker Image](https://docs.docker.com/get-started/overview/#docker-objects): See the [docker image documentation](/docs/deployment/methods/images.md) to learn about how to deploy a Docker Image.

View File

@@ -3,9 +3,9 @@
> New as of 0.7.0
```
ssh-keys:add <name> [/path/to/key] # Add a new public key by pipe or path
ssh-keys:list [<name>] # List of all authorized Dokku public ssh keys
ssh-keys:remove <name> # Remove SSH public key by name
ssh-keys:add <name> [/path/to/key] # Add a new public key by pipe or path
ssh-keys:list [--format text|json] [<name>] # List of all authorized Dokku public ssh keys
ssh-keys:remove [--fingerprint fingerprint|<name>] # Remove SSH public key by name
```
When pushing to Dokku, SSH key-based authorization is the preferred authentication method, for ease of use and increased security.
@@ -42,6 +42,20 @@ The keys for a specific user may be listed by specifying a second argument to th
dokku ssh-keys:list admin
```
> 0.22.3
The output format may be specified via the `--format` flag. Supported values include `json` and `text`.
```shell
dokku ssh-keys:list --format json
```
This can additionally be used to filter to keys for a particular user:
```shell
dokku ssh-keys:list --format json admin
```
### Adding SSH keys
You can add your public key to Dokku with the `ssh-keys:add` command. The output will be the fingerprint of the SSH key:
@@ -74,10 +88,16 @@ cat ~/.ssh/id_rsa.pub | make vagrant-acl-add
As key names are unique, they can be used to remove a public SSH key.
```SHELL
```shell
dokku ssh-keys:remove KEY_NAME
```
An SSH Key can also be removed by fingerprint.
```shell
dokku ssh-keys:remove --fingerprint FINGERPRINT
```
## Scoping commands to specific users
Support for scoping commands to specific users can be added through plugins that take advantage of the [user-auth](/docs/development/plugin-triggers.md#user-auth) plugin trigger to handle command authorization.

View File

@@ -10,7 +10,7 @@ checks:run <app> [process-type(s)] Runs zero-downtime checks for all proce
checks:skip <app> [process-type(s)] Skip zero-downtime checks for all processes (or comma-separated process-type list)
```
By default, Dokku will wait `10` seconds after starting each container before assuming it is up and proceeding with the deploy. Once this has occurred for all containers started by for an application, traffic will be switched to point to your new containers. Dokku will also wait a further `60` seconds *after* the deploy is complete before terminating old containers in order to give time for long running connections to terminate. In either case, you may have more than one container running for a given application.
By default, Dokku will wait `10` seconds after starting each container before assuming it is up and proceeding with the deploy. Once this has occurred for all containers started by an application, traffic will be switched to point to your new containers. Dokku will also wait a further `60` seconds *after* the deploy is complete before terminating old containers in order to give time for long running connections to terminate. In either case, you may have more than one container running for a given application.
You may both create user-defined checks for web processes using a `CHECKS` file, as well as customize any and all parts of this experience using the checks plugin.

View File

@@ -451,7 +451,6 @@ echo -n "$STDIN$output"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
@@ -470,7 +469,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_SOURCE_TYPE="$2"
verify_app_name "$APP"
# TODO
```
@@ -488,7 +486,6 @@ verify_app_name "$APP"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; $IMAGE_SOURCE_TYPE="$2" IMAGE_TAG="$3"; PROC_TYPE="$4"; CONTAINER_INDEX="$5"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
@@ -506,7 +503,6 @@ verify_app_name "$APP"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_SOURCE_TYPE="$3"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
@@ -526,7 +522,6 @@ verify_app_name "$APP"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
@@ -1060,7 +1055,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; verify_app_name "$APP"
APP="$1"
# TODO
```
@@ -1077,7 +1072,7 @@ APP="$1"; verify_app_name "$APP"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; verify_app_name "$APP"
APP="$1"
# TODO
```
@@ -1199,7 +1194,7 @@ sudo service haproxy reload
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; verify_app_name "$APP"
APP="$1"
TMP_WORK_DIR="$2"
REV="$3" # optional, may not be sent for tar-based builds
@@ -1224,7 +1219,7 @@ popd >/dev/null
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/haproxy/functions"
APP="$1"; verify_app_name "$APP"
APP="$1"
haproxy-build-config "$APP"
```
@@ -1244,7 +1239,6 @@ haproxy-build-config "$APP"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
@@ -1267,7 +1261,6 @@ verify_app_name "$APP"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
@@ -1287,7 +1280,6 @@ verify_app_name "$APP"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
@@ -1373,7 +1365,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
if [[ -d $GULP_CACHE_DIR ]]; then
docker run "${DOCKER_COMMIT_LABEL_ARGS[@]}" --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
@@ -1394,7 +1385,6 @@ fi
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
dokku_log_info1 "Running gulp"
CID=$(docker run "${DOCKER_COMMIT_LABEL_ARGS[@]}" -d $IMAGE /bin/bash -c "cd /app && gulp default")
@@ -1415,7 +1405,7 @@ docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; verify_app_name "$APP"
APP="$1"
# TODO
```
@@ -1432,7 +1422,7 @@ APP="$1"; verify_app_name "$APP"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; verify_app_name "$APP"
APP="$1"
# TODO
```
@@ -1470,7 +1460,6 @@ echo "$APP" > "$TMP_WORK_DIR/dokku-is-awesome"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
dokku_log_info1 "Installing GraphicsMagick..."
@@ -1518,7 +1507,6 @@ APP="$1"; IMAGE_TAG="$2";
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```

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

View File

@@ -3,7 +3,7 @@
Pull the dokku/dokku image:
```shell
docker pull dokku/dokku:0.22.2
docker pull dokku/dokku:0.22.4
```
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.22.2
dokku/dokku:0.22.4
```
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.22.2/bootstrap.sh;
sudo DOKKU_TAG=v0.22.2 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.4/bootstrap.sh;
sudo DOKKU_TAG=v0.22.4 bash bootstrap.sh
```
The installation process takes about 5-10 minutes, depending upon internet connection speed.

View File

@@ -46,6 +46,7 @@ Why do we recommend stopping all apps?
```shell
# for 0.22.0 and newer versions, use
dokku ps:stop --all
# for versions between 0.11.4 and 0.21.4, use
dokku ps:stopall

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

View File

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

7
dokku
View File

@@ -144,12 +144,7 @@ execute_dokku_cmd() {
if [[ "$(readlink -f "$PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}")" == *core-plugins* ]]; then
[[ ${argv[0]} == "$PLUGIN_CMD" ]] && shift 1
if [[ -n $DOKKU_APP_NAME ]]; then
if [[ "$PLUGIN_CMD" == config* ]] && [[ ${argv[1]} == "--no-restart" ]]; then
shift 1
set -- "--no-restart" "$DOKKU_APP_NAME" "$@"
else
set -- "$DOKKU_APP_NAME" "$@"
fi
set -- "$DOKKU_APP_NAME" "$@"
fi
set -- "$PLUGIN_CMD" "$@"
fi

View File

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

View File

@@ -8,8 +8,7 @@ cmd-urls() {
declare cmd="url"
declare APP="$2"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
get_app_urls "$@"
}

View File

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

View File

@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/app-json
go 1.14
go 1.15
require (
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect

View File

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

View File

@@ -12,15 +12,7 @@ import (
// checks if an app exists
func appExists(appName string) error {
if err := common.IsValidAppName(appName); err != nil {
return err
}
if !common.DirectoryExists(common.AppRoot(appName)) {
return fmt.Errorf("App %s does not exist", appName)
}
return nil
return common.VerifyAppName(appName)
}
// checks if an app is locked
@@ -52,10 +44,6 @@ func createApp(appName string) error {
// destroys an app
func destroyApp(appName string) error {
if err := common.VerifyAppName(appName); err != nil {
return err
}
if os.Getenv("DOKKU_APPS_FORCE_DELETE") != "1" {
if err := common.AskForDestructiveConfirmation(appName, "app"); err != nil {
return err
@@ -83,6 +71,17 @@ func destroyApp(appName string) error {
forceCleanup := true
common.DockerCleanup(appName, forceCleanup)
// remove contents for apps that are symlinks to other folders
if err := os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))); err != nil {
common.LogWarn(err.Error())
}
// then remove the folder and/or the symlink
if err := os.RemoveAll(common.AppRoot(appName)); err != nil {
common.LogWarn(err.Error())
}
return nil
}

View File

@@ -1,11 +1,12 @@
module github.com/dokku/dokku/plugins/apps
go 1.14
go 1.15
require (
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
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

View File

@@ -4,3 +4,5 @@ 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/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=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=

View File

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

View File

@@ -1,13 +1,14 @@
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/apps"
"github.com/dokku/dokku/plugins/common"
flag "github.com/spf13/pflag"
)
// main entrypoint to all subcommands
@@ -64,10 +65,12 @@ func main() {
err = apps.CommandRename(oldAppName, newAppName, *skipDeploy)
case "report":
args := flag.NewFlagSet("apps:report", flag.ExitOnError)
args.Parse(os.Args[2:])
appName := args.Arg(0)
infoFlag := args.Arg(1)
err = apps.CommandReport(appName, infoFlag)
osArgs, infoFlag, err := common.ParseReportArgs("apps", os.Args[2:])
if err == nil {
args.Parse(osArgs)
appName := args.Arg(0)
err = apps.CommandReport(appName, infoFlag)
}
case "unlock":
args := flag.NewFlagSet("apps:unlock", flag.ExitOnError)
args.Parse(os.Args[2:])

View File

@@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/common"
)
@@ -19,7 +18,7 @@ func CommandClone(oldAppName string, newAppName string, skipDeploy bool, ignoreE
return errors.New("Please specify an new app name")
}
if err := common.IsValidAppName(oldAppName); err != nil {
if err := common.VerifyAppName(oldAppName); err != nil {
return err
}
@@ -27,10 +26,6 @@ func CommandClone(oldAppName string, newAppName string, skipDeploy bool, ignoreE
return err
}
if err := appExists(oldAppName); err != nil {
return err
}
if err := appExists(newAppName); err == nil {
if ignoreExisting {
common.LogWarn("Name is already taken")
@@ -62,8 +57,8 @@ func CommandClone(oldAppName string, newAppName string, skipDeploy bool, ignoreE
// CommandCreate creates app via command line
func CommandCreate(appName string) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
if err := common.IsValidAppName(appName); err != nil {
return err
}
return createApp(appName)
@@ -71,8 +66,8 @@ func CommandCreate(appName string) error {
// CommandDestroy destroys an app
func CommandDestroy(appName string, force bool) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
if err := common.VerifyAppName(appName); err != nil {
return err
}
if force {
@@ -84,10 +79,6 @@ func CommandDestroy(appName string, force bool) error {
// CommandExists checks if an app exists
func CommandExists(appName string) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
}
return appExists(appName)
}
@@ -109,10 +100,6 @@ func CommandList() error {
// CommandLock locks an app for deployment
func CommandLock(appName string) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
}
if err := common.VerifyAppName(appName); err != nil {
return err
}
@@ -128,10 +115,6 @@ func CommandLock(appName string) error {
// CommandLocked checks if an app is locked for deployment
func CommandLocked(appName string) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
}
if err := common.VerifyAppName(appName); err != nil {
return err
}
@@ -154,7 +137,7 @@ func CommandRename(oldAppName string, newAppName string, skipDeploy bool) error
return errors.New("Please specify an new app name")
}
if err := common.IsValidAppName(oldAppName); err != nil {
if err := common.VerifyAppName(oldAppName); err != nil {
return err
}
@@ -162,10 +145,6 @@ func CommandRename(oldAppName string, newAppName string, skipDeploy bool) error
return err
}
if err := appExists(oldAppName); err != nil {
return err
}
if err := appExists(newAppName); err == nil {
return errors.New("Name is already taken")
}
@@ -197,11 +176,6 @@ func CommandRename(oldAppName string, newAppName string, skipDeploy bool) error
// CommandReport displays an app report for one or more apps
func CommandReport(appName string, infoFlag string) error {
if strings.HasPrefix(appName, "--") {
infoFlag = appName
appName = ""
}
if len(appName) == 0 {
apps, err := common.DokkuApps()
if err != nil {
@@ -220,10 +194,6 @@ func CommandReport(appName string, infoFlag string) error {
// CommandUnlock unlocks an app for deployment
func CommandUnlock(appName string) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
}
if err := common.VerifyAppName(appName); err != nil {
return err
}

View File

@@ -1,9 +1,6 @@
package apps
import (
"fmt"
"os"
"github.com/dokku/dokku/plugins/common"
)
@@ -31,16 +28,6 @@ func TriggerAppMaybeCreate(appName string) error {
func TriggerPostDelete(appName string) error {
imageRepo := common.GetAppImageRepo(appName)
// remove contents for apps that are symlinks to other folders
if err := os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))); err != nil {
common.LogWarn(err.Error())
}
// then remove the folder and/or the symlink
if err := os.RemoveAll(common.AppRoot(appName)); err != nil {
common.LogWarn(err.Error())
}
imagesByAppLabel, err := listImagesByAppLabel(appName)
if err != nil {
common.LogWarn(err.Error())

View File

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

View File

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

View File

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

View File

@@ -13,7 +13,6 @@ trigger-builder-herokuish-pre-build-buildpack() {
local DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$APP"
verify_app_name "$APP"
IMAGE=$(get_app_image_name "$APP")
[[ -z $(config_get --global CURL_CONNECT_TIMEOUT) ]] && config_set --global CURL_CONNECT_TIMEOUT=90

View File

@@ -1,11 +1,12 @@
module github.com/dokku/dokku/plugins/buildpacks
go 1.14
go 1.15
require (
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3
github.com/spf13/pflag v1.0.5 // indirect
)
replace github.com/dokku/dokku/plugins/common => ../common

View File

@@ -4,3 +4,5 @@ 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/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=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=

View File

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

View File

@@ -1,13 +1,14 @@
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/buildpacks"
"github.com/dokku/dokku/plugins/common"
flag "github.com/spf13/pflag"
)
// main entrypoint to all subcommands
@@ -43,10 +44,12 @@ func main() {
err = buildpacks.CommandRemove(appName, buildpack, *index)
case "report":
args := flag.NewFlagSet("buildpacks:report", flag.ExitOnError)
args.Parse(os.Args[2:])
appName := args.Arg(0)
infoFlag := args.Arg(1)
err = buildpacks.CommandReport(appName, infoFlag)
osArgs, infoFlag, err := common.ParseReportArgs("buildpacks", os.Args[2:])
if err == nil {
args.Parse(osArgs)
appName := args.Arg(0)
err = buildpacks.CommandReport(appName, infoFlag)
}
case "set":
args := flag.NewFlagSet("buildpacks:set", flag.ExitOnError)
index := args.Int("index", 0, "--index: the 1-based index of the URL in the list of URLs")

View File

@@ -3,15 +3,14 @@ package buildpacks
import (
"errors"
"fmt"
"strings"
"github.com/dokku/dokku/plugins/common"
)
// CommandAdd implements buildpacks:add
func CommandAdd(appName string, buildpack string, index int) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
if err := common.VerifyAppName(appName); err != nil {
return err
}
buildpack, err := validBuildpackURL(buildpack)
@@ -24,8 +23,8 @@ func CommandAdd(appName string, buildpack string, index int) error {
// CommandClear implements buildpacks:clear
func CommandClear(appName string) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
if err := common.VerifyAppName(appName); err != nil {
return err
}
return common.PropertyDelete("buildpacks", appName, "buildpacks")
@@ -33,8 +32,8 @@ func CommandClear(appName string) error {
// CommandList implements buildpacks:list
func CommandList(appName string) (err error) {
if appName == "" {
return errors.New("Please specify an app to run the command on")
if err := common.VerifyAppName(appName); err != nil {
return err
}
buildpacks, err := common.PropertyListGet("buildpacks", appName, "buildpacks")
@@ -51,8 +50,8 @@ func CommandList(appName string) (err error) {
// CommandRemove implements buildpacks:remove
func CommandRemove(appName string, buildpack string, index int) (err error) {
if appName == "" {
return errors.New("Please specify an app to run the command on")
if err := common.VerifyAppName(appName); err != nil {
return err
}
if index != 0 && buildpack != "" {
@@ -106,11 +105,6 @@ func CommandRemove(appName string, buildpack string, index int) (err error) {
// CommandReport displays a buildpacks report for one or more apps
func CommandReport(appName string, infoFlag string) error {
if strings.HasPrefix(appName, "--") {
infoFlag = appName
appName = ""
}
if len(appName) == 0 {
apps, err := common.DokkuApps()
if err != nil {
@@ -129,8 +123,8 @@ func CommandReport(appName string, infoFlag string) error {
// CommandSet implements buildpacks:set
func CommandSet(appName string, buildpack string, index int) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
if err := common.VerifyAppName(appName); err != nil {
return err
}
buildpack, err := validBuildpackURL(buildpack)

View File

@@ -6,7 +6,6 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
is_ssl_enabled() {
declare desc="returns 0 if ssl is enabled for given app"
local APP=$1
verify_app_name "$APP"
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
if [[ -e "$APP_SSL_PATH/server.crt" ]] && [[ -e "$APP_SSL_PATH/server.key" ]]; then
@@ -19,7 +18,6 @@ is_ssl_enabled() {
get_ssl_hostnames() {
declare desc="returns a string of ssl hostnames extracted from an app's ssl certificate"
local APP=$1
verify_app_name "$APP"
local SSL_PATH="$DOKKU_ROOT/$APP/tls"
local SSL_HOSTNAME=$(openssl x509 -in "$SSL_PATH/server.crt" -noout -subject | tr '/' '\n' | grep CN= | cut -c4-)

View File

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

View File

@@ -16,9 +16,9 @@ is_file_import() {
local KEY_FILE="$2"
if [[ $CRT_FILE ]] && [[ $KEY_FILE ]]; then
if [[ ! -f $CRT_FILE ]]; then
if [[ ! -r $CRT_FILE ]]; then
dokku_log_fail "CRT file specified not found, please check file paths"
elif [[ ! -f $KEY_FILE ]]; then
elif [[ ! -r $KEY_FILE ]]; then
dokku_log_fail "KEY file specified not found, please check file paths"
else
return 0
@@ -34,7 +34,6 @@ cmd-certs-set() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" CRT_FILE="$2" KEY_FILE="$3"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"

View File

@@ -9,7 +9,6 @@ cmd-certs-generate() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" DOMAIN="$2"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"

View File

@@ -9,7 +9,6 @@ cmd-certs-remove() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"

View File

@@ -10,7 +10,6 @@ cmd-certs-show() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" KEY_TYPE="$2"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"

View File

@@ -7,7 +7,6 @@ source "$PLUGIN_AVAILABLE_PATH/config/functions"
is_app_proctype_checks_disabled() {
declare desc="return true if app's proctype(s) checks are disabled"
local APP="$1"
verify_app_name "$APP"
local PROCTYPE="$2" status=false
local DOKKU_CHECKS_DISABLED=$(config_get "$APP" DOKKU_CHECKS_DISABLED || true)
@@ -21,7 +20,6 @@ is_app_proctype_checks_disabled() {
is_app_proctype_checks_skipped() {
declare desc="return true if app's proctype(s) checks are skipped"
local APP="$1"
verify_app_name "$APP"
local PROCTYPE="$2" status=false
local DOKKU_CHECKS_SKIPPED=$(config_get "$APP" DOKKU_CHECKS_SKIPPED || true)

View File

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

View File

@@ -90,10 +90,6 @@ func GetGlobalScheduler() string {
// GetDeployingAppImageName returns deploying image identifier for a given app, tag tuple. validate if tag is presented
func GetDeployingAppImageName(appName, imageTag, imageRepo string) (string, error) {
if appName == "" {
LogFail("(GetDeployingAppImageName) APP must not be empty")
}
b, err := PlugnTriggerOutput("deployed-app-repository", []string{appName}...)
if err != nil {
return "", err
@@ -140,10 +136,6 @@ func GetAppImageRepo(appName string) string {
// GetAppContainerIDs returns a list of docker container ids for given app and optional container_type
func GetAppContainerIDs(appName string, containerType string) ([]string, error) {
var containerIDs []string
if err := VerifyAppName(appName); err != nil {
return containerIDs, err
}
appRoot := AppRoot(appName)
containerFilePath := fmt.Sprintf("%v/CONTAINER", appRoot)
_, err := os.Stat(containerFilePath)
@@ -170,10 +162,6 @@ func GetAppContainerIDs(appName string, containerType string) ([]string, error)
// GetAppRunningContainerIDs return a list of running docker container ids for given app and optional container_type
func GetAppRunningContainerIDs(appName string, containerType string) ([]string, error) {
var runningContainerIDs []string
if err := VerifyAppName(appName); err != nil {
return runningContainerIDs, err
}
if !IsDeployed(appName) {
LogFail(fmt.Sprintf("App %v has not been deployed", appName))
}
@@ -193,10 +181,6 @@ func GetAppRunningContainerIDs(appName string, containerType string) ([]string,
// GetRunningImageTag retrieves current image tag for a given app and returns empty string if no deployed containers are found
func GetRunningImageTag(appName string) (string, error) {
if err := VerifyAppName(appName); err != nil {
return "", err
}
containerIDs, err := GetAppContainerIDs(appName, "")
if err != nil {
return "", err
@@ -241,11 +225,6 @@ func DokkuApps() (apps []string, err error) {
// GetAppImageName returns image identifier for a given app, tag tuple. validate if tag is presented
func GetAppImageName(appName, imageTag, imageRepo string) (imageName string) {
err := VerifyAppName(appName)
if err != nil {
LogFail(err.Error())
}
if imageRepo == "" {
imageRepo = GetAppImageRepo(appName)
}
@@ -286,6 +265,27 @@ func GetenvWithDefault(key string, defaultValue string) (val string) {
return
}
// ParseReportArgs splits out flags from non-flags for input into report commands
func ParseReportArgs(pluginName string, arguments []string) ([]string, string, error) {
osArgs := []string{}
infoFlags := []string{}
for _, argument := range arguments {
if strings.HasPrefix(argument, "--") {
infoFlags = append(infoFlags, argument)
} else {
osArgs = append(osArgs, argument)
}
}
if len(infoFlags) == 0 {
return osArgs, "", nil
}
if len(infoFlags) == 1 {
return osArgs, infoFlags[0], nil
}
return osArgs, "", fmt.Errorf("%s:report command allows only a single flag", pluginName)
}
// ReportSingleApp is an internal function that displays a report for an app
func ReportSingleApp(reportType string, appName string, infoFlag string, infoFlags map[string]string, trimPrefix bool, uppercaseFirstCharacter bool) error {
flags := []string{}
@@ -395,10 +395,10 @@ func UcFirst(str string) string {
return ""
}
// IsValidAppName verifies app name format
// IsValidAppName verifies that the app name matches naming restrictions
func IsValidAppName(appName string) error {
if appName == "" {
return fmt.Errorf("APP must not be null")
return errors.New("Please specify an app to run the command on")
}
r, _ := regexp.Compile("^[a-z0-9][^/:_A-Z]*$")
@@ -409,10 +409,27 @@ func IsValidAppName(appName string) error {
return errors.New("App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, colons, or underscores")
}
// VerifyAppName verifies app name format and app existence"
// isValidAppNameOld verifies that the app name matches the old naming restrictions
func isValidAppNameOld(appName string) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
}
r, _ := regexp.Compile("^[a-z0-9][^/:A-Z]*$")
if r.MatchString(appName) {
return nil
}
return errors.New("App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, or colons")
}
// VerifyAppName checks if an app conforming to either the old or new
// naming conventions exists
func VerifyAppName(appName string) error {
if err := IsValidAppName(appName); err != nil {
return err
newErr := IsValidAppName(appName)
oldErr := isValidAppNameOld(appName)
if newErr != nil && oldErr != nil {
return newErr
}
appRoot := AppRoot(appName)

View File

@@ -22,10 +22,6 @@ func ContainerIsRunning(containerID string) bool {
// CopyFromImage copies a file from named image to destination
func CopyFromImage(appName string, image string, source string, destination string) error {
if err := VerifyAppName(appName); err != nil {
return err
}
if !VerifyImage(image) {
return fmt.Errorf("Invalid docker image for copying content")
}

View File

@@ -181,9 +181,9 @@ dokku_container_log_verbose_quiet() {
}
is_valid_app_name() {
declare desc="verify app name format"
declare desc="verify that the app name matches naming restrictions"
local APP="$1"
[[ -z "$APP" ]] && dokku_log_fail "APP must not be null"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
if [[ "$APP" =~ ^[a-z].* ]] || [[ "$APP" =~ ^[0-9].* ]]; then
if [[ ! $APP =~ [A-Z] ]] && [[ ! $APP =~ [:] ]] && [[ ! $APP =~ [_] ]]; then
return 0
@@ -193,10 +193,31 @@ is_valid_app_name() {
dokku_log_fail "App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, colons, or underscores"
}
is_valid_app_name_old() {
declare desc="verify that the app name matches the old naming restrictions"
local APP="$1"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
if [[ "$APP" =~ ^[a-z].* ]] || [[ "$APP" =~ ^[0-9].* ]]; then
if [[ ! $APP =~ [A-Z] ]] && [[ ! $APP =~ [:] ]]; then
return 0
fi
fi
dokku_log_fail "App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, or colons"
}
verify_app_name() {
declare desc="verify app name format and app existence"
local APP="$1"
is_valid_app_name "$APP"
declare APP="$1"
local VALID_NEW=false
local VALID_OLD=false
is_valid_app_name "$APP" 2>/dev/null && VALID_NEW=true
is_valid_app_name_old "$APP" 2>/dev/null && VALID_OLD=true
if [[ "$VALID_NEW" == "false" ]] && [[ "$VALID_OLD" == "false" ]]; then
dokku_log_fail "App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, colons, or underscores"
fi
[[ ! -d "$DOKKU_ROOT/$APP" ]] && dokku_log_fail "App $APP does not exist"
return 0
@@ -216,7 +237,6 @@ get_app_image_repo() {
declare desc="central definition of image repo pattern"
local APP="$1"
local IMAGE_REPO="dokku/$APP"
is_valid_app_name "$APP"
echo "$IMAGE_REPO"
}
@@ -225,7 +245,6 @@ get_deploying_app_image_name() {
local APP="$1"
local IMAGE_TAG="$2"
IMAGE_REPO="$3"
is_valid_app_name "$APP"
local IMAGE_REMOTE_REPOSITORY=$(plugn trigger deployed-app-repository "$APP")
local NEW_IMAGE_TAG=$(plugn trigger deployed-app-image-tag "$APP")
@@ -246,7 +265,6 @@ get_app_image_name() {
local APP="$1"
local IMAGE_TAG="$2"
IMAGE_REPO="$3"
is_valid_app_name "$APP"
if [[ -z "$IMAGE_REPO" ]]; then
IMAGE_REPO=$(get_app_image_repo "$APP")
@@ -285,7 +303,6 @@ get_app_scheduler() {
get_running_image_tag() {
declare desc="retrieve current image tag for a given app. returns empty string if no deployed containers are found"
local APP="$1"
verify_app_name "$APP"
local CIDS=($(get_app_container_ids "$APP"))
local RUNNING_IMAGE_TAG=$("$DOCKER_BIN" container inspect --format '{{ .Config.Image }}' "${CIDS[0]}" 2>/dev/null | awk -F: '{ print $2 }' || echo '')
@@ -417,7 +434,6 @@ copy_from_image() {
declare desc="copy file from named image to destination"
declare IMAGE="$1" SRC_FILE="$2" DST_FILE="$3"
local WORK_DIR=""
verify_app_name "$APP"
local DOCKER_CREATE_LABEL_ARGS="--label=com.dokku.app-name=$APP"
@@ -465,7 +481,6 @@ get_app_container_ids() {
declare desc="returns list of docker container ids for given app and optional container_type"
local APP="$1"
local CONTAINER_TYPE="$2"
verify_app_name "$APP"
[[ -f $DOKKU_ROOT/$APP/CONTAINER ]] && DOKKU_CIDS+=$(<"$DOKKU_ROOT/$APP/CONTAINER")
if [[ -n "$CONTAINER_TYPE" ]]; then
@@ -563,7 +578,6 @@ is_app_running() {
local APP="$1"
dokku_log_warn "Deprecated: ps#fn-ps-is-app-running"
verify_app_name "$APP"
local APP_RUNNING_CONTAINER_IDS=$(get_app_running_container_ids "$APP" 2>/dev/null)
@@ -578,7 +592,6 @@ dokku_build() {
declare desc="build phase"
declare APP="$1" IMAGE_SOURCE_TYPE="$2" SOURCECODE_WORK_DIR="$3"
verify_app_name "$APP"
plugn trigger builder-build "$IMAGE_SOURCE_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
}
@@ -599,6 +612,7 @@ cmd-deploy() {
declare APP="$1" IMAGE_TAG="$2"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
verify_app_name "$APP"
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
plugn trigger scheduler-deploy "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG"
}
@@ -612,8 +626,6 @@ release_and_deploy() {
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
local DOKKU_DOCKERFILE_PORTS
verify_app_name "$APP"
if verify_image "$IMAGE"; then
if is_image_herokuish_based "$IMAGE" "$APP"; then
local IMAGE_SOURCE_TYPE="herokuish"
@@ -837,7 +849,6 @@ get_app_raw_tcp_ports() {
source "$PLUGIN_AVAILABLE_PATH/config/functions"
local APP="$1"
verify_app_name "$APP"
local DOCKERFILE_PORTS="$(config_get "$APP" DOKKU_DOCKERFILE_PORTS)"
for p in $DOCKERFILE_PORTS; do
if [[ ! "$p" =~ .*udp.* ]]; then
@@ -852,7 +863,6 @@ get_app_raw_tcp_ports() {
get_container_ports() {
declare desc="returns published ports from app containers"
local APP="$1"
verify_app_name "$APP"
local APP_CIDS="$(get_app_container_ids "$APP")"
local cid
@@ -868,7 +878,6 @@ get_app_urls() {
declare URL_TYPE="$1" APP="$2"
local urls
verify_app_name "$APP"
urls=$(plugn trigger app-urls "$APP" "$URL_TYPE")
if [[ -n "$urls" ]]; then
echo "$urls" | sort
@@ -1027,7 +1036,6 @@ merge_dedupe_list() {
acquire_app_deploy_lock() {
declare desc="acquire advisory lock for use in git/tar deploys"
local APP="$1"
verify_app_name "$APP"
local LOCK_TYPE="${2:-waiting}"
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"
local LOCK_WAITING_MSG="$APP currently has a deploy lock in place. Waiting..."
@@ -1039,7 +1047,6 @@ acquire_app_deploy_lock() {
release_app_deploy_lock() {
declare desc="release advisory lock used in git/tar deploys"
local APP="$1"
verify_app_name "$APP"
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"
release_advisory_lock "$APP_DEPLOY_LOCK_FILE"

View File

@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/common
go 1.14
go 1.15
require (
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect

View File

@@ -6,25 +6,20 @@ import (
"sync"
)
// ParallelCommand is a type that declares functions
// parallelCommand is a type that declares functions
// the ps plugins can execute in parallel
type ParallelCommand func(string) error
type parallelCommand func(string) error
// ParallelCommandRun contains all the arguments
// necessary for a parallel command run
type ParallelCommandRun struct {
Name string
}
// ParallelCommandResult is the result of a parallel
// parallelCommandResult is the result of a parallel
// command run
type ParallelCommandResult struct {
Name string
Error error
type parallelCommandResult struct {
Name string
CommandName string
Error error
}
// RunCommandAgainstAllApps runs a given ParallelCommand against all apps
func RunCommandAgainstAllApps(command ParallelCommand, commandName string, parallelCount int) error {
// RunCommandAgainstAllApps runs a given parallelCommand against all apps
func RunCommandAgainstAllApps(command parallelCommand, commandName string, parallelCount int) error {
runInSerial := false
if parallelCount < -1 {
@@ -49,8 +44,8 @@ func RunCommandAgainstAllApps(command ParallelCommand, commandName string, paral
return RunCommandAgainstAllAppsInParallel(command, commandName, parallelCount)
}
// RunCommandAgainstAllAppsInParallel runs a given ParallelCommand against all apps in parallel
func RunCommandAgainstAllAppsInParallel(command ParallelCommand, commandName string, parallelCount int) error {
// RunCommandAgainstAllAppsInParallel runs a given parallelCommand against all apps in parallel
func RunCommandAgainstAllAppsInParallel(command parallelCommand, commandName string, parallelCount int) error {
apps, err := DokkuApps()
if err != nil {
LogWarn(err.Error())
@@ -58,19 +53,19 @@ func RunCommandAgainstAllAppsInParallel(command ParallelCommand, commandName str
}
jobs := make(chan string, parallelCount)
results := make(chan ParallelCommandResult, len(apps))
results := make(chan parallelCommandResult, len(apps))
go allocateJobs(apps, jobs)
done := make(chan error)
go aggregateResults(results, done)
createParallelWorkerPool(jobs, results, command, parallelCount)
createParallelWorkerPool(jobs, results, command, commandName, parallelCount)
err = <-done
return err
}
// RunCommandAgainstAllAppsSerially runs a given ParallelCommand against all apps serially
func RunCommandAgainstAllAppsSerially(command ParallelCommand, commandName string) error {
// RunCommandAgainstAllAppsSerially runs a given parallelCommand against all apps serially
func RunCommandAgainstAllAppsSerially(command parallelCommand, commandName string) error {
apps, err := DokkuApps()
if err != nil {
LogWarn(err.Error())
@@ -81,6 +76,7 @@ func RunCommandAgainstAllAppsSerially(command ParallelCommand, commandName strin
for _, appName := range apps {
LogInfo1(fmt.Sprintf("Running %s against app %s", commandName, appName))
if err = command(appName); err != nil {
LogWarn(fmt.Sprintf("Error running %s against app %s: %s", commandName, appName, err.Error()))
errorCount++
}
}
@@ -99,12 +95,12 @@ func allocateJobs(input []string, jobs chan string) {
close(jobs)
}
func aggregateResults(results chan ParallelCommandResult, done chan error) {
func aggregateResults(results chan parallelCommandResult, done chan error) {
var parallelError error
errorCount := 0
for result := range results {
if result.Error != nil {
LogWarn(fmt.Sprintf("Error running command against %s", result.Name))
LogWarn(fmt.Sprintf("Error running %s against %s: %s", result.CommandName, result.Name, result.Error.Error()))
errorCount++
}
}
@@ -114,23 +110,24 @@ func aggregateResults(results chan ParallelCommandResult, done chan error) {
done <- parallelError
}
func createParallelWorker(jobs chan string, results chan ParallelCommandResult, command ParallelCommand, wg *sync.WaitGroup, workerID int) {
func createParallelWorker(jobs chan string, results chan parallelCommandResult, command parallelCommand, commandName string, wg *sync.WaitGroup, workerID int) {
for job := range jobs {
LogInfo1(fmt.Sprintf("Running command against %s", job))
output := ParallelCommandResult{
Name: job,
Error: command(job),
output := parallelCommandResult{
Name: job,
CommandName: commandName,
Error: command(job),
}
results <- output
}
wg.Done()
}
func createParallelWorkerPool(jobs chan string, results chan ParallelCommandResult, command ParallelCommand, numberOfWorkers int) {
func createParallelWorkerPool(jobs chan string, results chan parallelCommandResult, command parallelCommand, commandName string, numberOfWorkers int) {
var wg sync.WaitGroup
for i := 0; i < numberOfWorkers; i++ {
wg.Add(1)
go createParallelWorker(jobs, results, command, &wg, i)
go createParallelWorker(jobs, results, command, commandName, &wg, i)
}
wg.Wait()
close(results)

View File

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

View File

@@ -1,7 +1,6 @@
package config
import (
"errors"
"fmt"
"os"
"regexp"
@@ -145,9 +144,14 @@ func getEnvironment(appName string, merged bool) (env *Env) {
}
func getAppNameOrGlobal(appName string, global bool) (string, error) {
if appName == "" && !global {
return appName, errors.New("Please specify an app to run the command on or --global")
if global {
return appName, nil
}
if err := common.VerifyAppName(appName); err != nil {
return appName, err
}
return appName, nil
}

View File

@@ -13,7 +13,6 @@ trigger-config-docker-args() {
IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
STDIN=$(cat)
trigger="$0 config_docker_args"
verify_app_name "$APP"
if ! is_image_herokuish_based "$IMAGE" "$APP"; then
ENV_ARGS="$(config_export app "$APP" --format docker-args --merged)"

View File

@@ -56,6 +56,10 @@ func newEnvFromString(rep string) (env *Env, err error) {
//LoadAppEnv loads an environment for the given app
func LoadAppEnv(appName string) (env *Env, err error) {
err = common.VerifyAppName(appName)
if err != nil {
return
}
appfile, err := getAppFile(appName)
if err != nil {
return

View File

@@ -1,12 +1,13 @@
module github.com/dokku/dokku/plugins/config
go 1.14
go 1.15
require (
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
github.com/joho/godotenv v1.2.0
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3
github.com/spf13/pflag v1.0.5 // indirect
)
replace github.com/dokku/dokku/plugins/common => ../common

View File

@@ -6,3 +6,5 @@ github.com/joho/godotenv v1.2.0 h1:vGTvz69FzUFp+X4/bAkb0j5BoLC+9bpqTWY8mjhA9pc=
github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
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=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=

View File

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

View File

@@ -1,13 +1,14 @@
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/common"
"github.com/dokku/dokku/plugins/config"
flag "github.com/spf13/pflag"
)
func getKeys(args []string, global bool) []string {

View File

@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/docker-options
go 1.14
go 1.15
require (
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect

View File

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

View File

@@ -10,7 +10,6 @@ cmd-docker-options-clear() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" PHASES="$2"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
if [[ -z "$PHASES" ]]; then

View File

@@ -7,7 +7,6 @@ set -eo pipefail
disable_app_vhost() {
declare desc="disable vhost support for given application"
declare APP=$1 RESTART_APP="$2"
verify_app_name "$APP"
local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
local APP_URLS_PATH="$DOKKU_ROOT/$APP/URLS"
@@ -24,7 +23,6 @@ disable_app_vhost() {
domains_setup() {
declare desc="setup domains to default state"
verify_app_name "$1"
local APP="$1"
local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
local GLOBAL_VHOST_PATH="$DOKKU_ROOT/VHOST"
@@ -45,7 +43,6 @@ domains_setup() {
domains_add() {
declare desc="add list of domains to app"
verify_app_name "$1"
local APP="$1"
local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
@@ -74,7 +71,6 @@ domains_add() {
domains_remove() {
declare desc="remove list of app domains"
verify_app_name "$1"
local APP="$1"
local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
shift 1
@@ -89,7 +85,6 @@ domains_remove() {
domains_set() {
declare desc="set list of domains for app"
verify_app_name "$1"
local APP="$1"
local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
@@ -113,7 +108,6 @@ domains_set() {
domains_disable() {
declare desc="disable domains/VHOST support"
verify_app_name "$1"
local APP="$1"
local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
@@ -127,7 +121,6 @@ domains_disable() {
domains_enable() {
declare desc="enable domains/VHOST support"
verify_app_name "$1"
local APP="$1" RESTART_APP="$2"
local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
local DEFAULT_VHOSTS="$(get_default_vhosts "$APP")"
@@ -202,7 +195,6 @@ domains_set_global() {
enable_app_vhost() {
declare desc="enable vhost support for given application"
declare APP=$1 RESTART_APP="$2"
verify_app_name "$APP"
plugn trigger pre-enable-vhost "$APP"
[[ "$RESTART_APP" == "--no-restart" ]] && local CONFIG_SET_ARGS=$RESTART_APP
@@ -212,7 +204,6 @@ enable_app_vhost() {
get_app_domains() {
declare desc="return app domains"
verify_app_name "$1"
local APP=$1
local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
local GLOBAL_HOSTNAME_PATH="$DOKKU_ROOT/HOSTNAME"
@@ -228,7 +219,6 @@ get_app_domains() {
get_default_vhosts() {
declare desc="return default vhosts"
verify_app_name "$1"
local APP="$1"
local RE_IPV4="$(get_ipv4_regex)"
local RE_IPV6="$(get_ipv6_regex)"
@@ -264,7 +254,6 @@ is_app_vhost_enabled() {
declare desc="returns true or false if vhost support is enabled for a given application"
local APP=$1
verify_app_name "$APP"
local NO_VHOST=$(config_get "$APP" NO_VHOST)
local APP_VHOST_ENABLED=true

View File

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

View File

@@ -10,8 +10,8 @@ cmd-domains-add() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" DOMAIN_NAME="$2"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
[[ -z "$DOMAIN_NAME" ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 $2 <domain> [<domain> ...]"
verify_app_name "$APP"
domains_add "$@"
}

View File

@@ -10,7 +10,6 @@ cmd-domains-clear() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"

View File

@@ -10,7 +10,7 @@ cmd-domains-disable() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
domains_disable "$APP"
}

View File

@@ -10,7 +10,7 @@ cmd-domains-enable() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
domains_enable "$APP"
}

View File

@@ -10,8 +10,8 @@ cmd-domains-remove() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" DOMAIN_NAME="$2"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
[[ -z "$DOMAIN_NAME" ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 $2 <domain> [<domain> ...]"
verify_app_name "$APP"
domains_remove "$@"
}

View File

@@ -10,8 +10,8 @@ cmd-domains-set() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" DOMAIN_NAME="$2"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
[[ -z "$DOMAIN_NAME" ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 $2 <domain> [<domain> ...]"
verify_app_name "$APP"
domains_set "$@"
}

View File

@@ -10,7 +10,7 @@ cmd-domains-setup() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$APP"
domains_setup "$APP"
}

View File

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

View File

@@ -239,7 +239,6 @@ fn-git-create-hook() {
declare APP="$1"
local APP_PATH="$DOKKU_ROOT/$APP"
local PRERECEIVE_HOOK="$APP_PATH/hooks/pre-receive"
verify_app_name "$APP"
if [[ ! -d "$APP_PATH/refs" ]]; then
git init --bare "$APP_PATH" >/dev/null

View File

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

View File

@@ -10,7 +10,7 @@ cmd-git-initialize() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1"
is_valid_app_name "$APP"
verify_app_name "$APP"
dokku_log_info1_quiet "Initializing git repository for $APP"
fn-git-create-hook "$APP"
}

View File

@@ -10,8 +10,8 @@ cmd-git-set() {
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" KEY="$2" VALUE="$3"
local VALID_KEYS=("deploy-branch" "keep-git-dir" "rev-env-var")
[[ "$APP" == "--global" ]] || verify_app_name "$APP"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
[[ -z "$KEY" ]] && dokku_log_fail "No key specified"
if ! fn-in-array "$KEY" "${VALID_KEYS[@]}"; then

View File

@@ -1,11 +1,12 @@
module github.com/dokku/dokku/plugins/logs
go 1.14
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/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

View File

@@ -4,3 +4,5 @@ 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/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=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=

View File

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

View File

@@ -1,7 +1,6 @@
package main
import (
"flag"
"fmt"
"os"
"strconv"
@@ -9,6 +8,10 @@ import (
"github.com/dokku/dokku/plugins/common"
"github.com/dokku/dokku/plugins/logs"
stdFlag "flag"
flag "github.com/spf13/pflag"
)
const (
@@ -19,39 +22,32 @@ Manage log integration for an app
Additional commands:`
helpContent = `
logs [-h] [-t] [-n num] [-q] [-p process] <app>, Display recent log output
logs [-h] [-t|--tail] [-n|--num num] [-q|--quiet] [-p|--ps process] <app>, Display recent log output
logs:failed [<app>], Shows the last failed deploy logs
`
)
func main() {
flag.Usage = usage
flag.Parse()
stdFlag.Usage = usage
stdFlag.Parse()
cmd := flag.Arg(0)
cmd := stdFlag.Arg(0)
switch cmd {
case "logs":
args := flag.NewFlagSet("logs", flag.ExitOnError)
var num int64
var ps string
var tail bool
var quiet bool
help := args.Bool("h", false, "-h: print help for the command")
args.Int64Var(&num, "n", 0, "-n: the number of lines to display")
args.Int64Var(&num, "num", 0, "--num: the number of lines to display")
args.StringVar(&ps, "p", "", "-p: only display logs from the given process")
args.StringVar(&ps, "ps", "", "--p: only display logs from the given process")
args.BoolVar(&tail, "t", true, "-t: continually stream logs")
args.BoolVar(&tail, "tail", true, "--tail: continually stream logs")
args.BoolVar(&quiet, "q", true, "-q: display raw logs without colors, time and names")
args.BoolVar(&quiet, "quiet", true, "--quiet: display raw logs without colors, time and names")
args.Parse(flag.Args()[1:])
num := args.Int64P("num", "n", 100, "the number of lines to display")
ps := args.StringP("ps", "p", "", "only display logs from the given process")
tail := args.BoolP("tail", "t", false, "continually stream logs")
quiet := args.BoolP("quiet", "q", false, "display raw logs without colors, time and names")
args.Parse(os.Args[2:])
if *help {
usage()
return
}
appName := args.Arg(0)
err := logs.CommandDefault(appName, num, ps, tail, quiet)
err := logs.CommandDefault(appName, *num, *ps, *tail, *quiet)
if err != nil {
common.LogFail(err.Error())
}

View File

@@ -1,13 +1,14 @@
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/common"
"github.com/dokku/dokku/plugins/logs"
flag "github.com/spf13/pflag"
)
// main entrypoint to all subcommands

View File

@@ -1,7 +1,6 @@
package logs
import (
"errors"
"fmt"
"strconv"
@@ -10,10 +9,6 @@ import (
// CommandDefault displays recent log output
func CommandDefault(appName string, num int64, process string, tail, quiet bool) error {
if appName == "" {
return errors.New("Please specify an app to run the command on")
}
if err := common.VerifyAppName(appName); err != nil {
return err
}
@@ -26,6 +21,7 @@ func CommandDefault(appName string, num int64, process string, tail, quiet bool)
t := strconv.FormatBool(tail)
q := strconv.FormatBool(quiet)
n := strconv.FormatInt(num, 10)
if err := common.PlugnTrigger("scheduler-logs", []string{s, appName, process, t, q, n}...); err != nil {
return err
}
@@ -39,7 +35,7 @@ func CommandFailed(appName string, allApps bool) error {
}
if appName == "" {
common.LogWarn("Deprecated: Restore specified without app, assuming --all")
common.LogWarn("Deprecated: logs:failed specified without app, assuming --all")
return common.RunCommandAgainstAllAppsSerially(GetFailedLogs, "logs:failed")
}

View File

@@ -1,12 +1,13 @@
module github.com/dokku/dokku/plugins/network
go 1.14
go 1.15
require (
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0
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/config v0.0.0-00010101000000-000000000000
github.com/spf13/pflag v1.0.5 // indirect
)
replace github.com/dokku/dokku/plugins/common => ../common

View File

@@ -6,3 +6,5 @@ github.com/joho/godotenv v1.2.0 h1:vGTvz69FzUFp+X4/bAkb0j5BoLC+9bpqTWY8mjhA9pc=
github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
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=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=

View File

@@ -26,10 +26,6 @@ var (
// BuildConfig builds network config files
func BuildConfig(appName string) error {
if err := common.VerifyAppName(appName); err != nil {
return err
}
if !common.IsDeployed(appName) {
return nil
}

View File

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

View File

@@ -1,13 +1,14 @@
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/common"
"github.com/dokku/dokku/plugins/network"
flag "github.com/spf13/pflag"
)
// main entrypoint to all subcommands
@@ -52,10 +53,12 @@ func main() {
err = network.CommandRebuildall()
case "report":
args := flag.NewFlagSet("network:report", flag.ExitOnError)
args.Parse(os.Args[2:])
appName := args.Arg(0)
infoFlag := args.Arg(1)
err = network.CommandReport(appName, infoFlag)
osArgs, infoFlag, err := common.ParseReportArgs("network", os.Args[2:])
if err == nil {
args.Parse(osArgs)
appName := args.Arg(0)
err = network.CommandReport(appName, infoFlag)
}
case "set":
args := flag.NewFlagSet("network:set", flag.ExitOnError)
args.Parse(os.Args[2:])

View File

@@ -124,11 +124,6 @@ func CommandRebuildall() error {
// CommandReport displays a network report for one or more apps
func CommandReport(appName string, infoFlag string) error {
if strings.HasPrefix(appName, "--") {
infoFlag = appName
appName = ""
}
if len(appName) == 0 {
apps, err := common.DokkuApps()
if err != nil {
@@ -147,6 +142,10 @@ func CommandReport(appName string, infoFlag string) error {
// CommandSet set or clear a network property for an app
func CommandSet(appName string, property string, value string) error {
if err := common.VerifyAppName(appName); err != nil {
return err
}
if property == "bind-all-interfaces" && value == "" {
value = "false"
}

View File

@@ -104,14 +104,6 @@ func TriggerNetworkGetProperty(appName string, property string) {
// TriggerNetworkWriteIpaddr writes the ip to disk
func TriggerNetworkWriteIpaddr(appName string, processType string, containerIndex string, ip string) {
if appName == "" {
common.LogFail("Please specify an app to run the command on")
}
err := common.VerifyAppName(appName)
if err != nil {
common.LogFail(err.Error())
}
appRoot := common.AppRoot(appName)
filename := fmt.Sprintf("%v/IP.%v.%v", appRoot, processType, containerIndex)
f, err := os.Create(filename)
@@ -129,14 +121,6 @@ func TriggerNetworkWriteIpaddr(appName string, processType string, containerInde
// TriggerNetworkWritePort writes the port to disk
func TriggerNetworkWritePort(appName string, processType string, containerIndex string, port string) {
if appName == "" {
common.LogFail("Please specify an app to run the command on")
}
err := common.VerifyAppName(appName)
if err != nil {
common.LogFail(err.Error())
}
appRoot := common.AppRoot(appName)
filename := fmt.Sprintf("%v/PORT.%v.%v", appRoot, processType, containerIndex)
f, err := os.Create(filename)

View File

@@ -99,6 +99,7 @@ validate_nginx() {
fi
if [[ -n "$APP" ]]; then
verify_app_name "$APP"
nginx_vhosts_validate_single_func "$APP" "$FLAG"
else
for app in $(dokku_apps); do
@@ -126,7 +127,6 @@ restart_nginx() {
nginx_logs() {
declare desc="display app nginx logs"
declare NGINX_LOGS_TYPE="${1#nginx:}" APP="$2"
verify_app_name "$APP"
local NGINX_LOGS_TYPE=${NGINX_LOGS_TYPE%-logs}
local NGINX_LOGS_PATH="$("fn-nginx-${NGINX_LOGS_TYPE}-log-path" "$APP")"
@@ -147,7 +147,6 @@ nginx_logs() {
configure_nginx_ports() {
declare desc="configure nginx listening ports"
local APP=$1
verify_app_name "$APP"
local RAW_TCP_PORTS="$(get_app_raw_tcp_ports "$APP")"
local DOKKU_PROXY_PORT=$(config_get "$APP" DOKKU_PROXY_PORT)
local DOKKU_PROXY_SSL_PORT=$(config_get "$APP" DOKKU_PROXY_SSL_PORT)
@@ -204,7 +203,6 @@ configure_nginx_ports() {
validate_ssl_domains() {
declare desc="check configured domains against SSL cert contents and show warning if mismatched"
local APP=$1
verify_app_name "$APP"
local VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
local SSL_HOSTNAME=$(get_ssl_hostnames "$APP")
local SSL_HOSTNAME_REGEX=$(echo "$SSL_HOSTNAME" | xargs | sed 's|\.|\\.|g' | sed 's/\*/\[^\.\]\*/g' | sed 's/ /|/g')
@@ -227,7 +225,6 @@ validate_ssl_domains() {
get_custom_nginx_template() {
declare desc="attempts to copy custom nginx template from app image"
local APP="$1"
verify_app_name "$APP"
local DESTINATION_FILE="$2"
local IMAGE_TAG="$(get_running_image_tag "$APP")"
local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
@@ -350,7 +347,6 @@ is_grpc_enabled() {
nginx_build_config() {
declare desc="build nginx config to proxy app containers using sigil"
declare APP="$1" DOKKU_APP_LISTEN_PORT="$2" DOKKU_APP_LISTEN_IP="$3"
verify_app_name "$APP"
local VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
local APP_URLS_PATH="$DOKKU_ROOT/$APP/URLS"
local NGINX_TEMPLATE_NAME="nginx.conf.sigil"

View File

@@ -1,3 +1,3 @@
module github.com/dokku/dokku/plugins/nginx-vhosts
go 1.14
go 1.15

View File

@@ -168,5 +168,5 @@ nginx_clear_config() {
declare desc="Remove the nginx conf file"
declare APP="$1"
rm -f "$DOKKU_ROOT/$APP/nginx.conf"
fn-nginx-vhosts-nginx-init-cmd "reload"
suppress_output fn-nginx-vhosts-nginx-init-cmd "reload"
}

Some files were not shown because too many files have changed in this diff Show More