Compare commits
81 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5c4543282 | ||
|
|
0b34544125 | ||
|
|
cd33ec2f02 | ||
|
|
57fc5ec333 | ||
|
|
a756786f93 | ||
|
|
daddabc7b1 | ||
|
|
6014b7208f | ||
|
|
527b076732 | ||
|
|
de67bd19b2 | ||
|
|
6c709f2386 | ||
|
|
d26c12e6eb | ||
|
|
74d230c11c | ||
|
|
b146483940 | ||
|
|
9e2c79c5ed | ||
|
|
a0cece197f | ||
|
|
57858c1788 | ||
|
|
88736c1000 | ||
|
|
48357adac1 | ||
|
|
3b4d101a42 | ||
|
|
c3871e7da9 | ||
|
|
7a4ead4db4 | ||
|
|
c32d0cc791 | ||
|
|
b3c732e487 | ||
|
|
ae14b02cbd | ||
|
|
1532590b50 | ||
|
|
d3cbb730ac | ||
|
|
ffd5c896ed | ||
|
|
6bc960e10c | ||
|
|
2e237041ec | ||
|
|
23798b575b | ||
|
|
b690d9d18d | ||
|
|
cd030f4fa0 | ||
|
|
6db82861e6 | ||
|
|
a637ffc848 | ||
|
|
760be655e9 | ||
|
|
01e317259b | ||
|
|
c74c542b1f | ||
|
|
c4ad455aad | ||
|
|
8c43542f2e | ||
|
|
61f8590553 | ||
|
|
d84c17d9e2 | ||
|
|
c9d10b8a2b | ||
|
|
b43cec2d6b | ||
|
|
e1d5228796 | ||
|
|
fd77f9c7a0 | ||
|
|
f6b03dd55f | ||
|
|
43631e8847 | ||
|
|
afea3b54a8 | ||
|
|
17a2b333f3 | ||
|
|
06e63c8f95 | ||
|
|
1bc8bb2a24 | ||
|
|
1bf8493cd1 | ||
|
|
e705d4eed8 | ||
|
|
6e46bacf92 | ||
|
|
69bb8e3077 | ||
|
|
3aa7d39358 | ||
|
|
867403f589 | ||
|
|
cce7c5cb97 | ||
|
|
6ad8aa7988 | ||
|
|
36294e09a3 | ||
|
|
fddf130abd | ||
|
|
c0b6942392 | ||
|
|
f949fe2a49 | ||
|
|
55554ce9bd | ||
|
|
904894722f | ||
|
|
a8a167f87f | ||
|
|
cd7b8afccb | ||
|
|
6c6e72ca04 | ||
|
|
9616473c3a | ||
|
|
e53e8bb59f | ||
|
|
5cfe7610b2 | ||
|
|
6b50ba66a9 | ||
|
|
685ef90018 | ||
|
|
b48b79f5ca | ||
|
|
8f7f03a7d8 | ||
|
|
d1a16717b3 | ||
|
|
aa77638ca7 | ||
|
|
e893ac2aaa | ||
|
|
1f8c5509cf | ||
|
|
3c6396fbca | ||
|
|
8984b748c5 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -159,6 +159,6 @@ jobs:
|
||||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1
|
||||
with:
|
||||
check_name: Unit Test Results
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
files: test-results/**/*.xml
|
||||
comment_on_pr: false
|
||||
|
||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -83,5 +83,6 @@ jobs:
|
||||
run: |
|
||||
git config --global user.name 'Dokku Bot'
|
||||
git config --global user.email no-reply@dokku.com
|
||||
brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
|
||||
# brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
|
||||
brew tap dokku/repo
|
||||
brew bump-formula-pr -f --no-browse --no-audit --no-fork --debug --verbose --url "https://github.com/dokku/dokku/archive/${{ needs.release.outputs.version }}.tar.gz" dokku/repo/dokku
|
||||
|
||||
112
HISTORY.md
112
HISTORY.md
@@ -1,5 +1,115 @@
|
||||
# History
|
||||
|
||||
## 0.26.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4899: @josegonzalez Ensure we respect quotes and dollar signs in config vars
|
||||
- #4890: @josegonzalez Drop which in favor of command -v
|
||||
|
||||
### Other
|
||||
|
||||
- #4897: @josegonzalez Silence errors when verifying the ssl certificate
|
||||
- #4891: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 199 to 200 in /tests/apps/php
|
||||
|
||||
## 0.26.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4889: @josegonzalez Skip herokuish version in report output and disable the herokuish builder on armhf architectures
|
||||
|
||||
## 0.26.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4888: @josegonzalez Ensure installations treat raspbian as similar to debian buster as possible
|
||||
- #4887: @josegonzalez Ensure we do not add two debian folders in a single armhf package
|
||||
|
||||
### New Features
|
||||
|
||||
- #4886: @josegonzalez Add created-at time to apps:report output
|
||||
|
||||
## 0.26.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4884: @josegonzalez Correct recommends entry for bash-completion
|
||||
|
||||
### New Features
|
||||
|
||||
- #4885: @josegonzalez Add experimental support for arm devices
|
||||
|
||||
## 0.26.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
See the [0.26.0 migration guide](/docs/appendices/0.26.0-migration-guide.md) for more information on migrating to 0.26.0.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4882: @josegonzalez Add missing setup/teardown of builder plugin properties
|
||||
- #4880: @josegonzalez Ensure the null scheduler reports the app as running when in use
|
||||
- #4871: @josegonzalez Do not error when default Procfile path does not exist when using a custom procfile-path
|
||||
- #4861: @josegonzalez Add missing clone/rename code for plugins
|
||||
|
||||
### New Features
|
||||
|
||||
- #4864: @josegonzalez Switch to unauthenticated tap for formula bumping
|
||||
- #4860: @josegonzalez Add ability to increase the max parallelism when deploying a given process type
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4883: @josegonzalez Enable vertical scrolling on the version selector
|
||||
- #4879: @josegonzalez Clarify that the docker-based dokku installation is ready when a certain message appears
|
||||
- #4863: @josegonzalez Clarify what is necessary for implementing a scheduler plugin
|
||||
|
||||
### Other
|
||||
|
||||
- #4874: @josegonzalez Upgrade vector log integration to 0.17.x
|
||||
- #4881: @josegonzalez Drop bindutils as alternative dependency to bind-utils
|
||||
- #4869: @dependabot[bot] chore(deps): bump socket.io from 4.2.0 to 4.3.0 in /tests/apps/.websocket.disabled
|
||||
- #4868: @dependabot[bot] chore(deps): bump jetty-servlet from 11.0.6 to 11.0.7 in /tests/apps/java
|
||||
- #4866: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 198 to 199 in /tests/apps/php
|
||||
- #4862: @josegonzalez Set deploy-source and metadata at deploy time
|
||||
- #4853: @josegonzalez Remove dangling images
|
||||
- #4765: @josegonzalez Allow specifying a single process type to restart
|
||||
- #4859: @josegonzalez Remove deprecated tar plugin
|
||||
- #4858: @josegonzalez Remove deprecated tags plugin
|
||||
- #4857: @josegonzalez Implement scheduler management plugin
|
||||
|
||||
## 0.25.7
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
@@ -3370,7 +3480,6 @@ Thanks to all the contributors who helped with this release!
|
||||
- #2388: @josegonzalez Add documentation for proxy ports scheme handling
|
||||
- #2389: @josegonzalez Add plugin management documentation
|
||||
|
||||
|
||||
## 0.7.0
|
||||
|
||||
Another great minor release! There are no known backwards incompatibilities with this release, though the following may be of interest to our users:
|
||||
@@ -4756,7 +4865,6 @@ This release pegs Dokku to Docker 1.6.2. Docker 1.7.0 introduced changes in `doc
|
||||
- #749: @vincentfretin Fix app certificate directory in backup-import/export
|
||||
- #750: @th4t Remove unintended phrase repetition in installation.md
|
||||
|
||||
|
||||
## 0.2.0 (2013-11-24)
|
||||
|
||||
* Added DOKKU_TRACE variable for verbose trace information
|
||||
|
||||
4
Makefile
4
Makefile
@@ -110,7 +110,11 @@ endif
|
||||
|
||||
addman: help2man man-db
|
||||
mkdir -p /usr/local/share/man/man1
|
||||
ifneq ("$(wildcard /usr/local/share/man/man1/dokku.1-generated)","")
|
||||
cp /usr/local/share/man/man1/dokku.1-generated /usr/local/share/man/man1/dokku.1
|
||||
else
|
||||
help2man -Nh help -v version -n "configure and get information from your dokku installation" -o /usr/local/share/man/man1/dokku.1 dokku
|
||||
endif
|
||||
mandb
|
||||
|
||||
version:
|
||||
|
||||
@@ -98,8 +98,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.25.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.7 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to configure your server domain (via `dokku domains:set-global`) and user access (via `dokku ssh-keys:add`) to complete the installation.
|
||||
|
||||
@@ -189,7 +189,7 @@ install-dokku-from-deb-package() {
|
||||
fi
|
||||
|
||||
OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
|
||||
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu"; then
|
||||
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu" "raspbian"; then
|
||||
DOKKU_DISTRO="ubuntu"
|
||||
OS_ID="bionic"
|
||||
fi
|
||||
@@ -204,6 +204,11 @@ install-dokku-from-deb-package() {
|
||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||
OS_ID="bullseye"
|
||||
fi
|
||||
elif [[ "$DOKKU_DISTRO" == "raspbian" ]]; then
|
||||
OS_IDS=("buster")
|
||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||
OS_ID="buster"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "--> Installing dokku"
|
||||
|
||||
@@ -3,8 +3,9 @@ GO_PLUGIN_MAKE_TARGET ?= build
|
||||
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
||||
BUILD_IMAGE := golang:1.15.6
|
||||
GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache
|
||||
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
|
||||
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)
|
||||
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
|
||||
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)
|
||||
GOARCH ?= amd64
|
||||
|
||||
.PHONY: build-in-docker build clean src-clean
|
||||
|
||||
@@ -20,7 +21,7 @@ build-in-docker: clean
|
||||
-e GO111MODULE=on \
|
||||
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
|
||||
$(BUILD_IMAGE) \
|
||||
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
|
||||
bash -c "GO_ARGS='$(GO_ARGS)' CGO_ENABLED=0 GOOS=linux GOARCH=$(GOARCH) make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM dokku/build-base:0.0.1
|
||||
FROM dokku/build-base:0.0.1 AS builder
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@@ -8,8 +8,8 @@ RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
ARG GOLANG_VERSION
|
||||
|
||||
RUN wget -qO /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz \
|
||||
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz \
|
||||
&& cp /usr/local/go/bin/* /usr/local/bin
|
||||
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz \
|
||||
&& cp /usr/local/go/bin/* /usr/local/bin
|
||||
|
||||
ARG WORKDIR=/go/src/github.com/dokku/dokku
|
||||
|
||||
@@ -22,19 +22,41 @@ RUN make deb-setup rpm-setup sshcommand plugn
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
||||
ENV GOPATH=/go
|
||||
|
||||
FROM builder as amd64
|
||||
|
||||
ARG PLUGIN_MAKE_TARGET
|
||||
ARG DOKKU_VERSION=master
|
||||
ARG DOKKU_GIT_REV
|
||||
ARG IS_RELEASE=false
|
||||
|
||||
ENV GOPATH=/go
|
||||
RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
DOKKU_VERSION=${DOKKU_VERSION} \
|
||||
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
make version copyfiles \
|
||||
&& make deb-dokku rpm-dokku
|
||||
|
||||
FROM builder as armhf
|
||||
|
||||
COPY --from=amd64 /tmp /tmp
|
||||
COPY --from=amd64 /usr/local/share/man/man1/dokku.1 /usr/local/share/man/man1/dokku.1-generated
|
||||
|
||||
RUN rm -rf /tmp/build-dokku
|
||||
|
||||
ARG PLUGIN_MAKE_TARGET
|
||||
ARG DOKKU_VERSION=master
|
||||
ARG DOKKU_GIT_REV
|
||||
ARG IS_RELEASE=false
|
||||
|
||||
RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
DOKKU_VERSION=${DOKKU_VERSION} \
|
||||
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
make version copyfiles \
|
||||
&& make deb-dokku rpm-dokku
|
||||
DOKKU_VERSION=${DOKKU_VERSION} \
|
||||
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
GOARCH=arm make version copyfiles \
|
||||
&& DOKKU_ARCHITECTURE=armhf GOARCH=arm make deb-dokku
|
||||
|
||||
RUN ls -lha /tmp/
|
||||
|
||||
@@ -160,7 +160,7 @@ main() {
|
||||
}
|
||||
}
|
||||
|
||||
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
|
||||
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(command -v dokku) ]]; then
|
||||
main "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
@@ -49,6 +49,7 @@ fn-build-dokku() {
|
||||
--build-arg IS_RELEASE="$IS_RELEASE" \
|
||||
--build-arg PLUGIN_MAKE_TARGET="build" \
|
||||
--build-arg GOLANG_VERSION="$GOLANG_VERSION" \
|
||||
--progress plain \
|
||||
-f "contrib/build-dokku.Dockerfile" \
|
||||
-t "$NAME" .
|
||||
return "$?"
|
||||
@@ -134,8 +135,19 @@ fn-publish-package() {
|
||||
|
||||
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
[[ "$RELEASE_TYPE" == "raspbian" ]] && DIST=raspbian
|
||||
|
||||
if [[ "$DIST" == "ubuntu" ]]; then
|
||||
if [[ "$RELEASE_TYPE" == "raspbian" ]]; then
|
||||
OS_IDS=("buster")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing deb 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
|
||||
elif [[ "$DIST" == "ubuntu" ]]; then
|
||||
OS_IDS=("bionic" "focal")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
@@ -379,11 +391,13 @@ main() {
|
||||
|
||||
fn-repo-update "$IS_RELEASE" "$CURRENT_VERSION" "$NEXT_VERSION"
|
||||
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION" || log-fail "Error building package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_armhf.deb" || log-fail "Error extracting deb package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
|
||||
cp -f "build/dokku_${NEXT_VERSION}_amd64.deb" build/dokku.deb
|
||||
|
||||
if [[ "$RELEASE" != "build" ]]; then
|
||||
fn-publish-package "$IS_RELEASE" "raspbian" "build/dokku_${NEXT_VERSION}_armhf.deb" || log-fail "Error publishing deb package"
|
||||
fn-publish-package "$IS_RELEASE" "deb" "build/dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
|
||||
fn-publish-package "$IS_RELEASE" "rpm" "build/dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
|
||||
fn-build-docker-image "$NEXT_VERSION" || log-fail "Error building docker image"
|
||||
|
||||
11
deb.mk
11
deb.mk
@@ -1,8 +1,7 @@
|
||||
BUILD_DIRECTORY ?= /tmp
|
||||
|
||||
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE = amd64
|
||||
BUILD_DIRECTORY ?= /tmp
|
||||
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE ?= amd64
|
||||
|
||||
ifndef IS_RELEASE
|
||||
IS_RELEASE = true
|
||||
@@ -45,9 +44,9 @@ ifneq (,$(findstring false,$(IS_RELEASE)))
|
||||
endif
|
||||
|
||||
cp -r debian /tmp/build-dokku/DEBIAN
|
||||
sed -i.bak "s/^Architecture: .*/Architecture: $(DOKKU_ARCHITECTURE)/g" /tmp/build-dokku/DEBIAN/control && rm /tmp/build-dokku/DEBIAN/control.bak
|
||||
rm -f /tmp/build-dokku/DEBIAN/lintian-overrides
|
||||
cp debian/lintian-overrides /tmp/build-dokku/usr/share/lintian/overrides/dokku
|
||||
sed -i.bak "s/^Version: .*/Version: `cat /tmp/build-dokku/var/lib/dokku/STABLE_VERSION`/g" /tmp/build-dokku/DEBIAN/control && rm /tmp/build-dokku/DEBIAN/control.bak
|
||||
dpkg-deb --build /tmp/build-dokku "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
lintian "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -1,10 +1,10 @@
|
||||
Package: dokku
|
||||
Version: 0.25.7
|
||||
Version: 0.26.4
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), net-tools, netrc, software-properties-common, parallel, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip
|
||||
Recommends: herokuish (>= 0.3.4), bash-completionl, dokku-update, dokku-event-listener
|
||||
Recommends: herokuish (>= 0.3.4), bash-completion, 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>
|
||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||
|
||||
@@ -35,35 +35,35 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.25.7 enabled dokku core standard plugin
|
||||
20_events 0.25.7 enabled dokku core events logging plugin
|
||||
app-json 0.25.7 enabled dokku core app-json plugin
|
||||
apps 0.25.7 enabled dokku core apps plugin
|
||||
build-env 0.25.7 enabled dokku core build-env plugin
|
||||
buildpacks 0.25.7 enabled dokku core buildpacks plugin
|
||||
certs 0.25.7 enabled dokku core certificate management plugin
|
||||
checks 0.25.7 enabled dokku core checks plugin
|
||||
common 0.25.7 enabled dokku core common plugin
|
||||
config 0.25.7 enabled dokku core config plugin
|
||||
docker-options 0.25.7 enabled dokku core docker-options plugin
|
||||
domains 0.25.7 enabled dokku core domains plugin
|
||||
enter 0.25.7 enabled dokku core enter plugin
|
||||
git 0.25.7 enabled dokku core git plugin
|
||||
logs 0.25.7 enabled dokku core logs plugin
|
||||
network 0.25.7 enabled dokku core network plugin
|
||||
nginx-vhosts 0.25.7 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.25.7 enabled dokku core plugin plugin
|
||||
proxy 0.25.7 enabled dokku core proxy plugin
|
||||
ps 0.25.7 enabled dokku core ps plugin
|
||||
repo 0.25.7 enabled dokku core repo plugin
|
||||
resource 0.25.7 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.25.7 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.25.7 enabled dokku core shell plugin
|
||||
ssh-keys 0.25.7 enabled dokku core ssh-keys plugin
|
||||
storage 0.25.7 enabled dokku core storage plugin
|
||||
tags 0.25.7 enabled dokku core tags plugin
|
||||
tar 0.25.7 enabled dokku core tar plugin
|
||||
trace 0.25.7 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.26.4 enabled dokku core standard plugin
|
||||
20_events 0.26.4 enabled dokku core events logging plugin
|
||||
app-json 0.26.4 enabled dokku core app-json plugin
|
||||
apps 0.26.4 enabled dokku core apps plugin
|
||||
build-env 0.26.4 enabled dokku core build-env plugin
|
||||
buildpacks 0.26.4 enabled dokku core buildpacks plugin
|
||||
certs 0.26.4 enabled dokku core certificate management plugin
|
||||
checks 0.26.4 enabled dokku core checks plugin
|
||||
common 0.26.4 enabled dokku core common plugin
|
||||
config 0.26.4 enabled dokku core config plugin
|
||||
docker-options 0.26.4 enabled dokku core docker-options plugin
|
||||
domains 0.26.4 enabled dokku core domains plugin
|
||||
enter 0.26.4 enabled dokku core enter plugin
|
||||
git 0.26.4 enabled dokku core git plugin
|
||||
logs 0.26.4 enabled dokku core logs plugin
|
||||
network 0.26.4 enabled dokku core network plugin
|
||||
nginx-vhosts 0.26.4 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.26.4 enabled dokku core plugin plugin
|
||||
proxy 0.26.4 enabled dokku core proxy plugin
|
||||
ps 0.26.4 enabled dokku core ps plugin
|
||||
repo 0.26.4 enabled dokku core repo plugin
|
||||
resource 0.26.4 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.26.4 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.26.4 enabled dokku core shell plugin
|
||||
ssh-keys 0.26.4 enabled dokku core ssh-keys plugin
|
||||
storage 0.26.4 enabled dokku core storage plugin
|
||||
tags 0.26.4 enabled dokku core tags plugin
|
||||
tar 0.26.4 enabled dokku core tar plugin
|
||||
trace 0.26.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.
|
||||
|
||||
@@ -25,7 +25,7 @@ The [dokku-registry](https://github.com/dokku/dokku-registry) plugin is now buil
|
||||
- In previous versions of Dokku, the only way to specify a custom `Dockerfile` was to use the `docker-options` plugin to set the `--file` flag for a docker build. As of 0.25.0, the `builder-dockerfile:set` command should be used instead, as outlined in the [docs here](/docs/deployment/builders/dockerfiles.md#changingthe-dockerfile-location). Usage of the old method should be migrated to the new method.
|
||||
- The `--rm` and `--rm-container` flags may be specified but no longer have any effect on `dokku run`.
|
||||
- The `--detach` flag is deprecated in favor of the `run:detached` command.
|
||||
- The `DOKKU_SCALE` file is deprecated. Please see the [process management documentation](/docs/processes/process-management.md#manually-managing-process-scaling) for more information on it's replacement with the `formations` key of the `app.json` file.
|
||||
- The `DOKKU_SCALE` file is deprecated. Please see the [process management documentation](/docs/processes/process-management.md#manually-managing-process-scaling) for more information on it's replacement with the `formation` key of the `app.json` file.
|
||||
- The hooks `post-release-buildpack`, `post-release-dockerfile`, and `post-release-pack` are deprecated in favor of `post-release-builder`. See the [plugin triggers documentation](https://dokku.com/docs/development/plugin-triggers/#post-release-builder) for more details.
|
||||
|
||||
## Removals
|
||||
|
||||
12
docs/appendices/0.26.0-migration-guide.md
Normal file
12
docs/appendices/0.26.0-migration-guide.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# 0.26.0 Migration Guide
|
||||
|
||||
## Removals
|
||||
|
||||
- The `tags` plugin - deprecated in [0.24.0](/docs/appendices/0.24.0-migration-guide.md) - was removed. Users are highly encouraged to switch their workflows to `git:from-image`.
|
||||
- The `tar` plugin - deprecated in [0.24.0](/docs/appendices/0.24.0-migration-guide.md) - was removed. Users are highly encouraged to switch their workflows to `git:from-archive`.
|
||||
|
||||
## Changes
|
||||
|
||||
- The `scheduler` plugin now controls the scheduler in use for deploys. Apps will have their `DOKKU_SCHEDULER` environment variables migrated to the scheduler plugin, after which that value will be removed from said app. Please see the [scheduler documentation](/docs/deployment/schedulers/scheduler-management.md) for more information.
|
||||
- The `deploy-source` metadata from `apps:report` is now no longer computed on the fly, but hydrated at deploy time via the `deploy-source-set` trigger. This value may be empty until your next deploy.
|
||||
- Additionally, the `deploy-source` trigger has now been removed.
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -42,13 +42,13 @@ h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.25.7/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -540,7 +540,9 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
bottom: 20px;
|
||||
display: block;
|
||||
left: auto;
|
||||
max-height: 600px;
|
||||
max-width: 300px;
|
||||
overflow: scroll;
|
||||
right: 20px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"0.22.9",
|
||||
"0.23.9",
|
||||
"0.24.10",
|
||||
"0.25.7"
|
||||
"0.25.7",
|
||||
"0.26.4"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -243,17 +243,23 @@ dokku apps:report
|
||||
|
||||
```
|
||||
=====> node-js-app app information
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
App created at: 1635126111
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App deploy source metadata: cd7b8afccb202f222e7dc7b427553e71ba5ddafd
|
||||
App locked: false
|
||||
=====> python-sample app information
|
||||
App dir: /home/dokku/python-sample
|
||||
App created at: 1635126000
|
||||
App dir: /home/dokku/python-sample
|
||||
App deploy source:
|
||||
App locked: false
|
||||
App deploy source metadata:
|
||||
App locked: false
|
||||
=====> ruby-sample app information
|
||||
App dir: /home/dokku/ruby-sample
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
App created at: 1635122462
|
||||
App dir: /home/dokku/ruby-sample
|
||||
App deploy source: git
|
||||
App deploy source metadata: c60921ea2799ca108276414b95ea197f16798d51
|
||||
App locked: false
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
@@ -264,9 +270,10 @@ dokku apps:report node-js-app
|
||||
|
||||
```
|
||||
=====> node-js-app app information
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App deploy source metadata: cd7b8afccb202f222e7dc7b427553e71ba5ddafd
|
||||
App locked: false
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
@@ -17,6 +17,7 @@ Dokku supports the following built-in builders:
|
||||
|
||||
- `builder-dockerfile`: Builds apps using a `Dockerfile` via `docker build`. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how this builder functions.
|
||||
- `builder-herokuish`: Builds apps with Heroku's v2a Buildpack specification via `gliderlabs/herokuish`. See the [herokuish builder documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how this builder functions.
|
||||
- `builder-null`: Does nothing during the build phase. See the [null builder documentation](/docs/deployment/builders/null.md) for more information on how this builder functions.
|
||||
- `builder-pack`: Builds apps with Cloud Native Buildpacks via the `pack-cli` tool. See the [cloud native buildpacks builder documentation](/docs/deployment/builders/cloud-native-buildpacks.md) for more information on how this builder functions.
|
||||
|
||||
Builders run a detection script against a source code repository, and the first detected builder will be used to build the app artifact. The exception to this is when a `Dockerfile` is detected and the app is also able to use either `herokuish` or `pack-cli` for building, in which case one of the latter will be chosen.
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
# Docker Image Tag Deployment
|
||||
|
||||
> Warning: As of 0.24.0, this functionality is deprecated in favor of the [`git:from-image`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-a-docker-image) command. It will be removed in a future release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-image`.
|
||||
>
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
tags <app> # List all app image tags
|
||||
tags:create <app> <tag> # Add tag to latest running app image
|
||||
tags:deploy <app> <tag> # Deploy tagged app image
|
||||
tags:destroy <app> <tag> # Remove app image tag
|
||||
```
|
||||
|
||||
The Dokku tags plugin allows you to add Docker image tags to the currently deployed app image for versioning and subsequent deployment.
|
||||
|
||||
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tags` plugin, the following may occur:
|
||||
>
|
||||
> - Applications previously deployed via another method (`git`/`tar`): The application may revert to a state before the latest custom image tag was deployed.
|
||||
> - Applications that were only ever deployed via the `tags` plugin: No action will be taken against your application.
|
||||
>
|
||||
> Please use the `tags:deploy` command when redeploying an application deployed via Docker image.
|
||||
|
||||
## Usage
|
||||
|
||||
### Exposed ports
|
||||
|
||||
See the [port management documentation](/docs/networking/port-management.md) for more information on how Dokku exposes ports for applications and how you can configure these for your app.
|
||||
|
||||
### Listing tags for an application
|
||||
|
||||
For example, you can list all tags for a given application:
|
||||
|
||||
```shell
|
||||
dokku tags node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
```
|
||||
|
||||
### Creating a tag
|
||||
|
||||
You can also create new tags for that app using the `tags:create` function. Tags should conform to the Docker tagging specification for your Docker version. As of 1.10, that specification is available [here](https://github.com/docker/docker/blob/master/image/spec/v1.1.md), while users of older versions can check the documentation [here](https://github.com/docker/docker/blob/master/image/spec/v1.md).
|
||||
|
||||
```shell
|
||||
dokku tags:create node-js-app v1
|
||||
```
|
||||
|
||||
```
|
||||
=====> Added v1 tag to dokku/node-js-app
|
||||
```
|
||||
|
||||
Once the tag is created, you can see the output by running the `tags` command again.
|
||||
|
||||
```shell
|
||||
dokku tags node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
dokku/node-js-app v1 936a42f25901 About a minute ago 1.025 GB
|
||||
```
|
||||
|
||||
### Deploying an image tag
|
||||
|
||||
Finally, you can also deploy a local image using the `tags:deploy` command. When specifying a tag that is not `latest`, the released image will be retagged as the `latest` image tag for the app.
|
||||
|
||||
> Warning: For images based on Herokuish, using the `tags:deploy` command will reset environment variables written into the image, causing a retag to occur. This will - on average - add two extra layers to your deployed image. Note that this does not affect Dockerfile-based images, which are the majority of images deployed via the `tags` command.
|
||||
|
||||
```shell
|
||||
dokku tags:deploy node-js-app v1
|
||||
```
|
||||
|
||||
```
|
||||
-----> Releasing node-js-app (dokku/node-js-app:v1)...
|
||||
-----> Deploying node-js-app (dokku/node-js-app:v1)...
|
||||
-----> Running pre-flight checks
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
=====> node-js-app container output:
|
||||
Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
|
||||
Recommending WEB_CONCURRENCY=1
|
||||
> node-js-app@0.1.0 start /app
|
||||
> node index.js
|
||||
Node app is running at localhost:5000
|
||||
=====> end node-js-app container output
|
||||
-----> Running post-deploy
|
||||
-----> Configuring node-js-app.dokku.me...
|
||||
-----> Creating http nginx.conf
|
||||
Reloading nginx
|
||||
-----> Shutting down old containers in 60 seconds
|
||||
=====> 025eec3fa3b442fded90933d58d8ed8422901f0449f5ea0c23d00515af5d3137
|
||||
=====> Application deployed:
|
||||
http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
## Image workflows
|
||||
|
||||
### Deploying from a Docker registry
|
||||
|
||||
You can alternatively add image pulled from a Docker registry and deploy from it by using tagging feature. In this example, we are deploying from Docker Hub.
|
||||
|
||||
1. Create Dokku app as usual.
|
||||
|
||||
```shell
|
||||
dokku apps:create test-app
|
||||
```
|
||||
|
||||
2. Pull image from Docker Hub.
|
||||
|
||||
```shell
|
||||
docker pull demo-repo/some-image:v12
|
||||
```
|
||||
|
||||
3. Retag the image to match the created app.
|
||||
|
||||
```shell
|
||||
docker tag demo-repo/some-image:v12 dokku/test-app:v12
|
||||
```
|
||||
|
||||
4. Deploy tag.
|
||||
|
||||
```shell
|
||||
dokku tags:deploy test-app v12
|
||||
```
|
||||
|
||||
### Deploying an image from CI
|
||||
|
||||
To ensure your builds are always reproducible, it's considered bad practice to store build
|
||||
artifacts in your repository. For some projects however, building artifacts during deployment
|
||||
to Dokku may affect the performance of running applications.
|
||||
|
||||
One solution is to build a finished Docker image on a CI service (or even locally) and deploy
|
||||
it directly to the host running Dokku.
|
||||
|
||||
1. Build image on CI (or locally).
|
||||
|
||||
```shell
|
||||
docker build -t dokku/test-app:v12 .
|
||||
# Note: The image must be tagged `dokku/<app-name>:<version>`
|
||||
```
|
||||
|
||||
2. Deploy image to Dokku host.
|
||||
|
||||
```shell
|
||||
docker save dokku/test-app:v12 | ssh my.dokku.host "docker load | dokku tags:deploy test-app v12"
|
||||
```
|
||||
|
||||
> Note: You can also use a Docker registry to push and pull
|
||||
> the image rather than uploading it directly.
|
||||
|
||||
Here's a more complete example using the above method:
|
||||
|
||||
```shell
|
||||
# build the image
|
||||
docker build -t dokku/test-app:v12 .
|
||||
# copy the image to the dokku host
|
||||
docker save dokku/test-app:v12 | bzip2 | ssh my.dokku.host "bunzip2 | docker load"
|
||||
# tag and deploy the image
|
||||
ssh my.dokku.host "dokku tags:create test-app previous; dokku tags:deploy test-app v12"
|
||||
```
|
||||
|
||||
## Related articles
|
||||
- [Setting up persistent storage](/docs/advanced-usage/persistent-storage.md)
|
||||
- [Defining environment variables](/docs/configuration/environment-variables.md)
|
||||
- [Setting up the ports](/docs/networking/proxy-management.md)
|
||||
@@ -1,38 +0,0 @@
|
||||
# Tarball Deployment
|
||||
|
||||
> Warning: As of 0.24.0, this functionality is deprecated in favor of the [`git:from-archive`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-an-archive-file) command. It will be removed in a future release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-archive`.
|
||||
>
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
tar:from <app> <url> # Loads an app tarball from url
|
||||
tar:in <app> # Reads an tarball containing the app from stdin
|
||||
```
|
||||
|
||||
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tar` plugin, the following may occur:
|
||||
>
|
||||
> - Applications previously deployed via another method (`git`): The application may revert to a state before the latest custom image tag was deployed.
|
||||
> - Applications that were only ever deployed via the `tar` plugin: The application will be properly rebuilt.
|
||||
>
|
||||
> Please use the appropriate `tar` command when redeploying an application deployed via tarball.
|
||||
|
||||
## Usage
|
||||
|
||||
### Deploying from a tarball
|
||||
|
||||
In some cases, it may be useful to deploy an application from a tarball. For instance, if you implemented a non-Git based deployment plugin, tarring the generated artifact may be an easier route to interface with the existing Dokku infrastructure.
|
||||
|
||||
You can place the tarball on an external webserver and deploy via the `tar:from` command.
|
||||
|
||||
```shell
|
||||
dokku tar:from node-js-app https://dokku.me/releases/node-js-app/v1
|
||||
```
|
||||
|
||||
### Deploying via stdin
|
||||
|
||||
As an alternative, a deploy can be trigged from a tarball read from stdin using the `tar:in` command:
|
||||
|
||||
```shell
|
||||
# run from the generated artifact directory
|
||||
tar c . $* | dokku tar:in node-js-app
|
||||
```
|
||||
@@ -1,10 +0,0 @@
|
||||
# Alternative Schedulers
|
||||
|
||||
In addition to the built-in [docker-local scheduler](/docs/advanced-usage/schedulers/docker-local.md), Dokku also supports two scheduler plugins:
|
||||
|
||||
- [Kubernetes](https://github.com/dokku/dokku-scheduler-kubernetes)
|
||||
- [Nomad](https://github.com/dokku/dokku-scheduler-nomad)
|
||||
|
||||
These scheduler implementations may not be complete, though provide enough functionality for a user to get an app deployed via the underlying scheduler.
|
||||
|
||||
For users that require additional functionality, please refer to the [Sponsoring Documentation](https://github.com/dokku/.github/blob/master/SPONSORING.md).
|
||||
@@ -37,9 +37,9 @@ Once set, you may re-enable it by setting a blank value for `disable-chown`:
|
||||
dokku scheduler-docker-local:set node-js-app disable-chown
|
||||
```
|
||||
|
||||
### Deploying Process Types in parallel
|
||||
### Deploying Process Types in Parallel
|
||||
|
||||
> New as of 25.5
|
||||
> New as of 0.25.5
|
||||
|
||||
By default, Dokku deploys an app's processes one-by-one in order, with the `web` process being deployed first. Deployment parallelism may be achieved by setting the `parallel-schedule-count` property, which defaults to `1`. Increasing this number increases the number of process types that may be deployed in parallel (with the web process being the exception).
|
||||
|
||||
@@ -60,30 +60,50 @@ Container scheduling output is shown in the order it is received, and thus may b
|
||||
|
||||
Note that increasing the value of `parallel-schedule-count` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.
|
||||
|
||||
#### Increasing parallelism within a process deploy
|
||||
|
||||
> New as of 0.26.0
|
||||
|
||||
By default, Dokku will deploy one instance of a given process type at a time. This can be increased by customizing the `app.json` `formation` key to include a `max_parallel` key for the given process type.
|
||||
|
||||
An `app.json` file can be committed to the root of the pushed app repository, and must be within the built image artifact in the image's working directory as shown below.
|
||||
|
||||
- Buildpacks: `/app/app.json`
|
||||
- Dockerfile: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
||||
- Docker Image: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
||||
|
||||
The `formation` key should be specified as follows in the `app.json` file:
|
||||
|
||||
```Procfile
|
||||
{
|
||||
"formation": {
|
||||
"web": {
|
||||
"max_parallel": 1
|
||||
},
|
||||
"worker": {
|
||||
"max_parallel": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Omitting or removing the entry will result in parallelism for that process type to return to 1 entry at a time. This can be combined with the `parallel-schedule-count` property to speed up deployments.
|
||||
|
||||
Note that increasing the value of `max_parallel` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.
|
||||
|
||||
## 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.
|
||||
|
||||
- `check-deploy`
|
||||
- `core-post-deploy`
|
||||
- `post-app-clone-setup`
|
||||
- `post-app-rename-setup`
|
||||
- `post-create`
|
||||
- `post-delete`
|
||||
- `pre-deploy`
|
||||
- `pre-restore`
|
||||
- `scheduler-app-status`
|
||||
- `scheduler-deploy`
|
||||
- `scheduler-docker-cleanup`
|
||||
- `scheduler-inspect`
|
||||
- `scheduler-is-deployed`
|
||||
- `scheduler-logs`
|
||||
- `scheduler-logs-failed`
|
||||
- `scheduler-retire`
|
||||
- `scheduler-run`
|
||||
- `scheduler-stop`
|
||||
- `scheduler-tags-create`
|
||||
- `scheduler-tags-destroy`
|
||||
- `apps:clone`
|
||||
- `apps:destroy`
|
||||
- `apps:rename`
|
||||
- `deploy`
|
||||
- `enter`
|
||||
- `logs`
|
||||
- `ps:inspect`
|
||||
- `ps:stop`
|
||||
- `run`
|
||||
|
||||
## Supported Resource Management Properties
|
||||
|
||||
|
||||
14
docs/deployment/schedulers/kubernetes.md
Normal file
14
docs/deployment/schedulers/kubernetes.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Kubernetes Scheduler
|
||||
|
||||
> Warning: This scheduler is not in Dokku core and thus is considered experimental.
|
||||
|
||||
The [Kubernetes Scheduler Plugin](https://github.com/dokku/dokku-scheduler-kubernetes) implements the following functionality:
|
||||
|
||||
- `apps:destroy`
|
||||
- `deploy`: partial, does not implement failed deploy log capture
|
||||
- `logs`: partial, does not implement failure logs
|
||||
- `ps:stop`
|
||||
|
||||
Please see the plugin's [issue tracker](https://github.com/dokku/dokku-scheduler-kubernetes/issues) for more information on the status of the plugin.
|
||||
|
||||
For users that require additional functionality, please refer to the [Sponsoring Documentation](https://github.com/dokku/.github/blob/master/SPONSORING.md).
|
||||
13
docs/deployment/schedulers/nomad.md
Normal file
13
docs/deployment/schedulers/nomad.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Nomad Scheduler
|
||||
|
||||
> Warning: This scheduler is not in Dokku core and thus is considered experimental.
|
||||
|
||||
The [Nomad Scheduler Plugin](https://github.com/dokku/dokku-scheduler-nomad) implements the following functionality:
|
||||
|
||||
- `apps:destroy`
|
||||
- `deploy`
|
||||
- `ps:stop`
|
||||
|
||||
Please see the plugin's [issue tracker](https://github.com/dokku/dokku-scheduler-nomad/issues) for more information on the status of the plugin.
|
||||
|
||||
For users that require additional functionality, please refer to the [Sponsoring Documentation](https://github.com/dokku/.github/blob/master/SPONSORING.md).
|
||||
@@ -8,8 +8,8 @@ The `null` scheduler does nothing, and is useful for routing to services not man
|
||||
|
||||
### Detection
|
||||
|
||||
This scheduler is _never_ auto-detected. The scheduler _must_ be specified via the `config:set` command:
|
||||
This scheduler is _never_ auto-detected. The scheduler _must_ be specified via the `scheduler:set` command:
|
||||
|
||||
```shell
|
||||
dokku config:set node-js-app DOCKER_SCHEDULER=null
|
||||
dokku scheduler:set node-js-app selected null
|
||||
```
|
||||
|
||||
118
docs/deployment/schedulers/scheduler-management.md
Normal file
118
docs/deployment/schedulers/scheduler-management.md
Normal file
@@ -0,0 +1,118 @@
|
||||
# Scheduler Management
|
||||
|
||||
> New as of 0.26.0
|
||||
|
||||
```
|
||||
scheduler:report [<app>] [<flag>] # Displays a scheduler report for one or more apps
|
||||
scheduler:set <app> <key> (<value>) # Set or clear a scheduler property for an app
|
||||
```
|
||||
|
||||
Schedulers are a way of customizing how an app image is deployed, and can be used to interact with non-local systems such as Kubernetes and Nomad.
|
||||
|
||||
## Usage
|
||||
|
||||
### Scheduler selection
|
||||
|
||||
Dokku supports the following built-in schedulers:
|
||||
|
||||
- `scheduler-docker-local`: Schedules apps against the local docker socket and runs containers directly on the Dokku host. See the [docker-local scheduler documentation](/docs/deployment/schedulers/docker-local.md) for more information on how this scheduler functions.
|
||||
- `scheduler-null`: Does nothing during the scheduler phase. See the [null scheduler documentation](/docs/deployment/schedulers/null.md) for more information on how this scheduler functions.
|
||||
|
||||
See the [alternate schedulers documentation](/docs/deployment/schedulers/alternate-schedulers.md) for more information on other scheduler plugins.
|
||||
|
||||
### Overriding the auto-selected scheduler
|
||||
|
||||
If desired, the scheduler can be specified via the `scheduler:set` command by speifying a value for `selected`. The selected scheduler will always be used.
|
||||
|
||||
```shell
|
||||
dokku scheduler:set node-js-app selected docker-local
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku scheduler:set node-js-app selected
|
||||
```
|
||||
|
||||
The `selected` property can also be set globally. The global default is an empty string, and auto-detection will be performed when no value is set per-app or globally.
|
||||
|
||||
```shell
|
||||
dokku scheduler:set --global selected docker-local
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku scheduler:set --global selected
|
||||
```
|
||||
|
||||
### Displaying scheduler reports for an app
|
||||
|
||||
You can get a report about the app's scheduler status using the `scheduler:report` command:
|
||||
|
||||
```shell
|
||||
dokku scheduler:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app scheduler information
|
||||
Scheduler computed selected: herokuish
|
||||
Scheduler global selected: herokuish
|
||||
Scheduler selected: herokuish
|
||||
=====> python-sample scheduler information
|
||||
Scheduler computed selected: dockerfile
|
||||
Scheduler global selected: herokuish
|
||||
Scheduler selected: dockerfile
|
||||
=====> ruby-sample scheduler information
|
||||
Scheduler computed selected: herokuish
|
||||
Scheduler global selected: herokuish
|
||||
Scheduler selected:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku scheduler:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app scheduler information
|
||||
Scheduler selected: herokuish
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku scheduler:report node-js-app --scheduler-selected
|
||||
```
|
||||
|
||||
## Implementing a Scheduler
|
||||
|
||||
Custom plugins names _must_ have the prefix `scheduler-` or scheduler overriding via `scheduler:set` may not function as expected.
|
||||
|
||||
At this time, the following dokku commands are used to implement a complete scheduler.
|
||||
|
||||
- `apps:destroy`: stops the app processes on the scheduler
|
||||
- triggers: post-delete, scheduler-register-retired, scheduler-retire
|
||||
- `apps:rename`: handles app renaming
|
||||
- triggers: post-app-rename-setup
|
||||
- `apps:clone`: handles app cloning
|
||||
- triggers: post-app-clone-setup
|
||||
- `deploy`: deploys app proceses and checks the status of a deploy
|
||||
- triggers: scheduler-app-status, scheduler-deploy, scheduler-is-deployed, scheduler-logs-failed
|
||||
- `enter`: enters a running container
|
||||
- triggers: scheduler-enter
|
||||
- `logs`: fetches app logs
|
||||
- triggers: scheduler-logs
|
||||
- `run`: starts one-off run containers (detached and non-detached) as well as listing run processes
|
||||
- triggers: scheduler-run, scheduler-run-list
|
||||
- `ps:stop`: stops app processes
|
||||
- triggers: scheduler-stop
|
||||
- `ps:inspect`: outputs inspect output for processes in an app
|
||||
- triggers: scheduler-inspect
|
||||
|
||||
Schedulers may decide to omit some functionality here, or use plugin triggers to supplement config with information from other plugins. Additionally, a scheduler may implement other triggers in order handle any extra processes needed during a deploy.
|
||||
|
||||
Schedulers can use any tools available on the system to build the docker image, and may even be used to interact with off-server systems. The only current requirement is that the scheduler must have access to the image built in the build phase. If this is not the case, the registry plugin can be used to push the image to a registry that the scheduler software can access.
|
||||
|
||||
Deployment tasks are currently executed directly on the primary Dokku server.
|
||||
@@ -74,6 +74,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-json-process-deploy-parallelism`
|
||||
|
||||
- Description: Decides the parallelism to use when deploying a given process type. The default is 1 process entry at a type.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP $PROCESS_TYPE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-maybe-create`
|
||||
|
||||
- Description: Creates an app (gated by whether this is globally enabled or not)
|
||||
@@ -346,8 +361,8 @@ curl "http://httpstat.us/200"
|
||||
|
||||
> To avoid issues with community plugins, this plugin trigger should be used _only_ for core plugins. Please avoid using this trigger in your own plugins.
|
||||
|
||||
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git/tarball but _before_ the image source type is detected.
|
||||
- Invoked by: `dokku tar:in`, `dokku tar:from` and the `receive-app` plugin trigger
|
||||
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git but _before_ the image source type is detected.
|
||||
- Invoked by: The `receive-app` plugin trigger
|
||||
- Arguments: `$APP` `$TMP_WORK_DIR` `$REV`
|
||||
- Example:
|
||||
|
||||
@@ -418,7 +433,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian|ubuntu)
|
||||
debian|raspbian|ubuntu)
|
||||
apt-get -qq -y --no-install-recommends install nginx
|
||||
;;
|
||||
|
||||
@@ -428,31 +443,22 @@ case "$DOKKU_DISTRO" in
|
||||
esac
|
||||
```
|
||||
|
||||
### `deploy-source`
|
||||
### `deploy`
|
||||
|
||||
- Description: Used for reporting what the current detected deployment source is. The first detected source should always win.
|
||||
- Invoked by: `dokku apps:report`
|
||||
- Arguments: `$APP`
|
||||
- Description: Triggers a deploy for the given app. Can override the image tag to deploy, as well as specify a single process type to deploy.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP [$IMAGE_TAG] [$PROC_TYPE]`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Checks if the app should be deployed via git
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
APP="$1"
|
||||
STDIN=$(cat)
|
||||
APP="$1" IMAGE_TAG="$2" PROC_TYPE="$3"
|
||||
|
||||
# bail if another source is detected
|
||||
if [[ -n "$STDIN" ]]; then
|
||||
echo "$STDIN"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -d "$DOKKU_ROOT/$APP/refs" ]]; then
|
||||
echo "git"
|
||||
fi
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `deployed-app-image-repo`
|
||||
@@ -944,7 +950,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
- Description: Return the port for a given app container
|
||||
- Invoked by: `internally triggered by a deploy`
|
||||
- Arguments: `$APP $PROC_TYPE $CONTAINER_ID $IS_HEROKUISH_CONTAINER`
|
||||
- Arguments: `$APP $PROCESS_TYPE $CONTAINER_ID $IS_HEROKUISH_CONTAINER`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -1349,8 +1355,8 @@ sudo service haproxy reload
|
||||
|
||||
### `post-extract`
|
||||
|
||||
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git/tarball but _before_ the image source type is detected.
|
||||
- Invoked by: `dokku tar:in`, `dokku tar:from` and the `receive-app` plugin trigger
|
||||
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git but _before_ the image source type is detected.
|
||||
- Invoked by: The `receive-app` plugin trigger
|
||||
- Arguments: `$APP` `$TMP_WORK_DIR` `$REV`
|
||||
- Example:
|
||||
|
||||
@@ -2058,6 +2064,25 @@ DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_TAG="$3";
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-detect`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to check which scheduler is in use for an app
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-enter`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
@@ -2249,44 +2274,6 @@ DOKKU_SCHEDULER="$1"; APP="$2"; REMOVE_CONTAINERS="$3";
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `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`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1" APP="$2" SOURCE_IMAGE="$3" TARGET_IMAGE="$4"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `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`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_REPO="$3"; IMAGE_TAG="$4";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `storage-list`
|
||||
|
||||
- Description: Returns a list of storage mounts
|
||||
@@ -2302,41 +2289,6 @@ APP="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
### `tags-create`
|
||||
|
||||
- Description: Allows you to run commands once a tag for an app image has been added
|
||||
- Invoked by: `dokku tags:create`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Upload an app image to docker hub
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
IMAGE_ID=$(docker inspect --format '{{ .Id }}' $IMAGE)
|
||||
docker tag -f $IMAGE_ID $DOCKER_HUB_USER/$APP:$IMAGE_TAG
|
||||
docker push $DOCKER_HUB_USER/$APP:$IMAGE_TAG
|
||||
```
|
||||
|
||||
### `tags-destroy`
|
||||
|
||||
- Description: Allows you to run commands once a tag for an app image has been removed
|
||||
- Invoked by: `dokku tags:destroy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Remove an image tag from docker hub
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; IMAGE_TAG="$2"
|
||||
|
||||
# some code to remove a docker hub tag because it's not implemented in the CLI...
|
||||
```
|
||||
|
||||
### `uninstall`
|
||||
|
||||
|
||||
@@ -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.25.7-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.26.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'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.25.7
|
||||
docker pull dokku/dokku:0.26.4
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
@@ -18,9 +18,11 @@ docker container run \
|
||||
--publish 8443:443 \
|
||||
--volume /var/lib/dokku:/mnt/dokku \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
dokku/dokku:0.25.7
|
||||
dokku/dokku:0.26.4
|
||||
```
|
||||
|
||||
The above command will start a new docker container that is ready when a message similar to `Runit started as PID 12345` appears.
|
||||
|
||||
Dokku is run in the following configuration:
|
||||
|
||||
- The global hostname is set to `dokku.me` on boot.
|
||||
|
||||
@@ -19,8 +19,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.25.7/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.25.7 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.4/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.26.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -19,6 +19,8 @@ Docker releases updates periodically to their engine. We recommend reading their
|
||||
|
||||
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
|
||||
|
||||
- [Upgrading to 0.26](/docs/appendices/0.26.0-migration-guide.md)
|
||||
- [Upgrading to 0.25](/docs/appendices/0.25.0-migration-guide.md)
|
||||
- [Upgrading to 0.24](/docs/appendices/0.24.0-migration-guide.md)
|
||||
- [Upgrading to 0.23](/docs/appendices/0.23.0-migration-guide.md)
|
||||
- [Upgrading to 0.22](/docs/appendices/0.22.0-migration-guide.md)
|
||||
@@ -69,16 +71,6 @@ new buildpacks that were released:
|
||||
dokku ps:rebuild --all
|
||||
```
|
||||
|
||||
> If you have any applications deployed via the `tags` or `tar` commands, do not run the `ps:rebuild --all` command,
|
||||
> and instead trigger `ps:rebuild` manually for each `git`-deployed application:
|
||||
>
|
||||
> ```
|
||||
> dokku ps:rebuild APP
|
||||
> ```
|
||||
>
|
||||
> Please see the [images documentation](/docs/deployment/methods/images.md) and [tar documentation](/docs/deployment/methods/tar.md)
|
||||
> for instructions on rebuilding applications deployed by those plugins.
|
||||
|
||||
## Upgrading using `dokku-update`
|
||||
|
||||
We provide a helpful binary called `dokku-update`. This is a recommended package that:
|
||||
|
||||
@@ -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.25.7/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.4/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.26.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.25.7/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.25.7/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
</style>
|
||||
@@ -95,12 +95,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.25.7/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.26.4/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.25.7 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.26.4 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # Configure your server domain via `dokku domains:set-global`</span>
|
||||
|
||||
@@ -141,7 +141,7 @@ dokku apps:create local-app
|
||||
dokku builder:set local-app selected null
|
||||
|
||||
# set the scheduler to the null scheduler, which does nothing
|
||||
dokku config:set local-app DOKKU_SCHEDULER=null
|
||||
dokku scheduler:set local-app selected null
|
||||
|
||||
# set the static-web-listener network property to the ip:port combination for your app.
|
||||
dokku network:set local-app static-web-listener 127.0.0.1:8080
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
ps:inspect <app> # Displays a sanitized version of docker inspect for an app
|
||||
ps:rebuild [--parallel count] [--all|<app>] # Rebuilds an app from source
|
||||
ps:report [<app>] [<flag>] # Displays a process report for one or more apps
|
||||
ps:restart [--parallel count] [--all|<app>] # Restart an app
|
||||
ps:restart [--parallel count] [--all|<app>] [<process-name>] # Restart an app
|
||||
ps:restore [<app>] # Start previously running apps e.g. after reboot
|
||||
ps:scale [--skip-deploy] <app> <proc>=<count> [<proc>=<count>...] # Get/Set how many instances of a given process to run
|
||||
ps:set <app> <key> <value> # Set or clear a ps property for an app
|
||||
@@ -30,9 +30,6 @@ This command will gather all the running container IDs for your app and call `do
|
||||
|
||||
### Rebuilding apps
|
||||
|
||||
> Warning: This section applies only to git-based deploys, and only works deterministically for these apps. Please see the [images documentation](/docs/deployment/methods/images.md) and [tar documentation](/docs/deployment/methods/tar.md)
|
||||
> in for more information concerning rebuilding those apps.
|
||||
|
||||
It may be useful to rebuild an app at will, such as for commands that do not rebuild an app or when skipping a rebuild after setting multiple config values. For these use cases, the `ps:rebuild` function can be used.
|
||||
|
||||
```shell
|
||||
@@ -67,7 +64,13 @@ An app may be restarted using the `ps:restart` command.
|
||||
dokku ps:restart node-js-app
|
||||
```
|
||||
|
||||
All apps may be restarted by using the `--all` flag.
|
||||
A single process type - such as `web` or `worker` - may also be specified. This _does not_ support specifying a given instance of a process type, and only supports restarting all instances of that process type.
|
||||
|
||||
```shell
|
||||
dokku ps:restart node-js-app web
|
||||
```
|
||||
|
||||
All apps may be restarted by using the `--all` flag. This flag is incompatible with specifying a process type.
|
||||
|
||||
```shell
|
||||
dokku ps:restart --all
|
||||
@@ -128,7 +131,7 @@ dokku ps:scale --skip-deploy node-js-app web=1
|
||||
|
||||
#### Manually managing process scaling
|
||||
|
||||
> Using a `formation` key in an `app.json` file disables the ability to use `ps:scale` for scaling.
|
||||
> Using a `formation` key in an `app.json` file with _any_ `quantity` specified disables the ability to use `ps:scale` for scaling.
|
||||
|
||||
An `app.json` file can be committed to the root of the pushed app repository, and must be within the built image artifact in the image's working directory as shown below.
|
||||
|
||||
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - {{DOC_TITLE}}</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.4/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.26.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.25.7/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.25.7/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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>
|
||||
@@ -118,11 +118,10 @@
|
||||
<a href="/{{NAME}}/deployment/builders/cloud-native-buildpacks/" class="list-group-item">Cloud Native Buildpacks</a>
|
||||
<a href="/{{NAME}}/deployment/builders/herokuish-buildpacks/" class="list-group-item">Herokuish Buildpacks</a>
|
||||
<a href="/{{NAME}}/deployment/builders/dockerfiles/" class="list-group-item">Dockerfile Deployment</a>
|
||||
<a href="/{{NAME}}/deployment/builders/null/" class="list-group-item">Null Builder</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Deployment Methods</a>
|
||||
<a href="/{{NAME}}/deployment/methods/images/" class="list-group-item">Docker Image Deployment</a>
|
||||
<a href="/{{NAME}}/deployment/methods/git/" class="list-group-item">Git Deployment</a>
|
||||
<a href="/{{NAME}}/deployment/methods/tar/" class="list-group-item">Tarfile Deployment</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Configuration</a>
|
||||
|
||||
@@ -159,8 +158,12 @@
|
||||
|
||||
<a href="#" class="list-group-item disabled">Schedulers</a>
|
||||
|
||||
<a href="/{{NAME}}/advanced-usage/schedulers/docker-local/" class="list-group-item">Docker Local</a>
|
||||
<a href="/{{NAME}}/advanced-usage/schedulers/alternate-schedulers/" class="list-group-item">Alternate Schedulers</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/scheduler-management/" class="list-group-item">Scheduler Management</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/docker-local/" class="list-group-item">Docker Local</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/kubernetes/" class="list-group-item">Kubernetes</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/nomad/" class="list-group-item">Nomad</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/null/" class="list-group-item">Null Scheduler</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/alternate-schedulers/" class="list-group-item">Alternate Schedulers</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Development</a>
|
||||
|
||||
|
||||
@@ -21,7 +21,10 @@
|
||||
"deployment/methods/dockerfiles": "deployment/builders/dockerfiles/",
|
||||
"deployment/methods/herokuish-buildpacks": "deployment/builders/herokuish-buildpacks/",
|
||||
|
||||
"deployment/images": "deployment/methods/images/",
|
||||
"deployment/images": "deployment/methods/git/#initializing-an-app-repository-from-a-docker-image",
|
||||
"deployment/tar": "deployment/methods/git/#initializing-an-app-repository-from-an-archive-file",
|
||||
"deployment/methods/images": "deployment/methods/git/#initializing-an-app-repository-from-a-docker-image",
|
||||
"deployment/methods/tar": "deployment/methods/git/#initializing-an-app-repository-from-an-archive-file",
|
||||
"configuration-management": "configuration/environment-variables/",
|
||||
"deployment/ssl-configuration": "configuration/ssl/",
|
||||
"nginx": "configuration/nginx/",
|
||||
@@ -38,8 +41,9 @@
|
||||
"dokku-events-logs": "advanced-usage/event-logs/",
|
||||
"dokku-storage": "advanced-usage/persistent-storage/",
|
||||
|
||||
"advanced-usage/schedulers/alternate-schedulers": "deployment/schedulers/alternate-schedulers",
|
||||
"advanced-usage/schedulers/docker-local": "deployment/schedulers/docker-local",
|
||||
"advanced-usage/schedulers/alternate-schedulers": "deployment/schedulers/scheduler-management/",
|
||||
"advanced-usage/schedulers/docker-local": "deployment/schedulers/docker-local/",
|
||||
"deployment/schedulers/alternate-schedulers": "deployment/schedulers/scheduler-management/",
|
||||
|
||||
"community/tutorials/deploying-with-gitlab-ci": "deployment/continuous-integration/gitlab-ci/",
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ if [[ ! -f "$DOKKU_ROOT/VHOST" ]]; then
|
||||
[[ $(dig +short "$(hostname -f)") ]] && hostname -f >"$DOKKU_ROOT/VHOST"
|
||||
fi
|
||||
|
||||
dokku_path="$(which dokku)"
|
||||
dokku_path="$(command -v dokku)"
|
||||
|
||||
# temporary hack for https://github.com/dokku/dokku/issues/82
|
||||
# redeploys all apps after a reboot
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -23,7 +23,11 @@ cmd-report() {
|
||||
dokku_log_info1 "git version: $(git --version)"
|
||||
dokku_log_info1 "sigil version: $(sigil -v)"
|
||||
dokku_log_info1 "herokuish version: "
|
||||
"$DOCKER_BIN" container run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
|
||||
if [[ "$(dpkg --print-architecture 2>/dev/null || true)" == "armhf" ]]; then
|
||||
dokku_log_warn "herokuish not supported on armhf architecture"
|
||||
else
|
||||
"$DOCKER_BIN" container run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
|
||||
fi
|
||||
dokku_log_info1 "dokku version: $(dokku_version)"
|
||||
dokku_log_info1 "plugn version: $(plugn version)"
|
||||
dokku_log_info1 "dokku plugins: "
|
||||
|
||||
@@ -17,7 +17,7 @@ trigger-events-install() {
|
||||
# shellcheck disable=SC2174
|
||||
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch | debian | centos | fedora | rhel)
|
||||
arch | debian | centos | fedora | raspbian | rhel)
|
||||
chgrp dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
*)
|
||||
@@ -28,7 +28,7 @@ trigger-events-install() {
|
||||
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
|
||||
touch "$DOKKU_EVENTS_LOGFILE"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch | debian | centos | fedora | rhel)
|
||||
arch | debian | centos | fedora | raspbian | rhel)
|
||||
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
;;
|
||||
*)
|
||||
@@ -70,7 +70,7 @@ $DOKKU_LOGS_DIR/*.log {
|
||||
}
|
||||
EOF
|
||||
|
||||
if [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
||||
if [[ "$DOKKU_DISTRO" == "debian" ]] || [[ "$DOKKU_DISTRO" == "raspbian" ]]; then
|
||||
sed -i 's/ syslog dokku$/ root dokku/g' $DOKKU_LOGROTATE_FILE
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
hook
|
||||
@@ -1 +0,0 @@
|
||||
hook
|
||||
1
plugins/app-json/.gitignore
vendored
1
plugins/app-json/.gitignore
vendored
@@ -6,3 +6,4 @@
|
||||
/subcommands/*
|
||||
/triggers
|
||||
/triggers/*
|
||||
/app-json-process-deploy-parallelism
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SUBCOMMANDS = subcommands/report subcommands/set
|
||||
TRIGGERS = triggers/install triggers/post-delete triggers/post-deploy triggers/pre-deploy triggers/report
|
||||
TRIGGERS = triggers/app-json-process-deploy-parallelism triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/post-deploy triggers/pre-deploy triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = app-json
|
||||
|
||||
|
||||
@@ -39,7 +39,8 @@ type CronCommand struct {
|
||||
|
||||
// Formation is a struct that represents the scale for a process from an app.json file
|
||||
type Formation struct {
|
||||
Quantity int `json:"quantity"`
|
||||
Quantity *int `json:"quantity"`
|
||||
MaxParallel *int `json:"max_parallel"`
|
||||
}
|
||||
|
||||
// GetAppjsonDirectory returns the directory containing a given app's extracted app.json file
|
||||
|
||||
@@ -500,7 +500,9 @@ func setScale(appName string, image string) error {
|
||||
clearExisting := false
|
||||
args := []string{appName, strconv.FormatBool(skipDeploy), strconv.FormatBool(clearExisting)}
|
||||
for processType, formation := range appJSON.Formation {
|
||||
args = append(args, fmt.Sprintf("%s=%d", processType, formation.Quantity))
|
||||
if formation.Quantity != nil {
|
||||
args = append(args, fmt.Sprintf("%s=%d", processType, *formation.Quantity))
|
||||
}
|
||||
}
|
||||
|
||||
if len(args) == 3 {
|
||||
@@ -567,7 +569,7 @@ func injectDokkuScale(appName string, image string) error {
|
||||
}
|
||||
|
||||
appJSON.Formation[processType] = Formation{
|
||||
Quantity: quantity,
|
||||
Quantity: &quantity,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -18,8 +18,20 @@ func main() {
|
||||
|
||||
var err error
|
||||
switch trigger {
|
||||
case "app-json-process-deploy-parallelism":
|
||||
appName := flag.Arg(0)
|
||||
processType := flag.Arg(1)
|
||||
err = appjson.TriggerAppJSONProcessDeployParallelism(appName, processType)
|
||||
case "install":
|
||||
err = appjson.TriggerInstall()
|
||||
case "post-app-clone-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = appjson.TriggerPostAppCloneSetup(oldAppName, newAppName)
|
||||
case "post-app-rename-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = appjson.TriggerPostAppRenameSetup(oldAppName, newAppName)
|
||||
case "post-delete":
|
||||
appName := flag.Arg(0)
|
||||
err = appjson.TriggerPostDelete(appName)
|
||||
|
||||
@@ -8,6 +8,32 @@ import (
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
// TriggerAppJSONProcessDeployParallelism returns the max number of processes to deploy in parallel
|
||||
func TriggerAppJSONProcessDeployParallelism(appName string, processType string) error {
|
||||
appJSON, err := getAppJSON(appName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
parallelism := 1
|
||||
for procType, formation := range appJSON.Formation {
|
||||
if procType != processType {
|
||||
continue
|
||||
}
|
||||
|
||||
if formation.MaxParallel == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if *formation.MaxParallel > 0 {
|
||||
parallelism = *formation.MaxParallel
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println(parallelism)
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerInstall initializes app restart policies
|
||||
func TriggerInstall() error {
|
||||
if err := common.PropertySetup("app-json"); err != nil {
|
||||
@@ -22,6 +48,29 @@ func TriggerInstall() error {
|
||||
return common.SetPermissions(directory, 0755)
|
||||
}
|
||||
|
||||
// TriggerPostAppCloneSetup creates new app-json files
|
||||
func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
|
||||
err := common.PropertyClone("app-json", oldAppName, newAppName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppRenameSetup renames app-json files
|
||||
func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
|
||||
if err := common.PropertyClone("app-json", oldAppName, newAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := common.PropertyDestroy("app-json", oldAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostDelete destroys the app-json data for a given app container
|
||||
func TriggerPostDelete(appName string) error {
|
||||
directory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json", appName)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SUBCOMMANDS = subcommands/clone subcommands/create subcommands/destroy subcommands/exists subcommands/list subcommands/lock subcommands/locked subcommands/rename subcommands/report subcommands/unlock
|
||||
TRIGGERS = triggers/app-create triggers/app-destroy triggers/app-exists triggers/app-maybe-create triggers/post-delete triggers/report
|
||||
TRIGGERS = triggers/app-create triggers/app-destroy triggers/app-exists triggers/app-maybe-create triggers/deploy-source-set triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = apps
|
||||
|
||||
|
||||
15
plugins/apps/apps.go
Normal file
15
plugins/apps/apps.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package apps
|
||||
|
||||
var (
|
||||
// DefaultProperties is a map of all valid network properties with corresponding default property values
|
||||
DefaultProperties = map[string]string{
|
||||
"deploy-source": "",
|
||||
"deploy-source-metadata": "",
|
||||
}
|
||||
|
||||
// GlobalProperties is a map of all valid global network properties
|
||||
GlobalProperties = map[string]bool{
|
||||
"deploy-source": true,
|
||||
"deploy-source-metadata": true,
|
||||
}
|
||||
)
|
||||
@@ -52,7 +52,7 @@ func destroyApp(appName string) error {
|
||||
|
||||
common.LogInfo1(fmt.Sprintf("Destroying %s (including all add-ons)", appName))
|
||||
|
||||
imageTag, _ := common.GetRunningImageTag(appName)
|
||||
imageTag, _ := common.GetRunningImageTag(appName, "")
|
||||
if err := common.PlugnTrigger("pre-delete", []string{appName, imageTag}...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package apps
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
@@ -13,9 +14,11 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
}
|
||||
|
||||
flags := map[string]common.ReportFunc{
|
||||
"--app-dir": reportDir,
|
||||
"--app-deploy-source": reportDeploySource,
|
||||
"--app-locked": reportLocked,
|
||||
"--app-created-at": reportCreatedAt,
|
||||
"--app-deploy-source": reportDeploySource,
|
||||
"--app-deploy-source-metadata": reportDeploySourceMetadata,
|
||||
"--app-dir": reportDir,
|
||||
"--app-locked": reportLocked,
|
||||
}
|
||||
|
||||
flagKeys := []string{}
|
||||
@@ -29,17 +32,25 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
return common.ReportSingleApp("app", appName, infoFlag, infoFlags, flagKeys, format, trimPrefix, uppercaseFirstCharacter)
|
||||
}
|
||||
|
||||
func reportDir(appName string) string {
|
||||
return common.AppRoot(appName)
|
||||
func reportCreatedAt(appName string) string {
|
||||
fi, err := os.Stat(common.AppRoot(appName))
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return fmt.Sprint(fi.ModTime().Unix())
|
||||
}
|
||||
|
||||
func reportDeploySource(appName string) string {
|
||||
deploySource := ""
|
||||
if b, err := common.PlugnTriggerSetup("deploy-source", []string{appName}...).SetInput("").Output(); err != nil {
|
||||
deploySource = strings.TrimSpace(string(b[:]))
|
||||
}
|
||||
return common.PropertyGet("apps", appName, "deploy-source")
|
||||
}
|
||||
|
||||
return deploySource
|
||||
func reportDeploySourceMetadata(appName string) string {
|
||||
return common.PropertyGet("apps", appName, "deploy-source-metadata")
|
||||
}
|
||||
|
||||
func reportDir(appName string) string {
|
||||
return common.AppRoot(appName)
|
||||
}
|
||||
|
||||
func reportLocked(appName string) string {
|
||||
|
||||
@@ -30,6 +30,21 @@ func main() {
|
||||
case "app-maybe-create":
|
||||
appName := flag.Arg(0)
|
||||
err = apps.TriggerAppMaybeCreate(appName)
|
||||
case "deploy-source-set":
|
||||
appName := flag.Arg(0)
|
||||
sourceType := flag.Arg(0)
|
||||
sourceMetadata := flag.Arg(0)
|
||||
err = apps.TriggerDeploySourceSet(appName, sourceType, sourceMetadata)
|
||||
case "install":
|
||||
err = apps.TriggerInstall()
|
||||
case "post-app-clone-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = apps.TriggerPostAppCloneSetup(oldAppName, newAppName)
|
||||
case "post-app-rename-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = apps.TriggerPostAppRenameSetup(oldAppName, newAppName)
|
||||
case "post-delete":
|
||||
appName := flag.Arg(0)
|
||||
err = apps.TriggerPostDelete(appName)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package apps
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
@@ -24,15 +26,59 @@ func TriggerAppMaybeCreate(appName string) error {
|
||||
return maybeCreateApp(appName)
|
||||
}
|
||||
|
||||
// TriggerDeploySourceSet sets the current deploy source
|
||||
func TriggerDeploySourceSet(appName string, sourceType string, sourceMetadata string) error {
|
||||
if err := common.PropertyWrite("apps", appName, "deploy-source", sourceType); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return common.PropertyWrite("apps", appName, "deploy-source-metadata", sourceMetadata)
|
||||
}
|
||||
|
||||
// TriggerInstall runs the install step for the apps plugin
|
||||
func TriggerInstall() error {
|
||||
if err := common.PropertySetup("apps"); err != nil {
|
||||
return fmt.Errorf("Unable to install the apps plugin: %s", err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppCloneSetup creates new apps files
|
||||
func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
|
||||
err := common.PropertyClone("apps", oldAppName, newAppName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppRenameSetup renames apps files
|
||||
func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
|
||||
if err := common.PropertyClone("apps", oldAppName, newAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := common.PropertyDestroy("apps", oldAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostDelete is the apps post-delete plugin trigger
|
||||
func TriggerPostDelete(appName string) error {
|
||||
imageRepo := common.GetAppImageRepo(appName)
|
||||
if err := common.PropertyDestroy("apps", appName); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
imagesByAppLabel, err := listImagesByAppLabel(appName)
|
||||
if err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
imageRepo := common.GetAppImageRepo(appName)
|
||||
imagesByRepo, err := listImagesByImageRepo(imageRepo)
|
||||
if err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
|
||||
@@ -36,7 +36,7 @@ trigger-builder-dockerfile-builder-build() {
|
||||
declare -a ARG_ARRAY
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" "${DOKKU_DOCKER_BUILD_OPTS[@]}" -t $IMAGE .
|
||||
"$DOCKER_BIN" image build $DOCKER_BUILD_LABEL_ARGS $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" "${DOKKU_DOCKER_BUILD_OPTS[@]}" -t $IMAGE .
|
||||
|
||||
plugn trigger post-build-dockerfile "$APP"
|
||||
}
|
||||
|
||||
@@ -12,10 +12,19 @@ trigger-builder-dockerfile-builder-release() {
|
||||
return
|
||||
fi
|
||||
|
||||
local DOCKER_BUILD_LABEL_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.app-name=$APP --label=com.dokku.image-stage=release --label=dokku"
|
||||
|
||||
plugn trigger pre-release-dockerfile "$APP" "$IMAGE_TAG"
|
||||
|
||||
TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")"
|
||||
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
docker-image-labeler --label=com.dokku.image-stage=release --label=com.dokku.app-name=$APP --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku "$IMAGE"
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-dockerfile/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t $IMAGE "$TMP_WORK_DIR"; then
|
||||
dokku_log_warn "Failure injecting docker labels on image"
|
||||
return 1
|
||||
fi
|
||||
|
||||
plugn trigger post-release-dockerfile "$APP" "$IMAGE_TAG"
|
||||
plugn trigger post-release-builder "$BUILDER_TYPE" "$APP" "$IMAGE"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
ARG APP_IMAGE
|
||||
FROM $APP_IMAGE
|
||||
13
plugins/builder-dockerfile/install
Executable file
13
plugins/builder-dockerfile/install
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-dockerfile-install() {
|
||||
declare desc="installs the builder-dockerfile plugin"
|
||||
declare trigger="install"
|
||||
|
||||
fn-plugin-property-setup "builder-dockerfile"
|
||||
}
|
||||
|
||||
trigger-builder-dockerfile-install "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-dockerfile plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
14
plugins/builder-dockerfile/post-app-clone-setup
Executable file
14
plugins/builder-dockerfile/post-app-clone-setup
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-dockerfile-post-app-clone-setup() {
|
||||
declare desc="sets up properties for new app"
|
||||
declare trigger="post-app-clone-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "builder-dockerfile" "$OLD_APP" "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-builder-dockerfile-post-app-clone-setup "$@"
|
||||
15
plugins/builder-dockerfile/post-app-rename-setup
Executable file
15
plugins/builder-dockerfile/post-app-rename-setup
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-dockerfile-post-app-rename-setup() {
|
||||
declare desc="updates settings for new app"
|
||||
declare trigger="post-app-rename-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "builder-dockerfile" "$OLD_APP" "$NEW_APP"
|
||||
fn-plugin-property-destroy "builder-dockerfile" "$OLD_APP"
|
||||
}
|
||||
|
||||
trigger-builder-dockerfile-post-app-rename-setup "$@"
|
||||
14
plugins/builder-dockerfile/post-delete
Executable file
14
plugins/builder-dockerfile/post-delete
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-dockerfile-post-delete() {
|
||||
declare desc="destroys the builder-dockerfile properties for a given app"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-destroy "builder-dockerfile" "$APP"
|
||||
}
|
||||
|
||||
trigger-builder-dockerfile-post-delete "$@"
|
||||
@@ -8,6 +8,10 @@ trigger-builder-herokuish-builder-detect() {
|
||||
declare trigger="builder-detect"
|
||||
declare APP="$1" SOURCECODE_WORK_DIR="$2"
|
||||
|
||||
if [[ "$(dpkg --print-architecture 2>/dev/null || true)" == "armhf" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if fn-has-buildpacks-file "$SOURCECODE_WORK_DIR"; then
|
||||
echo "herokuish"
|
||||
return
|
||||
|
||||
@@ -25,7 +25,7 @@ trigger-builder-herokuish-builder-release() {
|
||||
config_export global >"$TMP_WORK_DIR/00-global-env.sh"
|
||||
config_export app "$APP" >"$TMP_WORK_DIR/01-app-env.sh"
|
||||
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t $IMAGE "$TMP_WORK_DIR"; then
|
||||
if ! suppress_output "$DOCKER_BIN" image build $DOCKER_BUILD_LABEL_ARGS $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t $IMAGE "$TMP_WORK_DIR"; then
|
||||
dokku_log_warn "Failure injecting environment variables"
|
||||
return 1
|
||||
fi
|
||||
|
||||
13
plugins/builder-herokuish/install
Executable file
13
plugins/builder-herokuish/install
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-herokuish-install() {
|
||||
declare desc="installs the builder-herokuish plugin"
|
||||
declare trigger="install"
|
||||
|
||||
fn-plugin-property-setup "builder-herokuish"
|
||||
}
|
||||
|
||||
trigger-builder-herokuish-install "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-herokuish plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
14
plugins/builder-herokuish/post-delete
Executable file
14
plugins/builder-herokuish/post-delete
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-herokuish-post-delete() {
|
||||
declare desc="destroys the builder-herokuish properties for a given app"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-destroy "builder-herokuish" "$APP"
|
||||
}
|
||||
|
||||
trigger-builder-herokuish-post-delete "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-null plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
13
plugins/builder-pack/install
Executable file
13
plugins/builder-pack/install
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-pack-install() {
|
||||
declare desc="installs the builder-pack plugin"
|
||||
declare trigger="install"
|
||||
|
||||
fn-plugin-property-setup "builder-pack"
|
||||
}
|
||||
|
||||
trigger-builder-pack-install "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-pack plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
14
plugins/builder-pack/post-app-clone-setup
Executable file
14
plugins/builder-pack/post-app-clone-setup
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-pack-post-app-clone-setup() {
|
||||
declare desc="sets up properties for new app"
|
||||
declare trigger="post-app-clone-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "builder-pack" "$OLD_APP" "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-builder-pack-post-app-clone-setup "$@"
|
||||
15
plugins/builder-pack/post-app-rename-setup
Executable file
15
plugins/builder-pack/post-app-rename-setup
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-pack-post-app-rename-setup() {
|
||||
declare desc="updates settings for new app"
|
||||
declare trigger="post-app-rename-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "builder-pack" "$OLD_APP" "$NEW_APP"
|
||||
fn-plugin-property-destroy "builder-pack" "$OLD_APP"
|
||||
}
|
||||
|
||||
trigger-builder-pack-post-app-rename-setup "$@"
|
||||
14
plugins/builder-pack/post-delete
Executable file
14
plugins/builder-pack/post-delete
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-pack-post-delete() {
|
||||
declare desc="destroys the builder-pack properties for a given app"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-destroy "builder-pack" "$APP"
|
||||
}
|
||||
|
||||
trigger-builder-pack-post-delete "$@"
|
||||
@@ -1,5 +1,5 @@
|
||||
SUBCOMMANDS = subcommands/report subcommands/set
|
||||
TRIGGERS = triggers/builder-detect triggers/core-post-extract triggers/install triggers/post-delete triggers/report
|
||||
TRIGGERS = triggers/builder-detect triggers/core-post-extract triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = builder
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -21,18 +21,26 @@ func main() {
|
||||
case "builder-detect":
|
||||
appName := flag.Arg(0)
|
||||
err = builder.TriggerBuilderDetect(appName)
|
||||
case "core-post-extract":
|
||||
appName := flag.Arg(0)
|
||||
sourceWorkDir := flag.Arg(1)
|
||||
err = builder.TriggerCorePostExtract(appName, sourceWorkDir)
|
||||
case "install":
|
||||
err = builder.TriggerInstall()
|
||||
case "post-app-clone-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = builder.TriggerPostAppCloneSetup(oldAppName, newAppName)
|
||||
case "post-app-rename-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = builder.TriggerPostAppRenameSetup(oldAppName, newAppName)
|
||||
case "post-delete":
|
||||
appName := flag.Arg(0)
|
||||
err = builder.TriggerPostDelete(appName)
|
||||
case "report":
|
||||
appName := flag.Arg(0)
|
||||
err = builder.ReportSingleApp(appName, "", "")
|
||||
case "core-post-extract":
|
||||
appName := flag.Arg(0)
|
||||
sourceWorkDir := flag.Arg(1)
|
||||
err = builder.TriggerCorePostExtract(appName, sourceWorkDir)
|
||||
default:
|
||||
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
|
||||
}
|
||||
|
||||
@@ -71,6 +71,29 @@ func TriggerInstall() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppCloneSetup creates new builder files
|
||||
func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
|
||||
err := common.PropertyClone("builder", oldAppName, newAppName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppRenameSetup renames builder files
|
||||
func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
|
||||
if err := common.PropertyClone("builder", oldAppName, newAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := common.PropertyDestroy("builder", oldAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostDelete destroys the builder property for a given app container
|
||||
func TriggerPostDelete(appName string) error {
|
||||
return common.PropertyDestroy("builder", appName)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core buildpacks plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -136,9 +136,9 @@ fn-ssl-verified() {
|
||||
fi
|
||||
|
||||
if [[ -f "$APP_SSL_PATH/server.letsencrypt.crt" ]]; then
|
||||
SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver -CAfile "$APP_SSL_PATH/server.crt" "$APP_SSL_PATH/server.letsencrypt.crt" | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
|
||||
SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver -CAfile "$APP_SSL_PATH/server.crt" "$APP_SSL_PATH/server.letsencrypt.crt" 2>/dev/null | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
|
||||
else
|
||||
SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver "$APP_SSL_PATH/server.crt" | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
|
||||
SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver "$APP_SSL_PATH/server.crt" 2>/dev/null | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
|
||||
fi
|
||||
|
||||
if [[ "$SSL_VERIFY_OUTPUT" == "OK" ]]; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -101,7 +101,7 @@ func GetAppScheduler(appName string) string {
|
||||
}
|
||||
|
||||
func getAppScheduler(appName string) string {
|
||||
b, _ := PlugnTriggerOutput("config-get", []string{appName, "DOKKU_SCHEDULER"}...)
|
||||
b, _ := PlugnTriggerOutput("scheduler-detect", []string{appName}...)
|
||||
value := strings.TrimSpace(string(b[:]))
|
||||
if value != "" {
|
||||
return value
|
||||
@@ -111,7 +111,7 @@ func getAppScheduler(appName string) string {
|
||||
|
||||
// GetGlobalScheduler fetchs the global scheduler
|
||||
func GetGlobalScheduler() string {
|
||||
b, _ := PlugnTriggerOutput("config-get-global", []string{"DOKKU_SCHEDULER"}...)
|
||||
b, _ := PlugnTriggerOutput("scheduler-detect", []string{"--global"}...)
|
||||
value := strings.TrimSpace(string(b[:]))
|
||||
if value != "" {
|
||||
return value
|
||||
@@ -226,20 +226,21 @@ func GetAppRunningContainerIDs(appName string, containerType string) ([]string,
|
||||
return runningContainerIDs, nil
|
||||
}
|
||||
|
||||
// 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) {
|
||||
containerIDs, err := GetAppContainerIDs(appName, "")
|
||||
// GetRunningImageTag retrieves current deployed image tag for a given app
|
||||
func GetRunningImageTag(appName string, imageTag string) (string, error) {
|
||||
b, err := PlugnTriggerOutput("deployed-app-image-tag", []string{appName}...)
|
||||
if err != nil {
|
||||
return "", err
|
||||
return imageTag, err
|
||||
}
|
||||
newImageTag := strings.TrimSpace(string(b[:]))
|
||||
if newImageTag != "" {
|
||||
imageTag = newImageTag
|
||||
}
|
||||
if imageTag == "" {
|
||||
imageTag = "latest"
|
||||
}
|
||||
|
||||
for _, containerID := range containerIDs {
|
||||
if image, err := DockerInspect(containerID, "{{ .Config.Image }}"); err == nil {
|
||||
return strings.Split(image, ":")[1], nil
|
||||
}
|
||||
}
|
||||
|
||||
return "", errors.New("No image tag found")
|
||||
return imageTag, nil
|
||||
}
|
||||
|
||||
// DokkuApps returns a list of all local apps
|
||||
|
||||
6
plugins/common/deploy
Executable file
6
plugins/common/deploy
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-deploy "$@"
|
||||
@@ -286,16 +286,14 @@ get_deploying_app_image_name() {
|
||||
declare desc="return deploying image identifier for a given app, tag tuple. validate if tag is presented"
|
||||
local APP="$1"
|
||||
local IMAGE_TAG="$2"
|
||||
IMAGE_REPO="$3"
|
||||
local IMAGE_REPO="$3"
|
||||
|
||||
IMAGE_TAG="$(get_running_image_tag "$APP" "$IMAGE_TAG")"
|
||||
local IMAGE_REMOTE_REPOSITORY=$(plugn trigger deployed-app-repository "$APP")
|
||||
local NEW_IMAGE_TAG=$(plugn trigger deployed-app-image-tag "$APP")
|
||||
local NEW_IMAGE_REPO=$(plugn trigger deployed-app-image-repo "$APP")
|
||||
|
||||
[[ -n "$NEW_IMAGE_REPO" ]] && IMAGE_REPO="$NEW_IMAGE_REPO"
|
||||
[[ -n "$NEW_IMAGE_TAG" ]] && IMAGE_TAG="$NEW_IMAGE_TAG"
|
||||
[[ -z "$IMAGE_REPO" ]] && IMAGE_REPO=$(get_app_image_repo "$APP")
|
||||
[[ -z "$IMAGE_TAG" ]] && IMAGE_TAG="latest"
|
||||
|
||||
local IMAGE="${IMAGE_REMOTE_REPOSITORY}${IMAGE_REPO}:${IMAGE_TAG}"
|
||||
verify_image "$IMAGE" || dokku_log_fail "App image ($IMAGE) not found"
|
||||
@@ -324,31 +322,19 @@ get_app_image_name() {
|
||||
get_app_scheduler() {
|
||||
declare desc="fetch the scheduler for a given application"
|
||||
declare APP="$1"
|
||||
local DOKKU_APP_SCHEDULER DOKKU_GLOBAL_SCHEDULER DOKKU_SCHEDULER
|
||||
|
||||
if [[ "$APP" == "--global" ]]; then
|
||||
APP=""
|
||||
fi
|
||||
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
[[ -n "$APP" ]] && DOKKU_APP_SCHEDULER="$(config_get "$APP" DOKKU_SCHEDULER || true)"
|
||||
DOKKU_GLOBAL_SCHEDULER="$(config_get --global DOKKU_SCHEDULER || true)"
|
||||
|
||||
DOKKU_SCHEDULER=${DOKKU_APP_SCHEDULER:="$DOKKU_GLOBAL_SCHEDULER"}
|
||||
if [[ -z "$DOKKU_SCHEDULER" ]]; then
|
||||
DOKKU_SCHEDULER="docker-local"
|
||||
fi
|
||||
|
||||
echo "$DOKKU_SCHEDULER"
|
||||
"$PLUGIN_CORE_AVAILABLE_PATH/common/common" --quiet scheduler-detect "$APP"
|
||||
}
|
||||
|
||||
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"
|
||||
declare desc="retrieves current deployed image tag for a given app"
|
||||
local APP="$1" IMAGE_TAG="$2"
|
||||
|
||||
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 '')
|
||||
echo "$RUNNING_IMAGE_TAG"
|
||||
local NEW_IMAGE_TAG=$(plugn trigger deployed-app-image-tag "$APP")
|
||||
[[ -n "$NEW_IMAGE_TAG" ]] && IMAGE_TAG="$NEW_IMAGE_TAG"
|
||||
[[ -z "$IMAGE_TAG" ]] && IMAGE_TAG="latest"
|
||||
|
||||
echo "$IMAGE_TAG"
|
||||
}
|
||||
|
||||
is_image_cnb_based() {
|
||||
@@ -652,12 +638,11 @@ dokku_release() {
|
||||
|
||||
cmd-deploy() {
|
||||
declare desc="deploy phase"
|
||||
declare APP="$1" IMAGE_TAG="$2"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
declare APP="$1" IMAGE_TAG="$2" PROCESS_TYPE="$3"
|
||||
|
||||
verify_app_name "$APP"
|
||||
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||
plugn trigger scheduler-deploy "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG"
|
||||
plugn trigger scheduler-deploy "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG" "$PROCESS_TYPE"
|
||||
}
|
||||
|
||||
release_and_deploy() {
|
||||
@@ -690,7 +675,8 @@ release_and_deploy() {
|
||||
dokku_release "$APP" "$IMAGE_SOURCE_TYPE" "$IMAGE_TAG"
|
||||
|
||||
if [[ "$DOKKU_SKIP_DEPLOY" != "true" ]]; then
|
||||
dokku_log_info1 "Deploying $APP..."
|
||||
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||
dokku_log_info1 "Deploying $APP via the $DOKKU_SCHEDULER scheduler..."
|
||||
cmd-deploy "$APP" "$IMAGE_TAG"
|
||||
dokku_log_info2 "Application deployed:"
|
||||
get_app_urls urls "$APP" | sed "s/^/ /"
|
||||
@@ -1049,7 +1035,7 @@ merge_dedupe_list() {
|
||||
}
|
||||
|
||||
acquire_app_deploy_lock() {
|
||||
declare desc="acquire advisory lock for use in git/tar deploys"
|
||||
declare desc="acquire advisory lock for use in deploys"
|
||||
local APP="$1"
|
||||
local LOCK_TYPE="${2:-waiting}"
|
||||
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"
|
||||
@@ -1060,7 +1046,7 @@ acquire_app_deploy_lock() {
|
||||
}
|
||||
|
||||
release_app_deploy_lock() {
|
||||
declare desc="release advisory lock used in git/tar deploys"
|
||||
declare desc="release advisory lock used in deploys"
|
||||
local APP="$1"
|
||||
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// ErrWithExitCode wraps error and exposes an ExitCode method
|
||||
@@ -13,6 +13,37 @@ type ErrWithExitCode interface {
|
||||
ExitCode() int
|
||||
}
|
||||
|
||||
type writer struct {
|
||||
mu *sync.Mutex
|
||||
source string
|
||||
}
|
||||
|
||||
// Write prints the data to either stdout or stderr using the log helper functions
|
||||
func (w *writer) Write(bytes []byte) (int, error) {
|
||||
w.mu.Lock()
|
||||
defer w.mu.Unlock()
|
||||
|
||||
if w.source == "stdout" {
|
||||
for _, line := range strings.Split(string(bytes), "\n") {
|
||||
if line == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
LogVerboseQuiet(line)
|
||||
}
|
||||
} else {
|
||||
for _, line := range strings.Split(string(bytes), "\n") {
|
||||
if line == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
LogVerboseStderrQuiet(line)
|
||||
}
|
||||
}
|
||||
|
||||
return len(bytes), nil
|
||||
}
|
||||
|
||||
// LogFail is the failure log formatter
|
||||
// prints text to stderr and exits with status 1
|
||||
func LogFail(text string) {
|
||||
@@ -81,6 +112,12 @@ func LogVerbose(text string) {
|
||||
fmt.Println(fmt.Sprintf(" %s", text))
|
||||
}
|
||||
|
||||
// LogVerboseStderr is the verbose log formatter
|
||||
// prints indented text to stderr
|
||||
func LogVerboseStderr(text string) {
|
||||
fmt.Fprintln(os.Stderr, fmt.Sprintf(" ! %s", text))
|
||||
}
|
||||
|
||||
// LogVerboseQuiet is the verbose log formatter
|
||||
// prints indented text to stdout (with quiet option)
|
||||
func LogVerboseQuiet(text string) {
|
||||
@@ -89,25 +126,17 @@ func LogVerboseQuiet(text string) {
|
||||
}
|
||||
}
|
||||
|
||||
// LogVerboseStderrQuiet is the verbose log formatter
|
||||
// prints indented text to stderr (with quiet option)
|
||||
func LogVerboseStderrQuiet(text string) {
|
||||
if os.Getenv("DOKKU_QUIET_OUTPUT") == "" {
|
||||
LogVerboseStderr(text)
|
||||
}
|
||||
}
|
||||
|
||||
// LogVerboseQuietContainerLogs is the verbose log formatter for container logs
|
||||
func LogVerboseQuietContainerLogs(containerID string) {
|
||||
sc := NewShellCmdWithArgs(DockerBin(), "container", "logs", containerID)
|
||||
sc.ShowOutput = false
|
||||
b, err := sc.CombinedOutput()
|
||||
if err != nil {
|
||||
LogExclaim(fmt.Sprintf("Failed to fetch container logs: %s", containerID))
|
||||
}
|
||||
|
||||
output := strings.TrimSpace(string(b))
|
||||
if len(output) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
for _, line := range strings.Split(output, "\n") {
|
||||
if line != "" {
|
||||
LogVerboseQuiet(line)
|
||||
}
|
||||
}
|
||||
LogVerboseQuietContainerLogsTail(containerID, 0, false)
|
||||
}
|
||||
|
||||
// LogVerboseQuietContainerLogsTail is the verbose log formatter for container logs with tail mode enabled
|
||||
@@ -119,17 +148,25 @@ func LogVerboseQuietContainerLogsTail(containerID string, lines int, tail bool)
|
||||
if tail {
|
||||
args = append(args, "--follow")
|
||||
}
|
||||
sc := NewShellCmdWithArgs(DockerBin(), args...)
|
||||
stdout, _ := sc.Command.StdoutPipe()
|
||||
sc.Command.Start()
|
||||
|
||||
scanner := bufio.NewScanner(stdout)
|
||||
scanner.Split(bufio.ScanLines)
|
||||
for scanner.Scan() {
|
||||
m := scanner.Text()
|
||||
LogVerboseQuiet(m)
|
||||
sc := NewShellCmdWithArgs(DockerBin(), args...)
|
||||
var mu sync.Mutex
|
||||
sc.Command.Stdout = &writer{
|
||||
mu: &mu,
|
||||
source: "stdout",
|
||||
}
|
||||
sc.Command.Stderr = &writer{
|
||||
mu: &mu,
|
||||
source: "stderr",
|
||||
}
|
||||
|
||||
if err := sc.Command.Start(); err != nil {
|
||||
LogExclaim(fmt.Sprintf("Failed to fetch container logs: %s", containerID))
|
||||
}
|
||||
|
||||
if err := sc.Command.Wait(); err != nil {
|
||||
LogExclaim(fmt.Sprintf("Failed to fetch container logs: %s", containerID))
|
||||
}
|
||||
sc.Command.Wait()
|
||||
}
|
||||
|
||||
// LogWarn is the warning log formatter
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -32,6 +32,12 @@ func main() {
|
||||
if !common.IsDeployed(appName) {
|
||||
err = fmt.Errorf("App %v not deployed", appName)
|
||||
}
|
||||
case "scheduler-detect":
|
||||
appName := flag.Arg(1)
|
||||
if *global {
|
||||
appName = "--global"
|
||||
}
|
||||
fmt.Print(common.GetAppScheduler(appName))
|
||||
default:
|
||||
err = fmt.Errorf("Invalid common command call: %v", cmd)
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ func UnsetAll(appName string, restart bool) (err error) {
|
||||
|
||||
func triggerRestart(appName string) {
|
||||
common.LogInfo1(fmt.Sprintf("Restarting app %s", appName))
|
||||
if err := common.PlugnTrigger("app-restart", appName); err != nil {
|
||||
if err := common.PlugnTrigger("release-and-deploy", appName); err != nil {
|
||||
common.LogWarn(fmt.Sprintf("Failure while restarting app: %s", err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,25 +7,13 @@ source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
trigger-config-docker-args() {
|
||||
declare desc="config docker-args plugin trigger"
|
||||
declare trigger="docker-args"
|
||||
declare APP="$1" IMAGE_TAG="$2"
|
||||
local ENV_ARGS IMAGE STDIN trigger
|
||||
declare APP="$1"
|
||||
local ENV_ARGS STDIN
|
||||
|
||||
IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
STDIN=$(cat)
|
||||
trigger="$0 config_docker_args"
|
||||
|
||||
if is_image_cnb_based "$IMAGE"; then
|
||||
ENV_ARGS="$(config_export app "$APP" --format docker-args-keys --merged)"
|
||||
echo -n "$STDIN $ENV_ARGS"
|
||||
return
|
||||
fi
|
||||
|
||||
if ! is_image_herokuish_based "$IMAGE" "$APP"; then
|
||||
ENV_ARGS="$(config_export app "$APP" --format docker-args --merged)"
|
||||
echo -n "$STDIN $ENV_ARGS"
|
||||
else
|
||||
echo -n "$STDIN"
|
||||
fi
|
||||
ENV_ARGS="$(config_export app "$APP" --format docker-args-keys --merged)"
|
||||
echo -n "$STDIN $ENV_ARGS"
|
||||
}
|
||||
|
||||
trigger-config-docker-args "$@"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core config plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core cron plugin"
|
||||
version = "0.25.7"
|
||||
version = "0.26.4"
|
||||
[plugin.config]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user