Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09762cb35a | ||
|
|
e2e263c783 | ||
|
|
7349c30cd9 | ||
|
|
53c5d548f1 | ||
|
|
aec7b6f7fb | ||
|
|
1831848f89 | ||
|
|
f80b152c9b | ||
|
|
db29029653 | ||
|
|
87ee233636 | ||
|
|
cf99ac9a2c | ||
|
|
1538dc5dcb | ||
|
|
ec34b35a7f | ||
|
|
f7169bf417 | ||
|
|
f173c2f1c2 | ||
|
|
78f467852e | ||
|
|
8b932971df | ||
|
|
66b2fb602f | ||
|
|
df834f41f3 | ||
|
|
b0ac10bc11 | ||
|
|
b75547cff8 | ||
|
|
e8265ac642 | ||
|
|
029de873d7 | ||
|
|
2679bf3709 | ||
|
|
6fb4adf87f | ||
|
|
c9de100dd9 | ||
|
|
f6fc32a074 | ||
|
|
019e80d60a | ||
|
|
06f8237196 | ||
|
|
8fa869fab2 | ||
|
|
ed744d05e1 | ||
|
|
0023b6135a | ||
|
|
2b709fb8e8 | ||
|
|
3bc5e780da | ||
|
|
2fa7a1ab5f | ||
|
|
f34a16846f | ||
|
|
a2177ef57f | ||
|
|
28619164c4 | ||
|
|
ab376f0f1a | ||
|
|
44cb90eff1 | ||
|
|
2584d958e9 | ||
|
|
161d877e8b | ||
|
|
b98154e410 | ||
|
|
7cb0d7fb58 | ||
|
|
c77d323f1f | ||
|
|
3ae416955f | ||
|
|
7480fd51ee | ||
|
|
730e8f73d4 | ||
|
|
d3118b4d07 | ||
|
|
fb79d0f2e8 | ||
|
|
1bbde8fd94 | ||
|
|
ee8bdd4886 | ||
|
|
e36db73864 | ||
|
|
a3a50f193c | ||
|
|
7d917589a4 | ||
|
|
aad283a981 | ||
|
|
047626909c |
60
HISTORY.md
60
HISTORY.md
@@ -1,5 +1,65 @@
|
||||
# History
|
||||
|
||||
## 0.12.12
|
||||
|
||||
### New Features
|
||||
|
||||
- #3244: @josegonzalez Allow disabling chown for persistent storage in scheduler-docker-local
|
||||
|
||||
## 0.12.11
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3238: @josegonzalez Handle proxy issues in app renaming
|
||||
- #3234: @mashrikt Unset GIT_QUARANTINE_PATH when updating repo submodule
|
||||
- #3223: @josegonzalez Get the global scheduler if no app is specified
|
||||
- #3218: @wcalandro Fix error text when using "dokku plugin:uninstall"
|
||||
|
||||
### New Features
|
||||
|
||||
- #3242: @josegonzalez Upgrade herokuish to 0.4.3
|
||||
- #3241: @josegonzalez Add a subcommand for retrieving failed app deploy logs
|
||||
- #3237: @josegonzalez Support --quiet header when showing all environment variables
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3235: @josegonzalez Switch from ps:rebuild to ps:restart
|
||||
- #3221: @josegonzalez Better callout for why env vars do not get applied to dockerfile builds
|
||||
|
||||
## 0.12.10
|
||||
|
||||
### New Features
|
||||
|
||||
- #3214: @josegonzalez Add net-tools as a dependency to debian installs
|
||||
|
||||
## 0.12.9
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3212: @josegonzalez Add missing config source
|
||||
|
||||
## 0.12.8
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3211: @josegonzalez Add missing source of config/functions
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3204: @znz Add `--no-restart` to `config:unset` of `config:help`
|
||||
- #3203: @josegonzalez Clarify issue template
|
||||
|
||||
## 0.12.7
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3200: @josegonzalez fix: correct bash-completion integration
|
||||
|
||||
### New Features
|
||||
|
||||
- #3199: @josegonzalez Update herokuish to 0.4.2
|
||||
- #3198: @josegonzalez Cleanup temporary changes during betafish releases
|
||||
|
||||
## 0.12.6
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,13 +1,32 @@
|
||||
> If you need help figuring out how to use a specific buildpack, or are having issues using multiple buildpacks, please see our [irc or slack channels](http://dokku.viewdocs.io/dokku/getting-started/where-to-get-help/#the-irc-and-slack-channels). Issues pertaining to buildpacks may be closed and locked.
|
||||
|
||||
Description of problem:
|
||||
## Description of problem
|
||||
|
||||
### How reproducible
|
||||
|
||||
Output of the following commands
|
||||
### Steps to Reproduce
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
#### Actual Results
|
||||
|
||||
#### Expected Results
|
||||
|
||||
## Environment Information
|
||||
|
||||
### `dokku report APP_NAME` output
|
||||
|
||||
> This is required! Issues missing this information may be closed.
|
||||
>
|
||||
> For problems affecting all applications, the report output for a broken application is useful for our debugging.
|
||||
> You may also run `dokku report` without any arguments to display the top-level reporting information.
|
||||
|
||||
### How (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
|
||||
|
||||
### Additional information
|
||||
|
||||
- `dokku report APP_NAME`
|
||||
- For problems affecting all applications, the report output for a broken application is useful for our debugging.
|
||||
- You may also run `dokku report` without any arguments to display the top-level reporting information.
|
||||
- `docker inspect CONTAINER_ID` (if applicable):
|
||||
(BEWARE: `docker inspect` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
|
||||
- `cat /home/dokku/<app>/nginx.conf` (if applicable):
|
||||
@@ -20,23 +39,3 @@ Output of the following commands
|
||||
- If it exists, the contents of your `Procfile`.
|
||||
- Output of failing Dokku commands after running `dokku trace on`
|
||||
(BEWARE: `trace on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
|
||||
|
||||
Environment details (AWS, VirtualBox, physical, etc.):
|
||||
|
||||
How was Dokku installed?:
|
||||
|
||||
How reproducible:
|
||||
|
||||
|
||||
Steps to Reproduce:
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
Actual Results:
|
||||
|
||||
|
||||
Expected Results:
|
||||
|
||||
|
||||
Additional info:
|
||||
|
||||
@@ -99,8 +99,8 @@ A fresh VM running any of the following operating systems:
|
||||
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.12.6/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.12.6 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.12.12/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.12.12 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
|
||||
@@ -1,18 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
_dokku_complete_goals_fetch() {
|
||||
dokku --quiet help --all | awk '/^ /{ print $1 }' | sort > "/var/cache/dokku-completion"
|
||||
}
|
||||
# bash completion for dd -*- shell-script -*-
|
||||
|
||||
_dokku_complete_verify() {
|
||||
declare desc="shows bash completion"
|
||||
declare COMMAND="$1"
|
||||
local COMMANDS=""
|
||||
|
||||
if [[ ! -f "/var/cache/dokku-completion" ]] || [[ -s "/var/cache/dokku-completion" ]]; then
|
||||
_dokku_complete_goals_fetch
|
||||
fi
|
||||
|
||||
_dokku_complete_goals=$(cat "/var/cache/dokku-completion")
|
||||
|
||||
while read -r fn; do
|
||||
@@ -24,16 +16,16 @@ _dokku_complete_verify() {
|
||||
echo "${COMMANDS#";"}"
|
||||
}
|
||||
|
||||
have dokku &&
|
||||
_dokku_complete() {
|
||||
_dokku() {
|
||||
local cur prev
|
||||
_get_comp_words_by_ref -n : cur
|
||||
|
||||
if [[ ! -f "/var/cache/dokku-completion" ]] || [[ ! -s "/var/cache/dokku-completion" ]]; then
|
||||
dokku --quiet help --all | awk '/^ /{ print $1 }' | sort > "/var/cache/dokku-completion"
|
||||
fi
|
||||
|
||||
opts=$(_dokku_complete_verify "${cur}")
|
||||
COMPREPLY=($(IFS=";" compgen -W "$opts" -- "$cur"))
|
||||
__ltrim_colon_completions "$cur"
|
||||
} &&
|
||||
complete -F _dokku_complete dokku
|
||||
|
||||
if [[ ! -f "/var/cache/dokku-completion" ]] || [[ -s "/var/cache/dokku-completion" ]]; then
|
||||
have dokku && export -f _dokku_complete_goals_fetch && nohup bash -c _dokku_complete_goals_fetch >/dev/null 2>&1 &
|
||||
fi
|
||||
complete -F _dokku dokku
|
||||
|
||||
@@ -10,7 +10,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.12.6'
|
||||
VERSION = 'v0.12.12'
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
|
||||
19
contrib/herokuish-build.Dockerfile
Normal file
19
contrib/herokuish-build.Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
|
||||
ARG WORKDIR=/go/src/github.com/dokku/dokku
|
||||
|
||||
WORKDIR ${WORKDIR}
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
||||
RUN make deb-herokuish rpm-herokuish
|
||||
|
||||
RUN mkdir -p /data \
|
||||
&& cp /tmp/*.deb /data \
|
||||
&& cp /tmp/*.rpm /data \
|
||||
&& ls -lha /data/
|
||||
@@ -346,6 +346,10 @@ main() {
|
||||
fn-publish-package "$IS_RELEASE" "rpm" "dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
|
||||
|
||||
fn-repo-push-tags "$IS_RELEASE"
|
||||
if [[ "$IS_RELEASE" != "true" ]]; then
|
||||
git reset -q HEAD plugins/*/plugin.toml
|
||||
git checkout -- plugins/*/plugin.toml
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -55,7 +55,7 @@ fn-publish-package() {
|
||||
declare desc="Publishes a package to packagecloud"
|
||||
declare IS_RELEASE="$1" RELEASE_TYPE="$2" PACKAGE_NAME="$3"
|
||||
local REPOSITORY=dokku/dokku-betafish DIST=ubuntu
|
||||
local OS_ID ex
|
||||
local OS_ID ex EXIT_CODE=0
|
||||
|
||||
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
|
||||
156
contrib/release-herokuish
Executable file
156
contrib/release-herokuish
Executable file
@@ -0,0 +1,156 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXX")"
|
||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
|
||||
|
||||
log-info() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log info formatter"
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
log-error() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log error formatter"
|
||||
echo "! $*" 1>&2
|
||||
}
|
||||
|
||||
log-fail() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log fail formatter"
|
||||
log-error "$*"
|
||||
exit -1
|
||||
}
|
||||
|
||||
fn-build-dokku() {
|
||||
declare desc="Builds dokku packages within a docker container"
|
||||
|
||||
pushd "$ROOT_DIR" >/dev/null
|
||||
docker build \
|
||||
-f "contrib/herokuish-build.Dockerfile" \
|
||||
-t herokuish:build .
|
||||
return "$?"
|
||||
}
|
||||
|
||||
fn-extract-package() {
|
||||
declare desc="Extract packages from a docker container to the root directory"
|
||||
declare PACKAGE_NAME="$1"
|
||||
|
||||
if [[ -z "$PACKAGE_NAME" ]]; then
|
||||
log-error "Invalid deb file specified"
|
||||
return 1
|
||||
fi
|
||||
|
||||
log-info "(extract-package) writing ${PACKAGE_NAME} to correct path"
|
||||
docker run --rm --entrypoint cat herokuish:build "/data/${PACKAGE_NAME}" > "${ROOT_DIR}/${PACKAGE_NAME}"
|
||||
return "$?"
|
||||
}
|
||||
|
||||
fn-publish-package() {
|
||||
declare desc="Publishes a package to packagecloud"
|
||||
declare IS_RELEASE="$1" RELEASE_TYPE="$2" PACKAGE_NAME="$3"
|
||||
local REPOSITORY=dokku/dokku-betafish DIST=ubuntu
|
||||
local OS_ID ex EXIT_CODE=0
|
||||
|
||||
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
|
||||
if [[ "$DIST" == "ubuntu" ]]; then
|
||||
OS_IDS=("trusty" "utopic" "vivid" "wily" "xenial" "yakkety" "zesty" "artful" "bionic")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-herokuish) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
ex="$?"
|
||||
if [[ "$ex" -ne "0" ]]; then
|
||||
EXIT_CODE="$ex"
|
||||
fi
|
||||
done
|
||||
|
||||
DIST=debian
|
||||
OS_IDS=("wheezy" "jessie" "stretch" "buster")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-herokuish) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
ex="$?"
|
||||
if [[ "$ex" -ne "0" ]]; then
|
||||
EXIT_CODE="$ex"
|
||||
fi
|
||||
done
|
||||
else
|
||||
log-info "(release-herokuish) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}" "$PACKAGE_NAME"
|
||||
EXIT_CODE="$?"
|
||||
fi
|
||||
return "$EXIT_CODE"
|
||||
}
|
||||
|
||||
fn-in-array() {
|
||||
declare desc="return true if value ($1) is in list (all other arguments)"
|
||||
|
||||
local e
|
||||
for e in "${@:2}"; do
|
||||
[[ "$e" == "$1" ]] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
fn-is-release() {
|
||||
declare desc="Checks if a given run is a release run"
|
||||
declare RELEASE="$1"
|
||||
local IS_RELEASE=false
|
||||
if [[ "$RELEASE" == "major" ]] || [[ "$RELEASE" == "minor" ]] || [[ "$RELEASE" == "patch" ]]; then
|
||||
IS_RELEASE=true
|
||||
fi
|
||||
|
||||
echo "$IS_RELEASE"
|
||||
}
|
||||
|
||||
fn-require-bin() {
|
||||
declare desc="Checks that a binary exists"
|
||||
declare BINARY="$1"
|
||||
if ! command -v "$BINARY" &>/dev/null; then
|
||||
log-fail "Missing ${BINARY}, please install it"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
declare RELEASE="$1"
|
||||
local NEXT_VERSION
|
||||
local VALID_RELEASE_LEVELS=("major" "minor" "patch" "betafish")
|
||||
|
||||
if [[ "$RELEASE" == '--trace' ]]; then
|
||||
shift 1
|
||||
RELEASE="$1"
|
||||
TRACE=1 && set -x
|
||||
fi
|
||||
|
||||
if [[ -z "$RELEASE" ]]; then
|
||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish], none given"
|
||||
fi
|
||||
|
||||
if ! fn-in-array "$RELEASE" "${VALID_RELEASE_LEVELS[@]}"; then
|
||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish], '${RELEASE}' given"
|
||||
fi
|
||||
|
||||
fn-require-bin "docker"
|
||||
fn-require-bin "package_cloud"
|
||||
[[ -n "$PACKAGECLOUD_API_TOKEN" ]] || log-fail "Missing PACKAGECLOUD_API_TOKEN environment variable"
|
||||
|
||||
NEXT_VERSION="$(grep HEROKUISH_VERSION deb.mk | head -n1 | cut -d'=' -f2 | xargs)"
|
||||
IS_RELEASE="$(fn-is-release "$RELEASE")"
|
||||
|
||||
fn-build-dokku || log-fail "Error building package"
|
||||
|
||||
fn-extract-package "herokuish_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb package"
|
||||
fn-extract-package "herokuish-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
|
||||
|
||||
fn-publish-package "$IS_RELEASE" "deb" "herokuish_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
|
||||
fn-publish-package "$IS_RELEASE" "rpm" "herokuish-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
2
deb.mk
2
deb.mk
@@ -1,6 +1,6 @@
|
||||
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
|
||||
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
|
||||
HEROKUISH_VERSION ?= 0.4.0
|
||||
HEROKUISH_VERSION ?= 0.4.3
|
||||
HEROKUISH_ARCHITECTURE = amd64
|
||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
||||
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -1,9 +1,9 @@
|
||||
Package: dokku
|
||||
Version: 0.12.6
|
||||
Version: 0.12.12
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, make, curl, gcc, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker-ce | docker-ee, software-properties-common, python-software-properties | python3-software-properties, rsyslog
|
||||
Depends: locales, git, make, curl, gcc, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, python-software-properties | python3-software-properties, rsyslog
|
||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update
|
||||
Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
|
||||
@@ -39,11 +39,11 @@ dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage
|
||||
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage` to `/storage` inside the container.
|
||||
|
||||
Once you have mounted persistent storage, you will also need to restart the application. See the
|
||||
Once you have mounted persistent storage, you will also need to restart the application. See the
|
||||
[process scaling documentation](/docs/deployment/process-management.md) for more information.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild app-name
|
||||
dokku ps:restart app-name
|
||||
```
|
||||
|
||||
A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root of the container.
|
||||
@@ -132,7 +132,7 @@ Your app may have services that are running in memory and need to be backed up l
|
||||
By default, Dokku will only bind storage mounts during the deploy and run phases. Under certain conditions, one might want to bind a storage mount during the build phase. This can be accomplished by using the `docker-options` plugin directly.
|
||||
|
||||
```shell
|
||||
dokku docker-options:add <app> build "-v /tmp/python-test:/opt/test"
|
||||
dokku docker-options:add node-js-app build "-v /tmp/python-test:/opt/test"
|
||||
```
|
||||
|
||||
You cannot use mounted volumes during the build phase of a Dockerfile deploy. This is because Docker does not support volumes when executing `docker build`.
|
||||
@@ -147,4 +147,4 @@ By default, Dokku will execute your buildpack application processes as the `hero
|
||||
|
||||
> NOTE: this user must exist in your herokuish image.
|
||||
|
||||
Additionally, Dokku will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`.
|
||||
Additionally, the default `docker-local` scheduler that comes with Dokku will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. See the [scheduler-docker-local documentation](/docs/advanced-usage/schedulers/docker-local.md#disabling-chown-of-persistent-storage) docs for more information.
|
||||
|
||||
@@ -31,31 +31,31 @@ dokku plugin
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.12.6 enabled dokku core standard plugin
|
||||
20_events 0.12.6 enabled dokku core events logging plugin
|
||||
apps 0.12.6 enabled dokku core apps plugin
|
||||
build-env 0.12.6 enabled dokku core build-env plugin
|
||||
certs 0.12.6 enabled dokku core certificate management plugin
|
||||
checks 0.12.6 enabled dokku core checks plugin
|
||||
common 0.12.6 enabled dokku core common plugin
|
||||
config 0.12.6 enabled dokku core config plugin
|
||||
docker-options 0.12.6 enabled dokku core docker-options plugin
|
||||
domains 0.12.6 enabled dokku core domains plugin
|
||||
enter 0.12.6 enabled dokku core enter plugin
|
||||
git 0.12.6 enabled dokku core git plugin
|
||||
logs 0.12.6 enabled dokku core logs plugin
|
||||
named-containers 0.12.6 enabled dokku core named containers plugin
|
||||
network 0.12.6 enabled dokku core network plugin
|
||||
nginx-vhosts 0.12.6 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.12.6 enabled dokku core plugin plugin
|
||||
proxy 0.12.6 enabled dokku core proxy plugin
|
||||
ps 0.12.6 enabled dokku core ps plugin
|
||||
repo 0.12.6 enabled dokku core repo plugin
|
||||
shell 0.12.6 enabled dokku core shell plugin
|
||||
ssh-keys 0.12.6 enabled dokku core ssh-keys plugin
|
||||
storage 0.12.6 enabled dokku core storage plugin
|
||||
tags 0.12.6 enabled dokku core tags plugin
|
||||
tar 0.12.6 enabled dokku core tar plugin
|
||||
00_dokku-standard 0.12.12 enabled dokku core standard plugin
|
||||
20_events 0.12.12 enabled dokku core events logging plugin
|
||||
apps 0.12.12 enabled dokku core apps plugin
|
||||
build-env 0.12.12 enabled dokku core build-env plugin
|
||||
certs 0.12.12 enabled dokku core certificate management plugin
|
||||
checks 0.12.12 enabled dokku core checks plugin
|
||||
common 0.12.12 enabled dokku core common plugin
|
||||
config 0.12.12 enabled dokku core config plugin
|
||||
docker-options 0.12.12 enabled dokku core docker-options plugin
|
||||
domains 0.12.12 enabled dokku core domains plugin
|
||||
enter 0.12.12 enabled dokku core enter plugin
|
||||
git 0.12.12 enabled dokku core git plugin
|
||||
logs 0.12.12 enabled dokku core logs plugin
|
||||
named-containers 0.12.12 enabled dokku core named containers plugin
|
||||
network 0.12.12 enabled dokku core network plugin
|
||||
nginx-vhosts 0.12.12 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.12.12 enabled dokku core plugin plugin
|
||||
proxy 0.12.12 enabled dokku core proxy plugin
|
||||
ps 0.12.12 enabled dokku core ps plugin
|
||||
repo 0.12.12 enabled dokku core repo plugin
|
||||
shell 0.12.12 enabled dokku core shell plugin
|
||||
ssh-keys 0.12.12 enabled dokku core ssh-keys plugin
|
||||
storage 0.12.12 enabled dokku core storage plugin
|
||||
tags 0.12.12 enabled dokku core tags plugin
|
||||
tar 0.12.12 enabled dokku core tar plugin
|
||||
```
|
||||
|
||||
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Docker Local Scheduler
|
||||
|
||||
> Subcommands new as of 0.12.12
|
||||
|
||||
```
|
||||
scheduler-docker-local:report [<app>] [<flag>] # Displays a scheduler-docker-local report for one or more apps
|
||||
scheduler-docker-local:set <app> <key> (<value>) # Set or clear a scheduler-docker-local property for an app
|
||||
```
|
||||
|
||||
> New as of 0.12.0
|
||||
|
||||
Dokku natively includes functionality to manage application lifecycles for a single server using the `scheduler-docker-local` plugin. It is the default scheduler, but as with all schedulers, it is set on a per-application basis. The scheduler can currently be overridden by running the following command:
|
||||
@@ -14,6 +21,22 @@ As it is the default, unsetting the `DOCKER_SCHEDULER` config variable is also a
|
||||
dokku config:unset node-js-app DOCKER_SCHEDULER
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Disabling chown of persistent storage
|
||||
|
||||
The `scheduler-docker-local` plugin will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. You may disable this by running the following `scheduler-docker-local:set` command for your application:
|
||||
|
||||
```shell
|
||||
dokku scheduler-docker-local:set node-js-app DISABLE_CHOWN true
|
||||
```
|
||||
|
||||
Once set, you may re-enable it by setting a blank value for `DISABLE_CHOWN`:
|
||||
|
||||
```shell
|
||||
dokku scheduler-docker-local:set node-js-app DISABLE_CHOWN
|
||||
```
|
||||
|
||||
## Implemented Triggers
|
||||
|
||||
This plugin implements various functionality through `plugn` triggers to integrate with Docker for running apps on a single server. The following functionality is supported by the `scheduler-docker-local` plugin.
|
||||
@@ -25,7 +48,8 @@ This plugin implements various functionality through `plugn` triggers to integra
|
||||
- `pre-restore`
|
||||
- `scheduler-deploy`
|
||||
- `scheduler-docker-cleanup`
|
||||
- `scheduler-logs-failed`
|
||||
- `scheduler-run`
|
||||
- `scheduler-stop`
|
||||
- `scheduler-tags-create`
|
||||
- `scheduler-tags-destroy`
|
||||
- `scheduler-tags-destroy`
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.6\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.12\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.6\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.12\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.6\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.12\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.6\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.12\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.6\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.12\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.6\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.12\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -39,13 +39,13 @@ h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
"0.9.4",
|
||||
"0.10.5",
|
||||
"0.11.6",
|
||||
"0.12.6"
|
||||
"0.12.12"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,14 +5,17 @@ Typically an application will require some configuration to run properly. Dokku
|
||||
The `config` plugin provides the following commands to manage your variables:
|
||||
|
||||
```
|
||||
config (<app>|--global) Display all global or app-specific config vars
|
||||
config:get (<app>|--global) KEY Display a global or app-specific config value
|
||||
config:set (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...] Set one or more config vars
|
||||
config:unset (<app>|--global) KEY1 [KEY2 ...] Unset one or more config vars
|
||||
config:export [--format=FORMAT] [--merged] (<app>|--global) Export all global or app-specific configuration
|
||||
config (<app>|--global) Pretty-print an app or global environment
|
||||
config:get (<app>|--global) KEY Display a global or app-specific config value
|
||||
config:set [--encoded] [--no-restart] (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...] Set one or more config vars
|
||||
config:unset [--no-restart] (<app>|--global) KEY1 [KEY2 ...] Unset one or more config vars
|
||||
config:export (<app>|--global) [--envfile] Export a global or app environment
|
||||
config:keys (<app>|--global) [--merged] Show keys set in environment
|
||||
config:bundle (<app>|--global) [--merged] Bundle environment into tarfile
|
||||
```
|
||||
> For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
|
||||
|
||||
The variables are available both at run time and during the application build/compilation step for buildpack-based deploys. For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
|
||||
Environment variables are available both at run time and during the application build/compilation step for buildpack-based deploys.
|
||||
|
||||
For buildpack deploys, Dokku will create a `/app/.env` file that can be used for legacy buildpacks. Note that this is *not* updated when `config:set` or `config:unset` is called, and is only written during a `deploy` or `ps:rebuild`. Developers are encouraged to instead read from the application environment directly, as the proper values will be available then.
|
||||
|
||||
@@ -119,4 +122,4 @@ The following list config variables have special meaning and can be set in a var
|
||||
| `DOKKU_SKIP_DEPLOY` | | `dokku config:set` | |
|
||||
| `DOKKU_SYSTEM_GROUP` | `dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | System group to chown files as. |
|
||||
| `DOKKU_SYSTEM_USER` | `dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | System user to chown files as. |
|
||||
| `DOKKU_WAIT_TO_RETIRE` | `60` | `dokku config:set` | After a successful deploy, the grace period given to old containers before they are stopped/terminated. This is useful for ensuring completion of long-running http connections. |
|
||||
| `DOKKU_WAIT_TO_RETIRE` | `60` | `dokku config:set` | After a successful deploy, the grace period given to old containers before they are stopped/terminated. This is useful for ensuring completion of long-running http connections. |
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
# Log Management
|
||||
|
||||
```
|
||||
logs <app> # display recent log output
|
||||
logs <app> [-h] [-t] [-n num] [-q] [-p process] # Display recent log output
|
||||
logs:failed [<app>] # Shows the last failed deploy logs
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Application Logs
|
||||
You can easily get logs of an application using the `logs` command:
|
||||
### App Logs
|
||||
|
||||
You can easily get logs of an app using the `logs` command:
|
||||
|
||||
```shell
|
||||
dokku logs node-js-app
|
||||
```
|
||||
|
||||
## Behavioral modifiers
|
||||
#### Behavioral modifiers
|
||||
|
||||
Dokku also supports certain command-line arguments that augment the `log` command's behavior.
|
||||
|
||||
@@ -26,8 +28,25 @@ Dokku also supports certain command-line arguments that augment the `log` comman
|
||||
|
||||
You can use these modifiers as follows:
|
||||
|
||||
|
||||
```shell
|
||||
dokku logs node-js-app -t -p web
|
||||
```
|
||||
will show logs continually from the web process.
|
||||
|
||||
### Failed Deploy Logs
|
||||
|
||||
> Warning: The default `docker-local` scheduler will "store" these until the next deploy or until the old containers are garbage collected - whichever runs first. If you require the logs beyond this point in time, please ship the logs to a centralized log server.
|
||||
|
||||
In some cases, it may be useful to retrieve the logs from a previously failed deploy.
|
||||
|
||||
You can retrieve these logs by using the `logs:failed` command
|
||||
|
||||
```shell
|
||||
dokku logs:failed node-js-app
|
||||
```
|
||||
|
||||
You can also retrieve the failed logs for each app:
|
||||
|
||||
```shell
|
||||
dokku logs:failed node-js-app
|
||||
```
|
||||
|
||||
@@ -373,6 +373,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-clear-config`
|
||||
|
||||
- Description: Clears network configuration
|
||||
- Invoked by: `internally triggered by proxy-clear-config within proxy implementations`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-compute-ports`
|
||||
|
||||
- Description: Computes the ports for a given app container
|
||||
@@ -1040,6 +1055,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `proxy-clear-config`
|
||||
|
||||
- Description: Clears the proxy implementation configuration for a given app
|
||||
- Invoked by: `internally triggered by apps:rename`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `proxy-enable`
|
||||
|
||||
- Description: Enables the configured proxy implementation for an app
|
||||
@@ -1147,9 +1177,12 @@ APP="$1";
|
||||
|
||||
### `scheduler-deploy`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when an app is deployed
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$DOKKU_SCHEDULER APP IMAGE_TAG`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -1163,9 +1196,12 @@ DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_TAG="$3";
|
||||
|
||||
### `scheduler-docker-cleanup`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when dokku cleanup is invoked
|
||||
- Invoked by: `dokku deploy, dokku cleanup`
|
||||
- Arguments: `$DOKKU_SCHEDULER APP FORCE_CLEANUP`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $FORCE_CLEANUP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -1177,11 +1213,33 @@ DOKKU_SCHEDULER="$1"; APP="$2"; FORCE_CLEANUP="$3";
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-logs-failed`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when retrieving failed container logs
|
||||
- Invoked by: `dokku logs:failed`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; ARGS="${@:3}";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-run`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when a command is executed for your app
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$DOKKU_SCHEDULER APP ...ARGS`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP ...ARGS`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -1195,9 +1253,12 @@ DOKKU_SCHEDULER="$1"; APP="$2"; ARGS="${@:3}";
|
||||
|
||||
### `scheduler-stop`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when a tag is destroyed
|
||||
- Invoked by: `dokku apps:destroy, dokku ps:stop`
|
||||
- Arguments: `$DOKKU_SCHEDULER APP REMOVE_CONTAINERS`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $REMOVE_CONTAINERS`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -1211,9 +1272,12 @@ DOKKU_SCHEDULER="$1"; APP="$2"; REMOVE_CONTAINERS="$3";
|
||||
|
||||
### `scheduler-tags-create`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when a tag is created
|
||||
- Invoked by: `dokku tags:create`
|
||||
- Arguments: `$DOKKU_SCHEDULER APP SOURCE_IMAGE TARGET_IMAGE`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $SOURCE_IMAGE $TARGET_IMAGE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -1227,9 +1291,12 @@ DOKKU_SCHEDULER="$1" APP="$2" SOURCE_IMAGE="$3" TARGET_IMAGE="$4"
|
||||
|
||||
### `scheduler-tags-destroy`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when a tag is destroyed
|
||||
- Invoked by: `dokku tags:destroy`
|
||||
- Arguments: `$DOKKU_SCHEDULER APP IMAGE_REPO IMAGE_TAG`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $IMAGE_REPO $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
|
||||
@@ -30,7 +30,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.12.6-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.12.12-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'
|
||||
|
||||
@@ -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.12.6/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.12.6 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.12.12/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.12.12 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/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.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.12.12/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.rawgit.com/dokku/dokku/v0.12.6/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
</style>
|
||||
@@ -98,12 +98,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.12.6/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.12.12/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.12.6 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.12.12 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
|
||||
@@ -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.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/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.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.12.6/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.12.12/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.12.12/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.rawgit.com/dokku/dokku/v0.12.6/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.12.12/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>
|
||||
|
||||
2
dokku
2
dokku
@@ -42,6 +42,8 @@ export PLUGIN_ENABLED_PATH=${PLUGIN_ENABLED_PATH:="$PLUGIN_PATH/enabled"}
|
||||
export PLUGIN_CORE_PATH=${PLUGIN_CORE_PATH:="$DOKKU_LIB_ROOT/core-plugins"}
|
||||
export PLUGIN_CORE_AVAILABLE_PATH=${PLUGIN_CORE_AVAILABLE_PATH:="$PLUGIN_CORE_PATH/available"}
|
||||
export PLUGIN_CORE_ENABLED_PATH=${PLUGIN_CORE_ENABLED_PATH:="$PLUGIN_CORE_PATH/enabled"}
|
||||
export DOKKU_SYSTEM_GROUP=${DOKKU_SYSTEM_GROUP:="dokku"}
|
||||
export DOKKU_SYSTEM_USER=${DOKKU_SYSTEM_USER:="dokku"}
|
||||
|
||||
export DOKKU_API_VERSION=1
|
||||
export DOKKU_NOT_IMPLEMENTED_EXIT=10
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/20_events/network-clear-config
Symbolic link
1
plugins/20_events/network-clear-config
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/20_events/proxy-clear-config
Symbolic link
1
plugins/20_events/proxy-clear-config
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -14,12 +14,13 @@ apps_rename_cmd() {
|
||||
local OLD_CACHE_DIR="$DOKKU_ROOT/$OLD_APP/cache"
|
||||
local OLD_CACHE_HOST_DIR="$DOKKU_HOST_ROOT/$OLD_APP/cache"
|
||||
|
||||
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR"; then
|
||||
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR" > /dev/null 2>&1; then
|
||||
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$OLD_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||
fi
|
||||
rm -rf "$OLD_CACHE_DIR"
|
||||
apps_create "$NEW_APP"
|
||||
cp -a "$DOKKU_ROOT/$OLD_APP/." "$DOKKU_ROOT/$NEW_APP"
|
||||
plugn trigger proxy-clear-config "$NEW_APP"
|
||||
DOKKU_APPS_FORCE_DELETE=1 apps_destroy "$OLD_APP"
|
||||
[[ -f "$DOKKU_ROOT/$NEW_APP/URLS" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/URLS"
|
||||
[[ -f "$DOKKU_ROOT/$NEW_APP/VHOST" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/VHOST"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core build-env plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -557,6 +557,7 @@ dokku_release() {
|
||||
dokku_deploy_cmd() {
|
||||
declare desc="deploy phase"
|
||||
declare APP="$1" IMAGE_TAG="$2"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
local DOKKU_SCHEDULER=$(config_get "$APP" DOKKU_SCHEDULER || echo "docker-local")
|
||||
plugn trigger scheduler-deploy "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -67,15 +67,6 @@ fn-plugin-property-setup() {
|
||||
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/config/${PLUGIN}"
|
||||
chmod 0755 "${DOKKU_LIB_ROOT}/config/${PLUGIN}"
|
||||
|
||||
if [[ -z "$DOKKU_SYSTEM_GROUP" ]]; then
|
||||
export DOKKU_SYSTEM_GROUP=dokku
|
||||
fi
|
||||
|
||||
if [[ -z "$DOKKU_SYSTEM_USER" ]]; then
|
||||
export DOKKU_SYSTEM_USER=dokku
|
||||
fi
|
||||
|
||||
chown "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/config/${PLUGIN}"
|
||||
}
|
||||
|
||||
@@ -86,7 +77,7 @@ fn-plugin-property-read() {
|
||||
if [[ -z "$PLUGIN" ]] || [[ -z "$APP" ]] || [[ -z "$KEY" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
if [[ ! -f "${DOKKU_LIB_ROOT:?}/config/${PLUGIN}/${APP}/${KEY}" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core config plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -22,7 +22,7 @@ Additional commands:`
|
||||
config (<app>|--global), Pretty-print an app or global environment
|
||||
config:get (<app>|--global) KEY, Display a global or app-specific config value
|
||||
config:set [--encoded] [--no-restart] (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...], Set one or more config vars
|
||||
config:unset (<app>|--global) KEY1 [KEY2 ...], Unset one or more config vars
|
||||
config:unset [--no-restart] (<app>|--global) KEY1 [KEY2 ...], Unset one or more config vars
|
||||
config:export (<app>|--global) [--envfile], Export a global or app environment
|
||||
config:keys (<app>|--global) [--merged], Show keys set in environment
|
||||
config:bundle (<app>|--global) [--merged], Bundle environment into tarfile
|
||||
|
||||
@@ -25,7 +25,7 @@ func CommandShow(args []string, global bool, shell bool, export bool, merged boo
|
||||
if appName != "" {
|
||||
contextName = appName
|
||||
}
|
||||
common.LogInfo2(contextName + " env vars")
|
||||
common.LogInfo2Quiet(contextName + " env vars")
|
||||
fmt.Println(env.Export(ExportFormatPretty))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core docker-options plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core domains plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core enter plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -65,7 +65,7 @@ git_build_app_repo() {
|
||||
GIT_DIR="$DOKKU_ROOT/$APP" git tag -d "$TMP_TAG" &> /dev/null || true
|
||||
fi
|
||||
|
||||
suppress_output git submodule update --init --recursive
|
||||
suppress_output env -u GIT_QUARANTINE_PATH git submodule update --init --recursive
|
||||
find . -name .git -prune -exec rm -rf {} \; > /dev/null
|
||||
|
||||
if use_git_worktree; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core git plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,27 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " help logs:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
source "$PLUGIN_AVAILABLE_PATH/logs/internal-functions"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
usage() {
|
||||
declare desc="logs specific usage"
|
||||
echo "Usage: dokku logs <app>"
|
||||
echo " display recent log output"
|
||||
echo ""
|
||||
echo " -n, --num NUM # the number of lines to display"
|
||||
echo " -p, --ps PS # only display logs from the given process"
|
||||
echo " -t, --tail # continually stream logs"
|
||||
echo " -q, --quiet # display raw logs without colors, time and names"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
logs:help)
|
||||
usage
|
||||
;;
|
||||
|
||||
help)
|
||||
cat<<EOF
|
||||
logs <app> [-h] [-t] [-n num] [-q] [-p process], Show the last logs for an application
|
||||
EOF
|
||||
help | logs:help)
|
||||
cmd-logs-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
38
plugins/logs/internal-functions
Executable file
38
plugins/logs/internal-functions
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
fn-logs-usage() {
|
||||
declare desc="logs specific usage"
|
||||
echo "Usage: dokku logs <app>"
|
||||
echo " display recent log output"
|
||||
echo ""
|
||||
echo " -n, --num NUM # the number of lines to display"
|
||||
echo " -p, --ps PS # only display logs from the given process"
|
||||
echo " -t, --tail # continually stream logs"
|
||||
echo " -q, --quiet # display raw logs without colors, time and names"
|
||||
}
|
||||
|
||||
fn-logs-help-content() {
|
||||
declare desc="return logs plugin help content"
|
||||
cat<<help_content
|
||||
logs <app> [-h] [-t] [-n num] [-q] [-p process], Display recent log output
|
||||
logs:failed <app>, Show the last logs for an application
|
||||
help_content
|
||||
}
|
||||
|
||||
cmd-logs-help() {
|
||||
if [[ $1 = "logs:help" ]] ; then
|
||||
echo -e 'Usage: dokku logs[:COMMAND]'
|
||||
echo ''
|
||||
echo 'Output app logs'
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
fn-logs-help-content | sort | column -c2 -t -s,
|
||||
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||
fn-logs-help-content
|
||||
else
|
||||
cat<<help_desc
|
||||
logs, Output app logs
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core logs plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/logs/internal-functions"
|
||||
|
||||
logs_default_cmd() {
|
||||
declare desc="shows the last logs for an app via command line"
|
||||
declare desc="display recent log output"
|
||||
local cmd="logs"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
local APP="$2"; verify_app_name "$2"
|
||||
local APP_ROOT="$DOKKU_ROOT/$APP"
|
||||
local COLORS=(36 33 32 35 31)
|
||||
|
||||
if ! (is_deployed "$APP"); then
|
||||
echo "Application's container not found"
|
||||
exit 1
|
||||
fi
|
||||
! (is_deployed "$APP") && dokku_log_fail "App $APP has not been deployed"
|
||||
|
||||
shift 2;
|
||||
local TEMP=$(getopt -o htqn:p: --long help,tail,quiet,num:,ps: -n 'dokku logs' -- "$@")
|
||||
local EXIT_CODE="$?"
|
||||
if [[ "$EXIT_CODE" != 0 ]]; then usage >&2 ; exit 1 ; fi
|
||||
if [[ "$EXIT_CODE" != 0 ]]; then fn-logs-usage >&2 ; exit 1 ; fi
|
||||
eval set -- "$TEMP"
|
||||
|
||||
local DOKKU_LOGS_LINE_NUMBERS="100"
|
||||
@@ -29,7 +27,7 @@ logs_default_cmd() {
|
||||
-p|--ps) local DOKKU_LOGS_ONLY_PROCESS="$2"; shift 2 ;;
|
||||
-q|--quiet) local DOKKU_LOGS_NO_PRETTY_PRINT="true"; shift ;;
|
||||
--) shift; break ;;
|
||||
*) echo "Internal error"; exit 1;;
|
||||
*) dokku_log_fail "Internal error";;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
33
plugins/logs/subcommands/failed
Executable file
33
plugins/logs/subcommands/failed
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-logs-failed() {
|
||||
declare desc="shows the last failed deploy logs"
|
||||
declare cmd="logs:failed" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
declare APP="$1"
|
||||
local DOKKU_SCHEDULER
|
||||
|
||||
if [[ -z "$APP" ]]; then
|
||||
local INSTALLED_APPS=$(dokku_apps)
|
||||
for app in $INSTALLED_APPS; do
|
||||
fn-logs-failed-single "$app" | tee || true
|
||||
done
|
||||
else
|
||||
fn-logs-failed-single "$APP"
|
||||
fi
|
||||
}
|
||||
|
||||
fn-logs-failed-single() {
|
||||
declare desc="shows the last failed deploy logs for an app"
|
||||
declare APP="$1"
|
||||
local DOKKU_SCHEDULER
|
||||
|
||||
dokku_log_info2_quiet "${APP} failed deploy logs"
|
||||
DOKKU_SCHEDULER=$(config_get "$APP" DOKKU_SCHEDULER || echo "docker-local")
|
||||
plugn trigger scheduler-logs-failed "$DOKKU_SCHEDULER" "$APP"
|
||||
}
|
||||
|
||||
cmd-logs-failed "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core network plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -26,3 +26,9 @@ nginx_vhosts_help_cmd() {
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
|
||||
nginx_clear_config() {
|
||||
declare desc="Remove the nginx conf file"
|
||||
declare APP="$1";
|
||||
rm -f "$DOKKU_ROOT/$APP/nginx.conf"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core nginx-vhosts plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
19
plugins/nginx-vhosts/proxy-clear-config
Executable file
19
plugins/nginx-vhosts/proxy-clear-config
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/internal-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
trigger-nginx-vhosts-clear-config() {
|
||||
declare desc="clear nginx config for proxy app containers from command line"
|
||||
declare trigger="trigger-nginx-vhosts-clear-config"
|
||||
declare APP="$1"
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
|
||||
if [[ "$(get_app_proxy_type "$APP")" = "nginx" ]]; then
|
||||
plugn trigger network-clear-config "$APP"
|
||||
nginx_clear_config "$APP"
|
||||
fi
|
||||
}
|
||||
|
||||
trigger-nginx-vhosts-clear-config "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core plugin plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -7,7 +7,7 @@ source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions"
|
||||
plugin_uninstall_cmd() {
|
||||
declare desc="uninstalls plugin via command line"
|
||||
local cmd="plugin:uninstall"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify a plugin to enable"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify a plugin to uninstall"
|
||||
local PLUGIN="$2"
|
||||
uninstall_plugin "$PLUGIN"
|
||||
plugin_prime_bash_completion
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core proxy plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ps plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -8,8 +8,13 @@ ps_restore_cmd() {
|
||||
declare desc="starts all apps with DOKKU_APP_RESTORE not set to 0 via command line"
|
||||
local cmd="ps:restore"
|
||||
local APP="$2"
|
||||
local DOKKU_SCHEDULER
|
||||
|
||||
DOKKU_SCHEDULER=$(config_get --global DOKKU_SCHEDULER || echo "docker-local")
|
||||
if [[ -n "$APP" ]]; then
|
||||
DOKKU_SCHEDULER=$(config_get "$APP" DOKKU_SCHEDULER || echo "docker-local")
|
||||
fi
|
||||
|
||||
local DOKKU_SCHEDULER=$(config_get "$APP" DOKKU_SCHEDULER || echo "docker-local")
|
||||
plugn trigger pre-restore "$DOKKU_SCHEDULER"
|
||||
|
||||
if [[ -n "$APP" ]]; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core repo plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
14
plugins/scheduler-docker-local/commands
Executable file
14
plugins/scheduler-docker-local/commands
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/scheduler-docker-local/internal-functions"
|
||||
|
||||
case "$1" in
|
||||
help | scheduler-docker-local:help)
|
||||
cmd-scheduler-docker-local-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
;;
|
||||
|
||||
esac
|
||||
15
plugins/scheduler-docker-local/install
Executable file
15
plugins/scheduler-docker-local/install
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
|
||||
scheduler-docker-local-install() {
|
||||
declare desc="scheduler-docker-local install plugin trigger"
|
||||
declare trigger="scheduler-docker-local-install"
|
||||
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local"
|
||||
chown -R "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/data/scheduler-docker-local"
|
||||
|
||||
fn-plugin-property-setup "scheduler-docker-local"
|
||||
}
|
||||
|
||||
scheduler-docker-local-install "$@"
|
||||
89
plugins/scheduler-docker-local/internal-functions
Executable file
89
plugins/scheduler-docker-local/internal-functions
Executable file
@@ -0,0 +1,89 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-scheduler-docker-local-report() {
|
||||
declare desc="displays a scheduler-docker-local report for one or more apps"
|
||||
local cmd="scheduler-docker-local:report"
|
||||
local INSTALLED_APPS=$(dokku_apps)
|
||||
local APP="$2" INFO_FLAG="$3"
|
||||
|
||||
if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then
|
||||
INFO_FLAG="$APP"
|
||||
APP=""
|
||||
fi
|
||||
|
||||
if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then
|
||||
INFO_FLAG="true"
|
||||
fi
|
||||
|
||||
if [[ -z "$APP" ]]; then
|
||||
for app in $INSTALLED_APPS; do
|
||||
cmd-scheduler-docker-local-report-single "$app" "$INFO_FLAG" | tee || true
|
||||
done
|
||||
else
|
||||
cmd-scheduler-docker-local-report-single "$APP" "$INFO_FLAG"
|
||||
fi
|
||||
}
|
||||
|
||||
cmd-scheduler-docker-local-report-single() {
|
||||
declare APP="$1" INFO_FLAG="$2"
|
||||
if [[ "$INFO_FLAG" == "true" ]]; then
|
||||
INFO_FLAG=""
|
||||
fi
|
||||
verify_app_name "$APP"
|
||||
local flag_map=(
|
||||
"--scheduler-docker-local-disable-chown: $(fn-plugin-property-get "scheduler-docker-local" "$APP" "disable-chown" "")"
|
||||
)
|
||||
|
||||
if [[ -z "$INFO_FLAG" ]]; then
|
||||
dokku_log_info2_quiet "${APP} scheduler-docker-local information"
|
||||
for flag in "${flag_map[@]}"; do
|
||||
key="$(echo "${flag#--}" | cut -f1 -d' ' | tr - ' ')"
|
||||
dokku_log_verbose "$(printf "%-30s %-25s" "${key^}" "${flag#*: }")"
|
||||
done
|
||||
else
|
||||
local match=false; local value_exists=false
|
||||
for flag in "${flag_map[@]}"; do
|
||||
valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)"
|
||||
if [[ "$flag" == "${INFO_FLAG}:"* ]]; then
|
||||
value=${flag#*: }
|
||||
size="${#value}"
|
||||
if [[ "$size" -ne 0 ]]; then
|
||||
echo "$value" && match=true && value_exists=true
|
||||
else
|
||||
match=true
|
||||
fi
|
||||
fi
|
||||
done
|
||||
[[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}"
|
||||
[[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed"
|
||||
fi
|
||||
}
|
||||
|
||||
scheduler_docker_local_help_content_func() {
|
||||
declare desc="return scheduler-docker-local plugin help content"
|
||||
cat<<help_content
|
||||
scheduler-docker-local:report [<app>] [<flag>], Displays a scheduler-docker-local report for one or more apps
|
||||
scheduler-docker-local:set <app> <property> (<value>), Set or clear a scheduler-docker-local property for an app
|
||||
help_content
|
||||
}
|
||||
|
||||
cmd-scheduler-docker-local-help() {
|
||||
if [[ $1 = "scheduler-docker-local:help" ]] ; then
|
||||
echo -e 'Usage: dokku scheduler-docker-local[:COMMAND]'
|
||||
echo ''
|
||||
echo 'Manages the scheduler-docker-local integration for an app.'
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
scheduler_docker_local_help_content_func | sort | column -c2 -t -s,
|
||||
echo ''
|
||||
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||
scheduler_docker_local_help_content_func
|
||||
else
|
||||
cat<<help_desc
|
||||
scheduler-docker-local, Manages the scheduler-docker-local integration for an app
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core scheduler-docker-local plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
13
plugins/scheduler-docker-local/post-create
Executable file
13
plugins/scheduler-docker-local/post-create
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
scheduler-docker-local-post-create() {
|
||||
declare desc="scheduler-docker-local post-create plugin trigger"
|
||||
declare trigger="scheduler-docker-local-post-create"
|
||||
declare APP="$1"
|
||||
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/${APP}"
|
||||
chown -R "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/${APP}"
|
||||
}
|
||||
|
||||
scheduler-docker-local-post-create "$@"
|
||||
@@ -1,13 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
scheduler-docker-local-pre-deploy() {
|
||||
declare desc="scheduler-docker-local pre-deploy plugin trigger"
|
||||
declare trigger="scheduler-docker-local pre-deploy"
|
||||
declare APP="$1" IMAGE_TAG="$2"
|
||||
local IMAGE DOCKER_ARGS DOKKU_APP_TYPE DOKKU_APP_USER APP_PATHS CONTAINER_PATHS
|
||||
local IMAGE DISABLE_CHOWN DOCKER_ARGS DOKKU_APP_TYPE DOKKU_APP_USER APP_PATHS CONTAINER_PATHS
|
||||
declare -a ARG_ARRAY
|
||||
|
||||
local DOKKU_SCHEDULER=$(config_get "$APP" DOKKU_SCHEDULER || echo "docker-local")
|
||||
@@ -30,10 +31,17 @@ scheduler-docker-local-pre-deploy() {
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
fi
|
||||
|
||||
if [[ "$DOKKU_APP_TYPE" == "herokuish" ]] && [[ -n "$CONTAINER_PATHS" ]]; then
|
||||
# shellcheck disable=SC2086
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS "${ARG_ARRAY[@]}" $IMAGE /bin/bash -c "find $CONTAINER_PATHS -not -user $DOKKU_APP_USER -print0 | xargs -0 -r chown -R $DOKKU_APP_USER" || true
|
||||
if [[ "$DOKKU_APP_TYPE" != "herokuish" ]] || [[ -z "$CONTAINER_PATHS" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
DISABLE_CHOWN="$(fn-plugin-property-get "scheduler-docker-local" "$APP" "disable-chown" "")"
|
||||
if [[ "$DISABLE_CHOWN" == "true" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS "${ARG_ARRAY[@]}" $IMAGE /bin/bash -c "find $CONTAINER_PATHS -not -user $DOKKU_APP_USER -print0 | xargs -0 -r chown -R $DOKKU_APP_USER" || true
|
||||
}
|
||||
|
||||
scheduler-docker-local-pre-deploy "$@"
|
||||
|
||||
5
plugins/scheduler-docker-local/report
Executable file
5
plugins/scheduler-docker-local/report
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/scheduler-docker-local/internal-functions"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-scheduler-docker-local-report-single "$@"
|
||||
@@ -13,6 +13,8 @@ scheduler-docker-local-scheduler-deploy() {
|
||||
return
|
||||
fi
|
||||
|
||||
rm -f "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/failed-containers"
|
||||
|
||||
local DOKKU_DOCKER_STOP_TIMEOUT DOKKU_HEROKUISH DOKKU_NETWORK_BIND_ALL IMAGE
|
||||
DOKKU_HEROKUISH=false
|
||||
IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
@@ -96,14 +98,16 @@ scheduler-docker-local-scheduler-deploy() {
|
||||
|
||||
kill_new() {
|
||||
declare desc="wrapper function to kill newly started app container"
|
||||
local cid="$1"
|
||||
docker inspect "$cid" &> /dev/null && docker stop "$cid" > /dev/null && docker kill "$cid" &> /dev/null
|
||||
declare CID="$1" PROC_TYPE="$2" CONTAINER_INDEX="$3"
|
||||
docker inspect "$CID" &> /dev/null && docker stop "$CID" > /dev/null && docker kill "$CID" &> /dev/null
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP"
|
||||
echo "${CID} ${PROC_TYPE}.${CONTAINER_INDEX}" >> "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/failed-containers"
|
||||
trap - INT TERM EXIT
|
||||
kill -9 $$
|
||||
}
|
||||
|
||||
# run checks first, then post-deploy hooks, which switches proxy traffic
|
||||
trap 'kill_new $cid' INT TERM EXIT
|
||||
trap 'kill_new $cid $PROC_TYPE $CONTAINER_INDEX' INT TERM EXIT
|
||||
if [[ "$(is_app_proctype_checks_disabled "$APP" "$PROC_TYPE")" == "false" ]]; then
|
||||
dokku_log_info1 "Attempting pre-flight checks"
|
||||
plugn trigger check-deploy "$APP" "$cid" "$PROC_TYPE" "$port" "$ipaddr"
|
||||
@@ -164,7 +168,7 @@ scheduler-docker-local-scheduler-deploy() {
|
||||
# shellcheck disable=SC2086
|
||||
docker stop $DOCKER_STOP_TIME_ARG "$oldid" \
|
||||
|| docker kill "$oldid" \
|
||||
|| plugn trigger retire-container-failed "$APP" # plugin trigger for event logging
|
||||
|| plugn trigger retire-container-failed "$APP" "$oldid" # plugin trigger for event logging
|
||||
done
|
||||
) & disown -a
|
||||
# Use trap since disown/nohup don't seem to keep child alive
|
||||
|
||||
56
plugins/scheduler-docker-local/scheduler-logs-failed
Executable file
56
plugins/scheduler-docker-local/scheduler-logs-failed
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
scheduler-docker-local-scheduler-logs-failed() {
|
||||
declare desc="scheduler-docker-local scheduler-logs-failed plugin trigger"
|
||||
declare trigger="scheduler-docker-local scheduler-logs-failed"
|
||||
declare DOKKU_SCHEDULER="$1" APP="$2"
|
||||
local FAILED_CONTAINERS_FILE="${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/failed-containers"
|
||||
local DEAD_CONTAINERS=() DOKKU_LOGS_CMD=() RUNNING_CONTAINERS=()
|
||||
local CID LINE PREFIX
|
||||
shift 2
|
||||
|
||||
if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -f "$FAILED_CONTAINERS_FILE" ]]; then
|
||||
dokku_log_warn "No failed containers found"
|
||||
return
|
||||
fi
|
||||
|
||||
while read -r LINE || [[ -n "$LINE" ]]; do
|
||||
CID="$(echo "$LINE" | cut -d ' ' -f1)"
|
||||
PREFIX="$(echo "$LINE" | cut -d ' ' -f2)"
|
||||
if docker inspect "${CID}" > /dev/null 2>&1; then
|
||||
RUNNING_CONTAINERS+=("$CID")
|
||||
else
|
||||
DEAD_CONTAINERS+=("$CID")
|
||||
fi
|
||||
done < "$FAILED_CONTAINERS_FILE"
|
||||
|
||||
for CID in "${DEAD_CONTAINERS[@]}"; do
|
||||
dokku_log_warn "App container $CID no longer running"
|
||||
sed -i "/${CID}/d" "$FAILED_CONTAINERS_FILE"
|
||||
done
|
||||
|
||||
if [[ ${#RUNNING_CONTAINERS[@]} -eq 0 ]]; then
|
||||
dokku_log_warn "No failed containers found"
|
||||
return
|
||||
fi
|
||||
|
||||
((MAX_INDEX=${#RUNNING_CONTAINERS[*]} - 1)) || true
|
||||
for i in ${!RUNNING_CONTAINERS[*]}; do
|
||||
local CID="${RUNNING_CONTAINERS[i]}"
|
||||
DOKKU_LOGS_CMD+="(docker logs $DOKKU_LOGS_ARGS $CID 2>&1)"
|
||||
if [[ $i != "$MAX_INDEX" ]]; then
|
||||
local DOKKU_LOGS_CMD+="& "
|
||||
else
|
||||
local DOKKU_LOGS_CMD+="; "
|
||||
fi
|
||||
done
|
||||
bash -c "($DOKKU_LOGS_CMD)"
|
||||
}
|
||||
|
||||
scheduler-docker-local-scheduler-logs-failed "$@"
|
||||
5
plugins/scheduler-docker-local/subcommands/default
Executable file
5
plugins/scheduler-docker-local/subcommands/default
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/scheduler-docker-local/internal-functions"
|
||||
|
||||
cmd-scheduler-docker-local-help "scheduler-docker-local:help"
|
||||
5
plugins/scheduler-docker-local/subcommands/report
Executable file
5
plugins/scheduler-docker-local/subcommands/report
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/scheduler-docker-local/internal-functions"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-scheduler-docker-local-report "$@"
|
||||
37
plugins/scheduler-docker-local/subcommands/set
Executable file
37
plugins/scheduler-docker-local/subcommands/set
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
fn-in-array() {
|
||||
declare desc="return true if value ($1) is in list (all other arguments)"
|
||||
|
||||
local e
|
||||
for e in "${@:2}"; do
|
||||
[[ "$e" == "$1" ]] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
scheduler-docker-local-set-cmd() {
|
||||
declare desc="set or clear a scheduler-docker-local property for an app"
|
||||
local cmd="scheduler-docker-local:set" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
declare APP="$1" KEY="$2" VALUE="$3"
|
||||
local VALID_KEYS=("disable-chown")
|
||||
[[ -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
|
||||
dokku_log_fail "Invalid key specified, valid keys include: disable-chown"
|
||||
fi
|
||||
|
||||
if [[ -n "$VALUE" ]]; then
|
||||
dokku_log_info2_quiet "Setting ${KEY} to ${VALUE}"
|
||||
fn-plugin-property-write "scheduler-docker-local" "$APP" "$KEY" "$VALUE"
|
||||
else
|
||||
dokku_log_info2_quiet "Unsetting ${KEY}"
|
||||
fn-plugin-property-delete "scheduler-docker-local" "$APP" "$KEY"
|
||||
fi
|
||||
}
|
||||
|
||||
scheduler-docker-local-set-cmd "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core shell plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ssh-keys plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -106,6 +106,6 @@ storage_list_cmd() {
|
||||
local passed_phases="deploy"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$2" && local APP="$2"
|
||||
echo "$APP volume bind-mounts:"
|
||||
dokku_log_quiet "$APP volume bind-mounts:"
|
||||
get_bind_mounts "$(get_phase_file_path "$passed_phases")"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core storage plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tags plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
tar_build() {
|
||||
declare desc="builds apps from tarball via command line"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tar plugin"
|
||||
version = "0.12.6"
|
||||
version = "0.12.12"
|
||||
[plugin.config]
|
||||
|
||||
@@ -113,6 +113,19 @@ teardown () {
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(apps) apps:rename with tls" {
|
||||
setup_test_tls
|
||||
deploy_app
|
||||
run bash -c "dokku apps:rename $TEST_APP great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
run bash -c "dokku --force apps:destroy great-test-name"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(apps) apps:clone" {
|
||||
deploy_app
|
||||
run bash -c "dokku apps:clone $TEST_APP great-test-name"
|
||||
@@ -213,4 +226,4 @@ teardown () {
|
||||
assert_output "false"
|
||||
|
||||
destroy_app
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,12 +24,6 @@ assert_urls() {
|
||||
assert_output < <(tr ' ' '\n' <<< "${urls}")
|
||||
}
|
||||
|
||||
build_nginx_config() {
|
||||
# simulate nginx post-deploy
|
||||
dokku domains:setup $TEST_APP
|
||||
dokku nginx:build-config $TEST_APP
|
||||
}
|
||||
|
||||
@test "(core) remove exited containers" {
|
||||
deploy_app
|
||||
|
||||
|
||||
@@ -31,12 +31,6 @@ assert_url() {
|
||||
assert_output "${url}"
|
||||
}
|
||||
|
||||
build_nginx_config() {
|
||||
# simulate nginx post-deploy
|
||||
dokku domains:setup $TEST_APP
|
||||
dokku nginx:build-config $TEST_APP
|
||||
}
|
||||
|
||||
@test "(core) run (with --options)" {
|
||||
deploy_app
|
||||
run /bin/bash -c "dokku --force --quiet run $TEST_APP node --version"
|
||||
|
||||
@@ -372,3 +372,9 @@ cat<<EOF > "$APP_REPO_DIR/nginx.conf.sigil"
|
||||
some lame nginx config
|
||||
EOF
|
||||
}
|
||||
|
||||
build_nginx_config() {
|
||||
# simulate nginx post-deploy
|
||||
dokku domains:setup "$TEST_APP"
|
||||
dokku nginx:build-config "$TEST_APP"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user