Compare commits
148 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4662ac2774 | ||
|
|
dd4d66fcb6 | ||
|
|
3ab23dde07 | ||
|
|
18a6ba90f9 | ||
|
|
a901661e91 | ||
|
|
9781a905a7 | ||
|
|
4cd064f76c | ||
|
|
f9be3dd974 | ||
|
|
4e50214b80 | ||
|
|
5c27ec31b7 | ||
|
|
b061843eb1 | ||
|
|
76d9b37b22 | ||
|
|
dff21e1d36 | ||
|
|
888f45254a | ||
|
|
ebcacdb5af | ||
|
|
5a002f9007 | ||
|
|
8d11789566 | ||
|
|
b0677fefa7 | ||
|
|
76d36f0758 | ||
|
|
5ae531ca25 | ||
|
|
5debadfde1 | ||
|
|
642dc83702 | ||
|
|
99bc51f106 | ||
|
|
c05f220d14 | ||
|
|
741ea68cac | ||
|
|
58dca68fb4 | ||
|
|
b1db1e3e6f | ||
|
|
e4c7e3eb74 | ||
|
|
0c9a98ce18 | ||
|
|
30d71d4a0e | ||
|
|
239391540f | ||
|
|
8f37b0f409 | ||
|
|
13d69a13f1 | ||
|
|
f734fb34f8 | ||
|
|
f186f6cc79 | ||
|
|
16f0a0dcfb | ||
|
|
a6729a562b | ||
|
|
b875def7de | ||
|
|
828ba13eec | ||
|
|
9bec66d5d6 | ||
|
|
30e09b8a07 | ||
|
|
5c1a1baf08 | ||
|
|
ade2cc8a7c | ||
|
|
0a31f6fe3a | ||
|
|
54f9fcf856 | ||
|
|
720d37dc5d | ||
|
|
5804cd11bc | ||
|
|
3254c52d7c | ||
|
|
090e243438 | ||
|
|
d697004889 | ||
|
|
2392c69a28 | ||
|
|
6ea57dafe7 | ||
|
|
8c34cfe64e | ||
|
|
1ec71cd509 | ||
|
|
43b9d9d4b6 | ||
|
|
6462dd891c | ||
|
|
353438dbd3 | ||
|
|
a9821decca | ||
|
|
548ca90e57 | ||
|
|
d55e34a55f | ||
|
|
d09a7506df | ||
|
|
ccdbaa84f9 | ||
|
|
7aa1334af9 | ||
|
|
66e66c9d18 | ||
|
|
57fe5f472f | ||
|
|
5612b0e7d2 | ||
|
|
52a88d63ad | ||
|
|
f98e7702fb | ||
|
|
7a710005a1 | ||
|
|
4d13e0c2f6 | ||
|
|
ffcf2215de | ||
|
|
70576f9ca7 | ||
|
|
8e954d99df | ||
|
|
5c1a6a68af | ||
|
|
aea8581b09 | ||
|
|
3511ae53f4 | ||
|
|
335143fca3 | ||
|
|
75b7ae94e1 | ||
|
|
c4270ca950 | ||
|
|
8a4b0e16e4 | ||
|
|
ebe7c82fb9 | ||
|
|
fbdf77ab38 | ||
|
|
9352e7a594 | ||
|
|
28de1b3fba | ||
|
|
64b1a54cad | ||
|
|
3c47971c61 | ||
|
|
6b90dc70b1 | ||
|
|
859ea13b0a | ||
|
|
51a3b0312a | ||
|
|
1d5699a67f | ||
|
|
eb7fde9c12 | ||
|
|
c8b86508eb | ||
|
|
61503b7b17 | ||
|
|
f918efa8f9 | ||
|
|
dba2246d7a | ||
|
|
d09cfb82f8 | ||
|
|
d02efdcc05 | ||
|
|
06bdee37ff | ||
|
|
e4c0c6b9d9 | ||
|
|
72c5172873 | ||
|
|
36e02c74fd | ||
|
|
3ae9feba8f | ||
|
|
757a829137 | ||
|
|
f7e218637e | ||
|
|
04a96125cc | ||
|
|
5141360b48 | ||
|
|
dbe80de925 | ||
|
|
4de1937e41 | ||
|
|
d4a634d24e | ||
|
|
2480b773a1 | ||
|
|
7f0b43c18f | ||
|
|
68efb73be6 | ||
|
|
2b76903bf3 | ||
|
|
6a4a94e236 | ||
|
|
9139c81db9 | ||
|
|
14249de8e5 | ||
|
|
b4db0c1a6c | ||
|
|
cd97ac3388 | ||
|
|
73f3ce7579 | ||
|
|
da67ebed5d | ||
|
|
36c2266196 | ||
|
|
6b357fdcb4 | ||
|
|
2ed3c6c356 | ||
|
|
528bd744e0 | ||
|
|
4ab42e846d | ||
|
|
d2cbb02342 | ||
|
|
e2e18cc0fc | ||
|
|
a31a7a231c | ||
|
|
669259eace | ||
|
|
45c543adde | ||
|
|
627a6bf8a5 | ||
|
|
f5e55540e9 | ||
|
|
d7f3a2b003 | ||
|
|
9ce309bed9 | ||
|
|
b62264c275 | ||
|
|
d4e832c27b | ||
|
|
59c45ea1d6 | ||
|
|
f64a754211 | ||
|
|
d8895bb64b | ||
|
|
882889a962 | ||
|
|
7338a77285 | ||
|
|
af014750aa | ||
|
|
02a8409114 | ||
|
|
3681c17aa2 | ||
|
|
f56023bb74 | ||
|
|
5ef41861d3 | ||
|
|
a679e80187 | ||
|
|
85c841da88 |
@@ -1,3 +1,4 @@
|
||||
---
|
||||
version: 2.1
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
exclude_paths:
|
||||
- vendor/**/*
|
||||
- tests/**/*
|
||||
- "**_test.go"
|
||||
- contrib/*
|
||||
- vendor/**/*
|
||||
- tests/**/*
|
||||
- "**_test.go"
|
||||
- contrib/*
|
||||
|
||||
51
.github/commands/bump-azure
vendored
Executable file
51
.github/commands/bump-azure
vendored
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
main() {
|
||||
declare VERSION="$1" BOT_GITHUB_USERNAME="$2" BOT_GITHUB_API_TOKEN="$3"
|
||||
local GH_VERSION=1.6.1
|
||||
local DATE_UPDATED="$(date +"%Y-%m-%d")"
|
||||
local GH_FOLDER="gh_${GH_VERSION}_linux_amd64"
|
||||
|
||||
echo "=====> Downloading gh"
|
||||
wget -O gh.tar.gz "https://github.com/cli/cli/releases/download/v${GH_VERSION}/${GH_FOLDER}.tar.gz"
|
||||
mkdir -p tmp
|
||||
tar xzf gh.tar.gz -C tmp
|
||||
if [[ ! -f tmp/$GH_FOLDER/bin/gh ]]; then
|
||||
echo "Failed to extract gh"
|
||||
return 1
|
||||
fi
|
||||
|
||||
cd tmp
|
||||
|
||||
$GH_FOLDER/bin/gh auth login --with-token <<<"$BOT_GITHUB_API_TOKEN"
|
||||
|
||||
echo "=====> Cloning quickstart templates"
|
||||
rm -rf azure-quickstart-templates >/dev/null
|
||||
git clone https://github.com/Azure/azure-quickstart-templates.git azure-quickstart-templates
|
||||
|
||||
pushd azure-quickstart-templates >/dev/null
|
||||
|
||||
echo "=====> Updating values"
|
||||
contents="$(jq '.githubUsername = "dokku"' dokku-vm/metadata.json)"
|
||||
echo "${contents}" >dokku-vm/metadata.json
|
||||
contents="$(jq --arg DATE_UPDATED "$DATE_UPDATED" '.dateUpdated = $DATE_UPDATED' dokku-vm/metadata.json)"
|
||||
echo "${contents}" >dokku-vm/metadata.json
|
||||
|
||||
contents="$(jq --arg VERSION "$VERSION" '.parameters.dokkuVersion.defaultValue = $VERSION' dokku-vm/azuredeploy.json)"
|
||||
echo "${contents}" >dokku-vm/azuredeploy.json
|
||||
|
||||
echo "=====> Updating remote repository"
|
||||
git add dokku-vm
|
||||
git checkout -b dokku-$VERSION
|
||||
git commit -m "Update dokku-vm dokku version to $VERSION"
|
||||
git remote set-url origin "https://$BOT_GITHUB_USERNAME:$BOT_GITHUB_API_TOKEN@github.com/dokku/azure-quickstart-templates.git"
|
||||
git push -f origin dokku-$VERSION
|
||||
|
||||
echo "=====> Creating upstream pull request"
|
||||
../$GH_FOLDER/bin/gh pr create --head dokku:dokku-$VERSION --repo Azure/azure-quickstart-templates --title "Update dokku-vm dokku version to $VERSION" --body ''
|
||||
|
||||
popd &>/dev/null
|
||||
}
|
||||
|
||||
main "$@"
|
||||
2
.github/commands/ci-run
vendored
2
.github/commands/ci-run
vendored
@@ -7,7 +7,7 @@ main() {
|
||||
mkdir -p test-results/bats
|
||||
pushd tests/unit >/dev/null
|
||||
bats --report-formatter junit --output ../../test-results/bats "$FILE_NAME.bats"
|
||||
popd >/dev/null
|
||||
popd &>/dev/null
|
||||
|
||||
ls -lah test-results/bats
|
||||
}
|
||||
|
||||
10
.github/linters/.markdown-lint.yml
vendored
Normal file
10
.github/linters/.markdown-lint.yml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
default: true
|
||||
|
||||
# Line length
|
||||
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md013
|
||||
MD013: false
|
||||
|
||||
# Inline HTML
|
||||
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md033
|
||||
MD033: false
|
||||
5
.github/linters/.yamllint.yml
vendored
Normal file
5
.github/linters/.yamllint.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
line-length: disable
|
||||
23
.github/workflows/bump-formula.yml
vendored
23
.github/workflows/bump-formula.yml
vendored
@@ -1,23 +0,0 @@
|
||||
name: bump-formula
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
jobs:
|
||||
bump-formula:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
|
||||
- name: Bump Brew
|
||||
env:
|
||||
HOMEBREW_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
|
||||
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
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 bump-formula-pr -f --no-browse --no-audit --no-fork --url "https://github.com/dokku/dokku/archive/${{ steps.get_version.outputs.version }}.tar.gz" dokku/repo/dokku
|
||||
167
.github/workflows/ci.yml
vendored
167
.github/workflows/ci.yml
vendored
@@ -1,5 +1,7 @@
|
||||
---
|
||||
name: CI
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
@@ -18,23 +20,23 @@ jobs:
|
||||
fail-fast: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: build package
|
||||
run: ./tests/ci/setup.sh build
|
||||
- name: build package
|
||||
run: ./tests/ci/setup.sh build
|
||||
|
||||
- name: set matrix for build
|
||||
id: set-matrix
|
||||
run: |
|
||||
json=$(python .github/commands/matrix)
|
||||
echo $json
|
||||
echo "::set-output name=matrix::$(echo "$json")"
|
||||
- name: set matrix for build
|
||||
id: set-matrix
|
||||
run: |
|
||||
json=$(python .github/commands/matrix)
|
||||
echo $json
|
||||
echo "::set-output name=matrix::$(echo "$json")"
|
||||
|
||||
- name: upload packages
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
- name: upload packages
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
|
||||
unit-tests:
|
||||
name: unit.${{ matrix.index }}
|
||||
@@ -45,30 +47,33 @@ jobs:
|
||||
matrix: ${{fromJson(needs.build.outputs.matrix)}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: build
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: build
|
||||
|
||||
- name: ci-setup
|
||||
run: ./.github/commands/ci-setup
|
||||
- name: ci-setup
|
||||
run: ./.github/commands/ci-setup
|
||||
|
||||
# - name: start ssh session
|
||||
# uses: luchihoratiu/debug-via-ssh@main
|
||||
# with:
|
||||
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
|
||||
# SSH_PASS: ${{ secrets.SSH_PASS }}
|
||||
# - name: start ssh session
|
||||
# uses: luchihoratiu/debug-via-ssh@main
|
||||
# with:
|
||||
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
|
||||
# SSH_PASS: ${{ secrets.SSH_PASS }}
|
||||
|
||||
- name: run ci
|
||||
timeout-minutes: 30
|
||||
run: sudo -E ./.github/commands/ci-run ${{ matrix.index }}
|
||||
- name: run ci
|
||||
timeout-minutes: 30
|
||||
run: sudo -E ./.github/commands/ci-run ${{ matrix.index }}
|
||||
env:
|
||||
SYNC_GITHUB_PASSWORD: ${{ secrets.SYNC_GITHUB_PASSWORD }}
|
||||
SYNC_GITHUB_USERNAME: ${{ secrets.SYNC_GITHUB_USERNAME }}
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: test-results-${{ matrix.index }}
|
||||
path: test-results
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: test-results-${{ matrix.index }}
|
||||
path: test-results
|
||||
|
||||
docker-deploy-tests:
|
||||
name: docker
|
||||
@@ -78,22 +83,22 @@ jobs:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: build
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: build
|
||||
|
||||
- name: ci-setup
|
||||
run: ./.github/commands/ci-setup
|
||||
- name: ci-setup
|
||||
run: ./.github/commands/ci-setup
|
||||
|
||||
- name: test docker deploys
|
||||
shell: bash
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
./tests/ci/setup.sh docker
|
||||
DOKKU_SSH_PORT=3022 sudo -E make -e test-ci-docker
|
||||
- name: test docker deploys
|
||||
shell: bash
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
./tests/ci/setup.sh docker
|
||||
DOKKU_SSH_PORT=3022 sudo -E make -e test-ci-docker
|
||||
|
||||
go-tests:
|
||||
name: go.${{ matrix.index }}
|
||||
@@ -107,33 +112,33 @@ jobs:
|
||||
GITHUB_NODE_INDEX: ${{ matrix.index }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: build
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: build
|
||||
|
||||
- name: ci-setup
|
||||
run: ./.github/commands/ci-setup
|
||||
- name: ci-setup
|
||||
run: ./.github/commands/ci-setup
|
||||
|
||||
- name: run go tests
|
||||
run: |
|
||||
export CIRCLE_SHA1=$GITHUB_SHA
|
||||
echo "CODACY_TOKEN=$CODACY_TOKEN"
|
||||
if [ "$CODACY_TOKEN" != "" ]; then
|
||||
echo "Detected value for CODACY_TOKEN"
|
||||
fi
|
||||
case $GITHUB_NODE_INDEX in
|
||||
0) sudo -E make -e lint-ci go-tests ci-go-coverage ;;
|
||||
1) sudo -E make -e deploy-test-checks-root deploy-test-config ;;
|
||||
2) sudo -E make -e deploy-test-multi ;;
|
||||
3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
|
||||
esac
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: coverage.${{ matrix.index }}
|
||||
path: test-results/coverage
|
||||
- name: run go tests
|
||||
run: |
|
||||
export CIRCLE_SHA1=$GITHUB_SHA
|
||||
echo "CODACY_TOKEN=$CODACY_TOKEN"
|
||||
if [ "$CODACY_TOKEN" != "" ]; then
|
||||
echo "Detected value for CODACY_TOKEN"
|
||||
fi
|
||||
case $GITHUB_NODE_INDEX in
|
||||
0) sudo -E make -e lint-ci go-tests ci-go-coverage ;;
|
||||
1) sudo -E make -e deploy-test-checks-root deploy-test-config ;;
|
||||
2) sudo -E make -e deploy-test-multi ;;
|
||||
3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
|
||||
esac
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: coverage.${{ matrix.index }}
|
||||
path: test-results/coverage
|
||||
|
||||
publish-test-results:
|
||||
name: publish-test-results
|
||||
@@ -143,15 +148,15 @@ jobs:
|
||||
if: success() || failure()
|
||||
|
||||
steps:
|
||||
- name: download test-results
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: test-results
|
||||
- name: download test-results
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: test-results
|
||||
|
||||
- name: Publish Unit Test Results
|
||||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6
|
||||
with:
|
||||
check_name: Unit Test Results
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: test-results/**/*.xml
|
||||
comment_on_pr: false
|
||||
- name: Publish Unit Test Results
|
||||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6
|
||||
with:
|
||||
check_name: Unit Test Results
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: test-results/**/*.xml
|
||||
comment_on_pr: false
|
||||
|
||||
58
.github/workflows/codeql-analysis.yml
vendored
58
.github/workflows/codeql-analysis.yml
vendored
@@ -1,3 +1,4 @@
|
||||
---
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
@@ -12,12 +13,13 @@
|
||||
|
||||
name: "CodeQL"
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '18 22 * * 2'
|
||||
|
||||
@@ -29,40 +31,40 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'go' ]
|
||||
language: ['go']
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
# - run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
74
.github/workflows/lint.yml
vendored
Normal file
74
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
---
|
||||
name: 'lint'
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
hadolint:
|
||||
name: hadolint
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v2
|
||||
- name: Run hadolint
|
||||
uses: brpaz/hadolint-action@1623ba61710b974b55ba455930e6f2c8ef919778
|
||||
# v1.3.1 => 1623ba61710b974b55ba455930e6f2c8ef919778
|
||||
|
||||
markdown-lint:
|
||||
name: markdown-lint
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v2
|
||||
- name: Run markdown-lint
|
||||
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb
|
||||
# v1.5.0 => 04d43ee9191307b50935a753da3b775ab695eceb
|
||||
with:
|
||||
config: '.github/linters/.markdown-lint.yml'
|
||||
args: './README.md'
|
||||
|
||||
shellcheck:
|
||||
name: shellcheck
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v2
|
||||
- name: Run shellcheck
|
||||
uses: ludeeus/action-shellcheck@d586102c117f97e63d7e3b56629d269efc9a7c60
|
||||
# 1.0.0 => d586102c117f97e63d7e3b56629d269efc9a7c60
|
||||
env:
|
||||
# keep in sync with tests/shellcheck-exclude
|
||||
SHELLCHECK_OPTS: -e SC1001 -e SC1003 -e SC1090 -e SC1091 -e SC1117 -e SC2029 -e SC2034 -e SC2046 -e SC2064 -e SC2068 -e SC2086 -e SC2119 -e SC2120 -e SC2128 -e SC2148 -e SC2153 -e SC2154 -e SC2155 -e SC2162 -e SC2174 -e SC2179 -e SC2191 -e SC2199 -e SC2207 -e SC2219 -e SC2220 -e SC2230 -e SC2231 -e SC2235
|
||||
|
||||
shfmt:
|
||||
name: shfmt
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v2
|
||||
- name: Run shfmt
|
||||
uses: luizm/action-sh-checker@442951059cb22d260c6e69309ae59cb7bb2334b8
|
||||
# v0.1.12 => 442951059cb22d260c6e69309ae59cb7bb2334b8
|
||||
env:
|
||||
SHFMT_OPTS: -l -bn -ci -i 2 -d
|
||||
with:
|
||||
sh_checker_shellcheck_disable: true
|
||||
|
||||
yamllint:
|
||||
name: yamllint
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v2
|
||||
- name: Run yamllint
|
||||
uses: ibiqlik/action-yamllint@b2aeacc1b7eeb8c23e84bba320d04fb5d6a323ee
|
||||
# v3.0.0 => b2aeacc1b7eeb8c23e84bba320d04fb5d6a323ee
|
||||
with:
|
||||
config_file: '.github/linters/.yamllint.yml'
|
||||
87
.github/workflows/release.yml
vendored
Normal file
87
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
---
|
||||
name: 'release'
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_type:
|
||||
description: 'Release type [build, betafish, patch, minor, major]'
|
||||
required: true
|
||||
default: 'build'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: release
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: install package_cloud
|
||||
run: gem install package_cloud
|
||||
|
||||
- name: configure git
|
||||
run: |
|
||||
git config --global user.name 'Dokku Bot'
|
||||
git config --global user.email no-reply@dokku.com
|
||||
|
||||
- name: build package
|
||||
run: contrib/release-dokku ${{ github.event.inputs.release_type }}
|
||||
|
||||
- name: output version
|
||||
id: version
|
||||
run: echo "::set-output name=version::$(cat build/next-version)"
|
||||
|
||||
- name: upload packages
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
|
||||
bump-azure:
|
||||
name: bump-azure
|
||||
runs-on: ubuntu-20.04
|
||||
needs: release
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Bump Azure Template
|
||||
env:
|
||||
BOT_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
|
||||
BOT_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
run: |
|
||||
VERSION=${{ needs.release.outputs.version }}
|
||||
git config --global user.name 'Dokku Bot'
|
||||
git config --global user.email no-reply@dokku.com
|
||||
.github/commands/bump-azure "${VERSION:1}" "$BOT_GITHUB_USERNAME" "$BOT_GITHUB_API_TOKEN"
|
||||
|
||||
bump-formula:
|
||||
name: bump-formula
|
||||
runs-on: macos-latest
|
||||
needs: release
|
||||
steps:
|
||||
- name: Bump Homebrew Formula
|
||||
env:
|
||||
HOMEBREW_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
|
||||
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
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 bump-formula-pr -f --no-browse --no-audit --no-fork --url "https://github.com/dokku/dokku/archive/${{ needs.release.outputs.version }}.tar.gz" dokku/repo/dokku
|
||||
@@ -5,10 +5,10 @@ several ways to help out:
|
||||
|
||||
* Create an [issue](https://github.com/dokku/dokku/issues) on GitHub, if you
|
||||
have found a bug
|
||||
* Write [test cases](http://dokku.viewdocs.io/dokku/development/testing/) for open bug issues
|
||||
* Write [test cases](https://dokku.com/docs/development/testing/) for open bug issues
|
||||
* Write patches for open bug/feature issues, preferably with test cases
|
||||
included
|
||||
* Contribute to the [documentation](http://dokku.viewdocs.io/dokku/)
|
||||
* Contribute to the [documentation](https://dokku.com/docs/)
|
||||
* Come up with new ways, non-commercial to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
||||
* Blog about different ways you are using dokku
|
||||
* Sponsor the Dokku project financially on [OpenCollective](https://opencollective.com/dokku#support) or [Patreon](https://www.patreon.com/dokku)
|
||||
@@ -45,7 +45,7 @@ encounter an issue. We always appreciate a well-written, thorough bug report,
|
||||
and will thank you for it!
|
||||
|
||||
Sometimes Dokku is missing a feature you need. In some cases, those features can
|
||||
be found in pre-existing [plugins](http://dokku.viewdocs.io/dokku/plugins/),
|
||||
be found in pre-existing [plugins](https://dokku.com/docs/plugins/),
|
||||
and we encourage our users to create and contribute such packages. From time to
|
||||
time, we will also pull plugins into the Dokku core when the task they solve is
|
||||
a common one for our users.
|
||||
@@ -129,7 +129,7 @@ requests:
|
||||
|
||||
### Running tests locally
|
||||
|
||||
Please read the [testing docs](http://dokku.viewdocs.io/dokku/development/testing/),
|
||||
Please read the [testing docs](https://dokku.com/docs/development/testing/),
|
||||
which contains test setup information as well as tips for running tests.
|
||||
|
||||
# Additional Resources
|
||||
|
||||
@@ -15,6 +15,9 @@ RUN addgroup --gid $DOKKU_GID dokku \
|
||||
|
||||
COPY ./tests/dhparam.pem /tmp/dhparam.pem
|
||||
COPY ./build/dokku.deb /tmp/dokku.deb
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# hadolint ignore=DL3005,DL3008
|
||||
RUN echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections \
|
||||
&& echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | debconf-set-selections \
|
||||
&& echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | debconf-set-selections \
|
||||
|
||||
205
HISTORY.md
205
HISTORY.md
@@ -1,5 +1,190 @@
|
||||
# History
|
||||
|
||||
## 0.24.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4473: @josegonzalez Add the correct log mount for app logs
|
||||
|
||||
### Other
|
||||
|
||||
- #4465: @Akirtovskis Add git:unlock command
|
||||
- #4470: @dependabot-preview[bot] chore(deps): bump socket.io from 3.1.2 to 4.0.0 in /tests/apps/.websocket.disabled
|
||||
- #4462: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 189 to 190 in /tests/apps/php
|
||||
|
||||
## 0.24.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4454: @josegonzalez Use proper title for azure releases and fix tmp dir creation
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4461: @josegonzalez Add dark mode support to documentation site
|
||||
- #4457: @Cellane Rename 0.24.0 migration guide
|
||||
- #4456: @josegonzalez Fix doc link and add 0.24.0 appendix to migration guides
|
||||
|
||||
## 0.24.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
See the [0.24.0 migration guide](/docs/appendices/0.24.0-migration-guide.md) for more information on migrating to 0.24.0.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4449: @josegonzalez Gitignore trigger symlink
|
||||
- #4447: @josegonzalez Checkout code to ensure the bump-azure script is available
|
||||
|
||||
### New Features
|
||||
|
||||
- #4453: @josegonzalez Simplify tar and zip deploys via git:from-archive
|
||||
- #4450: @josegonzalez Simplify docker image deploys via git:from-image
|
||||
- #4379: @josegonzalez Allow builders to be detected based on repository contents
|
||||
- #4425: @josegonzalez Implement heroku's postdeploy deployment task
|
||||
- #4424: @josegonzalez Implement git:auth command
|
||||
- #4419: @josegonzalez Add parallelism to certain proxy commands
|
||||
|
||||
### Refactors
|
||||
|
||||
- #4374: @josegonzalez Change exit code when app does not exist
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4451: @josegonzalez Update links to builder documentation to avoid extra rewrite
|
||||
- #4448: @josegonzalez Add documentation for git push to dokku-in-docker
|
||||
|
||||
## 0.23.9
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.9/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.23.9 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Refactors
|
||||
|
||||
- #4445: @josegonzalez Bump azure template and formula directly on release
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4444: @josegonzalez Uuse updated links for documentation
|
||||
- #4439: @RyukerLiu View Doc redirect not working. Change to use direct link
|
||||
|
||||
## 0.23.8
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.23.8 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4437: @josegonzalez Switch to using GIT_DIR environment variable to fix Centos 7 support
|
||||
- #4436: @josegonzalez Properly handle directory change when cleaning .git directory
|
||||
|
||||
### New Features
|
||||
|
||||
- #4428: @josegonzalez Bump azure ARM quickstart template on release
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4435: @josegonzalez Change page title based on current page
|
||||
- #4427: @josegonzalez Change process management doc references to make more sense
|
||||
|
||||
### Other
|
||||
|
||||
- #4438: @josegonzalez Split out nginx tests further to decrease overall CI runtime
|
||||
- #4430: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 11.0.0 to 11.0.1 in /tests/apps/java
|
||||
|
||||
## 0.23.7
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.23.7 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4421: @josegonzalez Keep the git directory for worktree-enabled installations
|
||||
|
||||
### New Features
|
||||
|
||||
- #4420: @josegonzalez Add ability to specify X-Forwarded-Ssl header for proxied requests
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4422: @josegonzalez Add warning regarding shallow clone pushes
|
||||
- #4417: @andrewk17 Correct vector sink example command
|
||||
- #4414: @josegonzalez Use correct html for offsite digitalocean link
|
||||
- #4413: @josegonzalez Fix SSL documentation link in troubleshooting docs
|
||||
|
||||
### Other
|
||||
|
||||
- #4423: @josegonzalez Drop unused sigil packaging code
|
||||
- #4418: @josegonzalez Drop unused skip-restart flag for proxy:disable
|
||||
|
||||
## 0.23.6
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.6/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.23.6 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4412: @markuspoerschke Fix generation of crontab
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4411: @ltalirz Replace nginx:build-config => proxy:build-config
|
||||
|
||||
## 0.23.5
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.23.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4406: @znz Fix typo in error message
|
||||
|
||||
### New Features
|
||||
|
||||
- #4404: @josegonzalez Add ability to trigger release via github actions
|
||||
|
||||
### Tests
|
||||
|
||||
- #4403: @josegonzalez Llint files during CI
|
||||
|
||||
## 0.23.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
@@ -2810,8 +2995,8 @@ This release is a minor bugfix to fix an issue with ssl support for spdy-enabled
|
||||
|
||||
The big-six-o. This release is largely comprised of new features that should allow for easier management of dokku. The highlights of this release are:
|
||||
|
||||
- The proxy plugin has been enhanced to allow users to map container ports to host ports. In the 0.5.0 release, we changed the semantics of how Dockerfile `EXPOSE` calls work to better follow Docker's lead, which ended up breaking how some applications were deployed to dokku. Please read our documentation surrounding [port management](http://dokku.viewdocs.io/dokku/proxy/) for more details.
|
||||
- Zero-downtime deploys can be disabled on a per-app and per-process basis. This can be used to speed up deploys when there are non-web processes being deployed, or when a user wishes to completely avoid any such waiting period. Please see the [checks documentation](http://dokku.viewdocs.io/dokku/checks-examples/) for further information.
|
||||
- The proxy plugin has been enhanced to allow users to map container ports to host ports. In the 0.5.0 release, we changed the semantics of how Dockerfile `EXPOSE` calls work to better follow Docker's lead, which ended up breaking how some applications were deployed to dokku. Please read our documentation surrounding [port management](https://dokku.com/docs/proxy/) for more details.
|
||||
- Zero-downtime deploys can be disabled on a per-app and per-process basis. This can be used to speed up deploys when there are non-web processes being deployed, or when a user wishes to completely avoid any such waiting period. Please see the [checks documentation](https://dokku.com/docs/deployment/zero-downtime-deploys/) for further information.
|
||||
|
||||
Thanks to all the contributors who helped with this release, and a special thanks to @michaelshobbs for ferrying the majority of our new functionality to it's current state!
|
||||
|
||||
@@ -2931,7 +3116,7 @@ Thanks to all the contributors who helped with this release!
|
||||
|
||||
Release 0.5.5 is mostly a documentation release, further clarifying how our default proxy implementation (nginx) interacts with Dockerfiles. Note that we also updated how ssl certificates interact with application domains, so please check out our domains and ssl documentation.
|
||||
|
||||
We've also added a small section to the [dokku homepage](http://dokku.viewdocs.io/dokku/) that lists the current core team. Feel free to look at their beautiful faces and imagine yourself contributing to Dokku and joining our core team. There are [quite a few ways to contribute](https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md) - even without code/documentation - so feel more than free to jump on the bandwagon!
|
||||
We've also added a small section to the [dokku homepage](https://dokku.com/docs/) that lists the current core team. Feel free to look at their beautiful faces and imagine yourself contributing to Dokku and joining our core team. There are [quite a few ways to contribute](https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md) - even without code/documentation - so feel more than free to jump on the bandwagon!
|
||||
|
||||
Finally, we've started an [Official Dokku Blog](https://dokku.github.io/), where we will post about dokku internals, roadmaps, potential use-cases, etc. An rss feed is available [here](https://dokku.github.io/feed.xml).
|
||||
|
||||
@@ -3030,9 +3215,9 @@ This is our largest, most feature-packed release in the history of the dokku pro
|
||||
|
||||
- Support for docker 1.10/1.11. You *must* have docker 1.9.1+ to install dokku.
|
||||
- Revamped documentation website
|
||||
- [Deployment Tasks](http://dokku.viewdocs.io/dokku/deployment/deployment-tasks/)
|
||||
- Heroku-style management of [dockerfile processes](http://dokku.viewdocs.io/dokku/deployment/dockerfiles/#procfiles-and-multiple-processes)
|
||||
- Official [persistent storage plugin](http://dokku.viewdocs.io/dokku/dokku-storage/)
|
||||
- [Deployment Tasks](https://dokku.com/docs/advanced-usage/deployment-tasks/)
|
||||
- Heroku-style management of [dockerfile processes](https://dokku.com/docs/deployment/builders/dockerfiles/#procfiles-and-multiple-processes)
|
||||
- Official [persistent storage plugin](https://dokku.com/docs/advanced-usage/persistent-storage/)
|
||||
|
||||
We'd also love it if you welcomed a few new core developers:
|
||||
|
||||
@@ -3526,9 +3711,9 @@ One new feature is colorized logging output, which should make it easier to debu
|
||||
|
||||
This is our first minor release in almost a year. Many new features and removals have occurred, so here is a neat summary:
|
||||
|
||||
- Plugins are now triggered via `plugn`. Notably, you'll need add a `plugin.toml` to describe the plugin as well as use `plugn trigger` instead of `pluginhook` to trigger plugin callbacks. Please see the [plugin creation documentation](http://dokku.viewdocs.io/dokku/development/plugin-creation/) for more details.
|
||||
- A few new official plugins have been added to the core, including [image tagging](http://dokku.viewdocs.io/dokku/application-deployment/), [certificate management](http://dokku.viewdocs.io/dokku/deployment/ssl-configuration/), a tar-based deploy solution, and much more. Check out the *New Features* section for more details.
|
||||
- We've removed a few deprecated plugin callbacks. Please see the [plugin triggers documentation](http://dokku.viewdocs.io/dokku/development/plugin-triggers/) to see what is available.
|
||||
- Plugins are now triggered via `plugn`. Notably, you'll need add a `plugin.toml` to describe the plugin as well as use `plugn trigger` instead of `pluginhook` to trigger plugin callbacks. Please see the [plugin creation documentation](https://dokku.com/docs/development/plugin-creation/) for more details.
|
||||
- A few new official plugins have been added to the core, including [image tagging](https://dokku.com/docs/deployment/application-deployment/), [certificate management](https://dokku.com/docs/configuration/ssl/), a tar-based deploy solution, and much more. Check out the *New Features* section for more details.
|
||||
- We've removed a few deprecated plugin callbacks. Please see the [plugin triggers documentation](https://dokku.com/docs/development/plugin-triggers/) to see what is available.
|
||||
- [Official datastorage plugins](https://github.com/dokku) have been created for the most commonly used datastores. If you previously used/maintained a community contributed plugin, please check these out. We'll be adding more official plugins as time goes on.
|
||||
|
||||
Thanks to the *many* contributors for making this release our best release so far, and special thanks to both @michaelshobbs and @Flink for pushing along the `0.4.0` release!
|
||||
@@ -3637,7 +3822,7 @@ This release is a bugfix release covering dokku packaging.
|
||||
|
||||
## 0.3.23
|
||||
|
||||
This release is a bugfix release mostly covering installation and nginx issues. As well, we launched a nicer documentation site [here](http://dokku.viewdocs.io/dokku/). Thanks to all of our contributors for making this a great release!
|
||||
This release is a bugfix release mostly covering installation and nginx issues. As well, we launched a nicer documentation site [here](https://dokku.com/docs/). Thanks to all of our contributors for making this a great release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
>
|
||||
> If you'd like to sponsor specific functionality, see the project's [Sponsoring](https://github.com/dokku/.github/blob/master/SPONSORING.md) document.
|
||||
>
|
||||
> If you need help figuring out how to use a specific buildpack, are seeing an issue in during the buildpack process, or are having issues using multiple buildpacks, please see our [slack channels or github discussion board](http://dokku.viewdocs.io/dokku/getting-started/where-to-get-help/#monitored-locations). Issues pertaining to buildpacks may be closed and locked.
|
||||
> If you need help figuring out how to use a specific buildpack, are seeing an issue in during the buildpack process, or are having issues using multiple buildpacks, please see our [slack channels or github discussion board](https://dokku.com/docs/getting-started/where-to-get-help/#monitored-locations). Issues pertaining to buildpacks may be closed and locked.
|
||||
>
|
||||
> If you need support for a version of Dokku that is more than a year old, your issue may be closed without an answer. Please upgrade to a recent version.
|
||||
|
||||
|
||||
18
Makefile
18
Makefile
@@ -2,11 +2,13 @@ DOKKU_VERSION ?= master
|
||||
|
||||
DOCKER_IMAGE_LABELER_VERSION ?= 0.2.2
|
||||
HEROKUISH_VERSION ?= 0.5.25
|
||||
NETRC_VERSION ?= 0.3.0
|
||||
PLUGN_VERSION ?= 0.6.1
|
||||
PROCFILE_VERSION ?= 0.11.0
|
||||
SIGIL_VERSION ?= 0.6.0
|
||||
SSHCOMMAND_VERSION ?= 0.12.0
|
||||
DOCKER_IMAGE_LABELER_URL ?= https://github.com/dokku/docker-image-labeler/releases/download/v${DOCKER_IMAGE_LABELER_VERSION}/docker-image-labeler_${DOCKER_IMAGE_LABELER_VERSION}_linux_x86_64.tgz
|
||||
NETRC_URL ?= https://github.com/dokku/netrc/releases/download/v${NETRC_VERSION}/netrc_${NETRC_VERSION}_linux_x86_64.tgz
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v${PLUGN_VERSION}/plugn_${PLUGN_VERSION}_linux_x86_64.tgz
|
||||
PROCFILE_UTIL_URL ?= https://github.com/josegonzalez/go-procfile-util/releases/download/v${PROCFILE_VERSION}/procfile-util_${PROCFILE_VERSION}_linux_x86_64.tgz
|
||||
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v${SIGIL_VERSION}/sigil_${SIGIL_VERSION}_Linux_x86_64.tgz
|
||||
@@ -34,7 +36,7 @@ endif
|
||||
|
||||
include common.mk
|
||||
|
||||
.PHONY: all apt-update install version copyfiles copyplugin man-db plugins dependencies docker-image-labeler sshcommand procfile-util plugn docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku go-build
|
||||
.PHONY: all apt-update install version copyfiles copyplugin man-db plugins dependencies docker-image-labeler netrc sshcommand procfile-util plugn docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku go-build
|
||||
|
||||
include tests.mk
|
||||
include package.mk
|
||||
@@ -125,7 +127,7 @@ plugin-dependencies: plugn procfile-util
|
||||
plugins: plugn procfile-util docker
|
||||
sudo -E dokku plugin:install --core
|
||||
|
||||
dependencies: apt-update docker-image-labeler sshcommand plugn procfile-util docker help2man man-db sigil dos2unix jq
|
||||
dependencies: apt-update docker-image-labeler netrc sshcommand plugn procfile-util docker help2man man-db sigil dos2unix jq
|
||||
$(MAKE) -e stack
|
||||
|
||||
apt-update:
|
||||
@@ -147,10 +149,9 @@ docker-image-labeler:
|
||||
wget -qO /tmp/docker-image-labeler_latest.tgz ${DOCKER_IMAGE_LABELER_URL}
|
||||
tar xzf /tmp/docker-image-labeler_latest.tgz -C /usr/local/bin
|
||||
|
||||
sshcommand:
|
||||
wget -qO /tmp/sshcommand_latest.tgz ${SSHCOMMAND_URL}
|
||||
tar xzf /tmp/sshcommand_latest.tgz -C /usr/local/bin
|
||||
sshcommand create dokku /usr/local/bin/dokku
|
||||
netrc:
|
||||
wget -qO /tmp/netrc_latest.tgz ${NETRC_URL}
|
||||
tar xzf /tmp/netrc_latest.tgz -C /usr/local/bin
|
||||
|
||||
procfile-util:
|
||||
wget -qO /tmp/procfile-util_latest.tgz ${PROCFILE_UTIL_URL}
|
||||
@@ -164,6 +165,11 @@ sigil:
|
||||
wget -qO /tmp/sigil_latest.tgz ${SIGIL_URL}
|
||||
tar xzf /tmp/sigil_latest.tgz -C /usr/local/bin
|
||||
|
||||
sshcommand:
|
||||
wget -qO /tmp/sshcommand_latest.tgz ${SSHCOMMAND_URL}
|
||||
tar xzf /tmp/sshcommand_latest.tgz -C /usr/local/bin
|
||||
sshcommand create dokku /usr/local/bin/dokku
|
||||
|
||||
docker:
|
||||
apt-get -qq -y --no-install-recommends install curl
|
||||
grep -i -E "^docker" /etc/group || groupadd docker
|
||||
|
||||
18
README.md
18
README.md
@@ -1,10 +1,11 @@
|
||||
# Dokku
|
||||
|
||||
[](https://github.com/dokku/dokku/actions?query=workflow%3ACI)
|
||||
[](https://packagecloud.io/dokku/dokku)
|
||||
[](https://aur.archlinux.org/packages/dokku/)
|
||||
[](https://webchat.freenode.net/?channels=dokku)
|
||||
[](https://glider-slackin.herokuapp.com/)
|
||||
[](http://dokku.viewdocs.io/dokku/)
|
||||
[](https://dokku.com/docs/)
|
||||
[](#sponsors)
|
||||
[](#backers)
|
||||
[](https://www.patreon.com/dokku/)
|
||||
@@ -46,7 +47,6 @@ Become a sponsor and get your logo on our README on Github with a link to your s
|
||||
<a href="https://opencollective.com/dokku/sponsor/28/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/29/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/29/avatar.svg"></a>
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/dokku#backer)]
|
||||
@@ -99,29 +99,29 @@ Otherwise, you will need to import the keypair manually after installation using
|
||||
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.23.4 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
|
||||
If you wish for a more unattended installation method, see [these](http://dokku.viewdocs.io/dokku/getting-started/install/debian/#unattended-installation) docs.
|
||||
If you wish for a more unattended installation method, see [these](https://dokku.com/docs/getting-started/install/debian/#unattended-installation) docs.
|
||||
|
||||
### Upgrade
|
||||
|
||||
[View the docs](http://dokku.viewdocs.io/dokku/getting-started/upgrading/) for upgrading from an older version of Dokku.
|
||||
[View the docs](https://dokku.com/docs/getting-started/upgrading/) for upgrading from an older version of Dokku.
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation - including advanced installation docs - are available online at [http://dokku.viewdocs.io/dokku/](http://dokku.viewdocs.io/dokku/).
|
||||
Full documentation - including advanced installation docs - are available online at [https://dokku.com/docs/](https://dokku.com/docs/).
|
||||
|
||||
## Support
|
||||
|
||||
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku).
|
||||
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](https://dokku.com/docs/getting-started/troubleshooting/) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku).
|
||||
|
||||
## Contribution
|
||||
|
||||
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
|
||||
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](https://dokku.com/docs/getting-started/troubleshooting/) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
|
||||
|
||||
While we may not merge your PR as is, they serve to start conversations and improve the general Dokku experience for all users.
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ ensure-environment() {
|
||||
FREE_MEMORY=$(grep MemTotal /proc/meminfo | awk '{print $2}')
|
||||
if [[ "$FREE_MEMORY" -lt 1003600 ]]; then
|
||||
echo "For dokku to build containers, it is strongly suggested that you have 1024 megabytes or more of free memory"
|
||||
echo "If necessary, please consult this document to setup swap: http://dokku.viewdocs.io/dokku/getting-started/advanced-installation/#vms-with-less-than-1-gb-of-memory"
|
||||
echo "If necessary, please consult this document to setup swap: https://dokku.com/docs/getting-started/advanced-installation/#vms-with-less-than-1-gb-of-memory"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ install-dokku-from-source() {
|
||||
local DOKKU_CHECKOUT="$1"
|
||||
|
||||
if ! command -v apt-get &>/dev/null; then
|
||||
log-fail "This installation script requires apt-get. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
log-fail "This installation script requires apt-get. For manual installation instructions, consult https://dokku.com/docs/getting-started/advanced-installation/"
|
||||
fi
|
||||
|
||||
apt-get -qq -y --no-install-recommends install sudo git make software-properties-common
|
||||
@@ -125,7 +125,7 @@ install-dokku-from-package() {
|
||||
install-dokku-from-rpm-package "$@"
|
||||
;;
|
||||
*)
|
||||
log-fail "Unsupported Linux distribution. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
log-fail "Unsupported Linux distribution. For manual installation instructions, consult https://dokku.com/docs/getting-started/advanced-installation/"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
make version copyfiles \
|
||||
&& make deb-dokku deb-sigil \
|
||||
rpm-dokku rpm-sigil
|
||||
&& make deb-dokku rpm-dokku
|
||||
|
||||
RUN ls -lha /tmp/
|
||||
|
||||
@@ -15,7 +15,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.23.4'
|
||||
VERSION = 'v0.24.2'
|
||||
|
||||
def bytes_to_string(b):
|
||||
if type(b) == bytes:
|
||||
@@ -341,7 +341,7 @@ PAGE = """
|
||||
<div class="form-group">
|
||||
<label for="key">Public SSH Keys</label><br />
|
||||
<textarea class="form-control" name="keys" rows="5" id="key" placeholder="Begins with 'ssh-rsa', 'ssh-dss', 'ssh-ed25519', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'">{ADMIN_KEYS}</textarea>
|
||||
<small class="form-text text-muted">Public keys allow users to ssh onto the server as the <code>dokku</code> user, as well as remotely execute Dokku commands. They are currently auto-populated from: <code>{AUTHORIZED_KEYS_LOCATION}</code>, and can be changed later via the <a href="http://dokku.viewdocs.io/dokku/deployment/user-management/" target="_blank"><code>dokku ssh-keys</code></a> plugin.</small>
|
||||
<small class="form-text text-muted">Public keys allow users to ssh onto the server as the <code>dokku</code> user, as well as remotely execute Dokku commands. They are currently auto-populated from: <code>{AUTHORIZED_KEYS_LOCATION}</code>, and can be changed later via the <a href="https://dokku.com/docs/deployment/user-management/" target="_blank"><code>dokku ssh-keys</code></a> plugin.</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -352,7 +352,7 @@ PAGE = """
|
||||
<div class="form-group">
|
||||
<label for="hostname">Hostname</label>
|
||||
<input class="form-control" type="text" id="hostname" name="hostname" value="{HOSTNAME}" placeholder="A hostname or ip address such as {HOSTNAME}" />
|
||||
<small class="form-text text-muted">This will be used as the default host for all applications, and can be changed later via the <a href="http://dokku.viewdocs.io/dokku/configuration/domains/" target="_blank"><code>dokku domains:set-global</code></a> command.</small>
|
||||
<small class="form-text text-muted">This will be used as the default host for all applications, and can be changed later via the <a href="https://dokku.com/docs/configuration/domains/" target="_blank"><code>dokku domains:set-global</code></a> command.</small>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="vhost" name="vhost" value="true">
|
||||
@@ -406,7 +406,7 @@ PAGE = """
|
||||
result.classList.add("text-success");
|
||||
result.textContent = "Success! Redirecting in 3 seconds. .."
|
||||
setTimeout(function() {
|
||||
window.location.href = "http://dokku.viewdocs.io/dokku~{VERSION}/deployment/application-deployment/";
|
||||
window.location.href = "https://dokku.com/docs~{VERSION}/deployment/application-deployment/";
|
||||
}, 3000);
|
||||
})
|
||||
.catch(function (error) {
|
||||
|
||||
@@ -376,6 +376,8 @@ main() {
|
||||
NEXT_VERSION="$(fn-version-next "$CURRENT_VERSION" "$RELEASE")"
|
||||
IS_RELEASE="$(fn-is-release "$RELEASE")"
|
||||
|
||||
echo "v${NEXT_VERSION}" >build/next-version
|
||||
|
||||
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}_amd64.deb" || log-fail "Error extracting deb package"
|
||||
|
||||
41
deb.mk
41
deb.mk
@@ -10,26 +10,12 @@ DOKKU_UPDATE_VERSION ?= 0.2.0
|
||||
DOKKU_UPDATE_ARCHITECTURE = amd64
|
||||
DOKKU_UPDATE_PACKAGE_NAME = dokku-update_$(DOKKU_UPDATE_VERSION)_$(DOKKU_UPDATE_ARCHITECTURE).deb
|
||||
|
||||
define SIGIL_DESCRIPTION
|
||||
Standalone string interpolator and template processor
|
||||
Sigil is a command line tool for template processing
|
||||
and POSIX-compliant variable expansion. It was created
|
||||
for configuration templating, but can be used for any
|
||||
text processing.
|
||||
endef
|
||||
SIGIL_REPO_NAME ?= gliderlabs/sigil
|
||||
SIGIL_VERSION ?= 0.4.0
|
||||
SIGIL_ARCHITECTURE = amd64
|
||||
SIGIL_PACKAGE_NAME = gliderlabs_sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb
|
||||
SIGIL_URL = https://github.com/gliderlabs/sigil/releases/download/v$(SIGIL_VERSION)/sigil_$(SIGIL_VERSION)_Linux_x86_64.tgz
|
||||
|
||||
ifndef IS_RELEASE
|
||||
IS_RELEASE = true
|
||||
endif
|
||||
|
||||
export SIGIL_DESCRIPTION
|
||||
|
||||
.PHONY: install-from-deb deb-all deb-dokku deb-dokku-update deb-setup deb-sigil
|
||||
.PHONY: install-from-deb deb-all deb-dokku deb-dokku-update deb-setup
|
||||
|
||||
install-from-deb:
|
||||
@echo "--> Initial apt-get update"
|
||||
@@ -45,7 +31,7 @@ install-from-deb:
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -qq -y --no-install-recommends install dokku
|
||||
|
||||
deb-all: deb-setup deb-dokku deb-sigil deb-dokku-update
|
||||
deb-all: deb-setup deb-dokku deb-dokku-update
|
||||
mv $(BUILD_DIRECTORY)/*.deb .
|
||||
@echo "Done"
|
||||
|
||||
@@ -84,26 +70,3 @@ deb-dokku-update:
|
||||
--license 'MIT License' \
|
||||
contrib/dokku-update=/usr/local/bin/dokku-update \
|
||||
contrib/dokku-update-version=/var/lib/dokku-update/VERSION
|
||||
|
||||
deb-sigil:
|
||||
rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin
|
||||
|
||||
@echo "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/sigil-$(SIGIL_VERSION).tgz $(SIGIL_URL)
|
||||
cd /tmp/tmp/ && tar zxf /tmp/tmp/sigil-$(SIGIL_VERSION).tgz
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
cp /tmp/tmp/sigil /tmp/build/usr/bin/sigil && chmod +x /tmp/build/usr/bin/sigil
|
||||
|
||||
@echo "-> Creating $(SIGIL_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n gliderlabs-sigil \
|
||||
--version $(SIGIL_VERSION) \
|
||||
--architecture $(SIGIL_ARCHITECTURE) \
|
||||
--package $(BUILD_DIRECTORY)/$(SIGIL_PACKAGE_NAME) \
|
||||
--url "https://github.com/$(SIGIL_REPO_NAME)" \
|
||||
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
|
||||
--category utils \
|
||||
--description "$$SIGIL_DESCRIPTION" \
|
||||
--license 'MIT License' \
|
||||
.
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -1,9 +1,9 @@
|
||||
Package: dokku
|
||||
Version: 0.23.4
|
||||
Version: 0.24.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), net-tools, software-properties-common, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsyslog, dos2unix, jq
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), net-tools, netrc, software-properties-common, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsyslog, dos2unix, jq, unzip
|
||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update, dokku-event-listener
|
||||
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
|
||||
@@ -32,7 +32,7 @@ To extract the backup onto another server, copy the backup to the server and ext
|
||||
sudo tar -xzvf path/to/dokku/backup.tar.gz -C /
|
||||
```
|
||||
|
||||
At this point, all datastores should be individually started and checked for data integrity. Once this is complete, individual applications can be rebuilt. Please consult the [process management documentation](/docs/deployment/process-management.md#rebuilding-apps) for more information on how to rebuild applications.
|
||||
At this point, all datastores should be individually started and checked for data integrity. Once this is complete, individual applications can be rebuilt. Please consult the [process management documentation](/docs/processes/process-management.md#rebuilding-apps) for more information on how to rebuild applications.
|
||||
|
||||
## Caveats
|
||||
|
||||
|
||||
@@ -24,6 +24,12 @@ Each "phase" has different expectations and limitations:
|
||||
- Example use-cases
|
||||
- Notifying slack that your app is deployed
|
||||
- Coordinating traffic routing with a central load balancer
|
||||
- `app.json`: `scripts.postdeploy`
|
||||
- When to use: This should be used when you wish to run a command _once_, after the app is created and not on subsequent deploys to the app.
|
||||
- Are changes committed to the image at this phase: No
|
||||
- Example use-cases
|
||||
- Setting up OAuth clients and DNS
|
||||
- Loading seed/test data into the app’s test database
|
||||
- `Procfile`: `release`
|
||||
- When to use: This should be used in conjunction with external systems to signal the completion of your app image build.
|
||||
- Are changes committed to the image at this phase: No
|
||||
@@ -44,6 +50,7 @@ Dokku provides limited support for the `app.json` manifest from Heroku (document
|
||||
|
||||
- `scripts.dokku.predeploy`: This is run _after_ an app's docker image is built, but _before_ any containers are scheduled. Changes made to your image are committed at this phase.
|
||||
- `scripts.dokku.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are *not* committed at this phase.
|
||||
- `scripts.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are *not* committed at this phase.
|
||||
|
||||
For buildpack-based deployments, the location of the `app.json` file should be at the root of your repository. Dockerfile-based app deploys should have the `app.json` in the configured `WORKDIR` directory; otherwise Dokku defaults to the buildpack app behavior of looking in `/app`.
|
||||
|
||||
@@ -57,7 +64,8 @@ The following is an example `app.json` file. Please note that only the `scripts.
|
||||
"dokku": {
|
||||
"predeploy": "touch /app/predeploy.test",
|
||||
"postdeploy": "curl https://some.external.api.service.com/deployment?state=success"
|
||||
}
|
||||
},
|
||||
"postdeploy": "curl https://some.external.api.service.com/created?state=success"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -33,7 +33,7 @@ More information on supported Docker options can be found here: https://docs.doc
|
||||
|
||||
### Add Docker options
|
||||
|
||||
Add some options for the deployed/running app and when executing [`dokku run`](/docs/deployment/one-off-processes.md):
|
||||
Add some options for the deployed/running app and when executing [`dokku run`](/docs/processes/one-off-tasks.md):
|
||||
|
||||
```shell
|
||||
# Mount a host volume in a Docker container: "-v /host/path:/container/path"
|
||||
|
||||
@@ -40,7 +40,7 @@ dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage/node-js-app` to `/storage` inside the container.
|
||||
|
||||
Once you have mounted persistent storage, you will also need to restart the application. See the
|
||||
[process scaling documentation](/docs/deployment/process-management.md) for more information.
|
||||
[process scaling documentation](/docs/processes/process-management.md) for more information.
|
||||
|
||||
```shell
|
||||
dokku ps:restart app-name
|
||||
|
||||
@@ -35,35 +35,35 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.23.4 enabled dokku core standard plugin
|
||||
20_events 0.23.4 enabled dokku core events logging plugin
|
||||
app-json 0.23.4 enabled dokku core app-json plugin
|
||||
apps 0.23.4 enabled dokku core apps plugin
|
||||
build-env 0.23.4 enabled dokku core build-env plugin
|
||||
buildpacks 0.23.4 enabled dokku core buildpacks plugin
|
||||
certs 0.23.4 enabled dokku core certificate management plugin
|
||||
checks 0.23.4 enabled dokku core checks plugin
|
||||
common 0.23.4 enabled dokku core common plugin
|
||||
config 0.23.4 enabled dokku core config plugin
|
||||
docker-options 0.23.4 enabled dokku core docker-options plugin
|
||||
domains 0.23.4 enabled dokku core domains plugin
|
||||
enter 0.23.4 enabled dokku core enter plugin
|
||||
git 0.23.4 enabled dokku core git plugin
|
||||
logs 0.23.4 enabled dokku core logs plugin
|
||||
network 0.23.4 enabled dokku core network plugin
|
||||
nginx-vhosts 0.23.4 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.23.4 enabled dokku core plugin plugin
|
||||
proxy 0.23.4 enabled dokku core proxy plugin
|
||||
ps 0.23.4 enabled dokku core ps plugin
|
||||
repo 0.23.4 enabled dokku core repo plugin
|
||||
resource 0.23.4 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.23.4 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.23.4 enabled dokku core shell plugin
|
||||
ssh-keys 0.23.4 enabled dokku core ssh-keys plugin
|
||||
storage 0.23.4 enabled dokku core storage plugin
|
||||
tags 0.23.4 enabled dokku core tags plugin
|
||||
tar 0.23.4 enabled dokku core tar plugin
|
||||
trace 0.23.4 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.24.2 enabled dokku core standard plugin
|
||||
20_events 0.24.2 enabled dokku core events logging plugin
|
||||
app-json 0.24.2 enabled dokku core app-json plugin
|
||||
apps 0.24.2 enabled dokku core apps plugin
|
||||
build-env 0.24.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.24.2 enabled dokku core buildpacks plugin
|
||||
certs 0.24.2 enabled dokku core certificate management plugin
|
||||
checks 0.24.2 enabled dokku core checks plugin
|
||||
common 0.24.2 enabled dokku core common plugin
|
||||
config 0.24.2 enabled dokku core config plugin
|
||||
docker-options 0.24.2 enabled dokku core docker-options plugin
|
||||
domains 0.24.2 enabled dokku core domains plugin
|
||||
enter 0.24.2 enabled dokku core enter plugin
|
||||
git 0.24.2 enabled dokku core git plugin
|
||||
logs 0.24.2 enabled dokku core logs plugin
|
||||
network 0.24.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.24.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.24.2 enabled dokku core plugin plugin
|
||||
proxy 0.24.2 enabled dokku core proxy plugin
|
||||
ps 0.24.2 enabled dokku core ps plugin
|
||||
repo 0.24.2 enabled dokku core repo plugin
|
||||
resource 0.24.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.24.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.24.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.24.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.24.2 enabled dokku core storage plugin
|
||||
tags 0.24.2 enabled dokku core tags plugin
|
||||
tar 0.24.2 enabled dokku core tar plugin
|
||||
trace 0.24.2 enabled dokku core trace plugin
|
||||
```
|
||||
|
||||
> Warning: All plugin commands other than `plugin:list` and `plugin:help` require sudo access and must be run directly from the Dokku server.
|
||||
|
||||
12
docs/appendices/0.24.0-migration-guide.md
Normal file
12
docs/appendices/0.24.0-migration-guide.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# 0.24.0 Migration Guide
|
||||
|
||||
## Changes
|
||||
|
||||
- The commands `proxy:enable`, `proxy:disable` and `proxy:build-config` now support the `--all` flag in addition to general parallelism.
|
||||
- The `builder-cnb` plugin has been renamed `builder-pack`, and all related plugin triggers have had the suffix `-cnb` changed to `-pack`.
|
||||
|
||||
## Deprecations
|
||||
|
||||
- The 1.0.0 release of Dokku will no longer select buildpack builders over dockerfile builders if both builders match. Instead, Dokku will choose the first builder that responds to the `builder-detect` trigger. Users that wish to use a specific builder may set a builder using the `builder:set` command, which will force Dokku to use the specified builder regardless of what might be auto-detected.
|
||||
- The `tags` plugin 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 the next minor release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-image`.
|
||||
- The `tar` plugin 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 the next minor release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-archive`.
|
||||
@@ -20,6 +20,6 @@
|
||||
|
||||
## Dockerfile apps with exposed ports
|
||||
|
||||
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/docs/deployment/methods/dockerfiles.md#exposed-ports)
|
||||
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/docs/deployment/builders/dockerfiles.md#exposed-ports)
|
||||
- Note that nginx will proxy the same port numbers to listen publicly
|
||||
- UDP ports can be exposed by disabling the [nginx proxy](/docs/advanced-usage/proxy-management.md) with `dokku proxy:disable node-js-app`
|
||||
- UDP ports can be exposed by disabling the [nginx proxy](/docs/networking/proxy-management.md) with `dokku proxy:disable node-js-app`
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
## Proxy port mapping
|
||||
|
||||
- You can now configure host -> container proxy port mappings
|
||||
- The UI is handled by the [proxy](/docs/advanced-usage/proxy-management.md) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
|
||||
- The UI is handled by the [proxy](/docs/networking/proxy-management.md) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
|
||||
- Default port mappings
|
||||
- buildpack apps will be set to `http:80:5000` and will also include `https:443:5000` if SSL is enabled.
|
||||
- dockerfile apps with explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on each exposed port that proxies to the same port of the deployed application container.
|
||||
- You may override this behavior with the [`proxy:ports-*` commands](/docs/advanced-usage/proxy-management.md) or by directly setting `DOKKU_PROXY_PORT_MAP` with the `config:set` command
|
||||
- You may override this behavior with the [`proxy:ports-*` commands](/docs/networking/proxy-management.md) or by directly setting `DOKKU_PROXY_PORT_MAP` with the `config:set` command
|
||||
- dockerfile apps without explicitly exposed ports will behave the same as a buildpack app
|
||||
- NOTE: These defaults **are not** automatically changed on subsequent pushes and must be manipulated with the aforementioned commands
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ We should now properly handle file ownership for mounted directories. This was e
|
||||
|
||||
## Restart Policies
|
||||
|
||||
If you previously managed container restart policies via docker-options, these can now be managed natively via the built-in `ps` plugin. There is no migration necessary. See the [restart policy documentation](/docs/deployment/process-management.md#restart-policies) for more details.
|
||||
If you previously managed container restart policies via docker-options, these can now be managed natively via the built-in `ps` plugin. There is no migration necessary. See the [restart policy documentation](/docs/processes/process-management.md#restart-policies) for more details.
|
||||
|
||||
## SSH Keys
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.23.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
:root {
|
||||
color-scheme: light dark;
|
||||
}
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 62.5%;
|
||||
font-size: 62.5%;
|
||||
font-weight: 400;
|
||||
padding-bottom: 40px;
|
||||
color: #5a5a5a;
|
||||
@@ -39,13 +42,13 @@ h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -231,7 +234,7 @@ h1 {
|
||||
}
|
||||
.list-group-item {
|
||||
border: none;
|
||||
font-size: 1.1em;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
padding: .2rem .5rem;
|
||||
color: #157577;
|
||||
@@ -317,7 +320,7 @@ a.list-group-item {
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
font-size: 1.2em;
|
||||
font-size: 1em;
|
||||
border-radius: 0 0 0 5px;
|
||||
padding: 0 0.5em;
|
||||
text-shadow: none;
|
||||
@@ -654,3 +657,74 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: rgb(13, 17, 23);
|
||||
}
|
||||
.header {
|
||||
background-color: #075c9b;
|
||||
}
|
||||
.blurb {
|
||||
filter: invert(1);
|
||||
}
|
||||
.slack-channel {
|
||||
background-color: #110e09;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: rgb(22, 27, 34);
|
||||
color: #bbb;
|
||||
}
|
||||
pre {
|
||||
background-color: rgb(22, 27, 34);
|
||||
color: #bbb;
|
||||
border: 1px solid #555;
|
||||
box-shadow: 0 0 0 3px #111;
|
||||
}
|
||||
.highlight-show-language-label {
|
||||
filter: invert(1);
|
||||
}
|
||||
.list-group-item {
|
||||
background-color: rgb(13, 17, 23);
|
||||
}
|
||||
blockquote {
|
||||
background-color: rgba(0, 82, 204, 0.18);
|
||||
border-left: 4px solid rgba(108, 169, 255, 0.3);;
|
||||
color: rgb(108, 169, 255);
|
||||
}
|
||||
blockquote.warning {
|
||||
border-left: 4px solid rgba(239, 136, 84, 0.3);
|
||||
background-color: rgba(235, 100, 32, 0.18);
|
||||
color: rgb(239, 136, 84);
|
||||
}
|
||||
blockquote.new-as-of {
|
||||
border-left: 4px solid rgba(11, 216, 73, 0.3);
|
||||
background-color: rgba(9, 171, 60, 0.18);
|
||||
color: rgb(11, 216, 73);
|
||||
}
|
||||
.dev-warning, .outdated-warning {
|
||||
background-color: #ccb430
|
||||
}
|
||||
.table-striped tbody tr:nth-of-type(odd) {
|
||||
background-color: #080808
|
||||
}
|
||||
.table-hover tbody tr:hover {
|
||||
background-color: #3b3b3b;
|
||||
color: #bbb;
|
||||
}
|
||||
.table td, .table th {
|
||||
border-top: 1px solid #131110;
|
||||
}
|
||||
.table thead th {
|
||||
border-bottom: 2px solid #131110;
|
||||
}
|
||||
.markdown-body {
|
||||
color: rgb(184, 181, 171);
|
||||
}
|
||||
.markdown-body h1 {
|
||||
color: #bbb;
|
||||
}
|
||||
.markdown-body h2, .markdown-body h3, .markdown-body h4 {
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"0.20.4",
|
||||
"0.21.4",
|
||||
"0.22.9",
|
||||
"0.23.4"
|
||||
"0.23.9",
|
||||
"0.24.2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ The following config variables have special meanings and can be set in a variety
|
||||
| `DOKKU_EVENTS_LOGFILE` | `$DOKKU_LOGS_DIR/events.log` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Where the events log file is written to. |
|
||||
| `DOKKU_APP_NAME` | none | `--app APP` flag | Name of application to work on. Respected by core plugins. |
|
||||
| `DOKKU_APPS_FORCE_DELETE` | none | `--force` flag | Whether to force delete an application. Also used by other plugins for destructive actions. |
|
||||
| `DOKKU_CHECKS_URL` | `http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Url displayed during deployment when no CHECKS file exists. |
|
||||
| `DOKKU_CHECKS_URL` | `https://dokku.com/docs/deployment/zero-downtime-deploys/` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Url displayed during deployment when no CHECKS file exists. |
|
||||
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Whether to detach a container started via `dokku run`. |
|
||||
| `DOKKU_QUIET_OUTPUT` | none | `--quiet` flag | Silences certain header output for `dokku` commands. |
|
||||
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> `--rm-container` flag <br /> `--rm` flag | Whether to keep `dokku run` containers around or not. |
|
||||
|
||||
@@ -63,7 +63,7 @@ Beware that if you enable the header and a subsequent deploy of your application
|
||||
|
||||
#### Globally disabling the HSTS Header
|
||||
|
||||
HSTS Header can be disabled for all apps by setting the `hsts` property to false after passing the `--global` flag to `nginx:set`. Changing this value globally or on a per-app basis will require rebuilding the nginx config via the `nginx:build-config` command.
|
||||
HSTS Header can be disabled for all apps by setting the `hsts` property to false after passing the `--global` flag to `nginx:set`. Changing this value globally or on a per-app basis will require rebuilding the nginx config via the `proxy:build-config` command.
|
||||
|
||||
```shell
|
||||
dokku nginx:set --global hsts false
|
||||
@@ -372,12 +372,12 @@ See the [ssl documentation](/docs/configuration/ssl.md) for more information on
|
||||
|
||||
### Disabling Nginx
|
||||
|
||||
See the [proxy documentation](/docs/advanced-usage/proxy-management.md) for more information on how to disable nginx as the proxy implementation for your app.
|
||||
See the [proxy documentation](/docs/networking/proxy-management.md) for more information on how to disable nginx as the proxy implementation for your app.
|
||||
|
||||
### Managing Proxy Port mappings
|
||||
|
||||
See the [proxy documentation](/docs/advanced-usage/proxy-management.md#proxy-port-mapping) for more information on how to manage ports proxied for your app.
|
||||
See the [proxy documentation](/docs/networking/proxy-management.md#proxy-port-mapping) for more information on how to manage ports proxied for your app.
|
||||
|
||||
### Regenerating nginx config
|
||||
|
||||
See the [proxy documentation](/docs/advanced-usage/proxy-management.md#regenerating-proxy-config) for more information on how to rebuild the nginx proxy configuration for your app.
|
||||
See the [proxy documentation](/docs/networking/proxy-management.md#regenerating-proxy-config) for more information on how to rebuild the nginx proxy configuration for your app.
|
||||
|
||||
@@ -18,7 +18,7 @@ certs:update <app> CRT KEY # Update an SSL Endpoint on an app. Can
|
||||
dokku nginx:import-ssl <app> < certs.tar
|
||||
```
|
||||
|
||||
> Adding an ssl certificate before deploying an application will result in port mappings being updated. This may cause issues for applications that use non-standard ports, as those may not be automatically detected. Please refer to the [proxy documentation](/docs/advanced-usage/proxy-management.md) for information as to how to reconfigure the mappings.
|
||||
> Adding an ssl certificate before deploying an application will result in port mappings being updated. This may cause issues for applications that use non-standard ports, as those may not be automatically detected. Please refer to the [proxy documentation](/docs/networking/proxy-management.md) for information as to how to reconfigure the mappings.
|
||||
|
||||
## Per-application certificate management
|
||||
|
||||
@@ -150,6 +150,19 @@ Only use this option if:
|
||||
|
||||
If it's possible to make HTTP(S) requests directly to Nginx, bypassing the load balancer, or if the load balancer is not configured to set these headers, then it becomes possible for a client to set these headers to arbitrary values.
|
||||
|
||||
The `x-forwarded-ssl` property may also be set for application frameworks that require this value. Note that this is a non-standard version of setting `x-forwarded-proto` to `https`, and should only be done as a last resort.
|
||||
|
||||
```shell
|
||||
# force-setting value to `on`
|
||||
dokku nginx:set node-js-app x-forwarded-ssl on
|
||||
|
||||
# force-setting value to `off`
|
||||
dokku nginx:set node-js-app x-forwarded-ssl on
|
||||
|
||||
# removing the value from nginx.conf (default)
|
||||
dokku nginx:set node-js-app x-forwarded-ssl
|
||||
```
|
||||
|
||||
### SSL Port Exposure
|
||||
|
||||
When your app is served from port `80` then the `/home/dokku/APP/nginx.conf` file will automatically be updated to instruct nginx to respond to ssl on port 443 as a new cert is added. If your app uses a non-standard port (perhaps you have a dockerfile deploy exposing port `99999`) you may need to manually expose an ssl port via `dokku proxy:ports-add <APP> https:443:99999`.
|
||||
|
||||
@@ -102,9 +102,9 @@ Once the deploy is complete, the application's web URL will be generated as abov
|
||||
|
||||
Dokku supports deploying applications in a few ways:
|
||||
|
||||
- [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) via [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks): See the [herokuish buildpacks documentation](/docs/deployment/methods/herokuish-buildpacks.md) to learn about the different ways to specify a buildpack.
|
||||
- [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) via [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks): See the [herokuish buildpacks documentation](/docs/deployment/builders/herokuish-buildpacks.md) to learn about the different ways to specify a buildpack.
|
||||
- This is the default method used by Dokku.
|
||||
- [Dockerfile](https://docs.docker.com/reference/builder/): See the [dockerfile documentation](/docs/deployment/methods/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
|
||||
- [Dockerfile](https://docs.docker.com/reference/builder/): See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
|
||||
- [Docker Image](https://docs.docker.com/get-started/overview/#docker-objects): See the [docker image documentation](/docs/deployment/methods/images.md) to learn about how to deploy a Docker Image.
|
||||
|
||||
### Skipping deployment
|
||||
@@ -125,7 +125,7 @@ If you need to redeploy or restart your app:
|
||||
dokku ps:rebuild ruby-getting-started
|
||||
```
|
||||
|
||||
See the [process scaling documentation](/docs/deployment/process-management.md) for more information on how to manage your app processes.
|
||||
See the [process scaling documentation](/docs/processes/process-management.md) for more information on how to manage your app processes.
|
||||
|
||||
### Deploying with private Git submodules
|
||||
|
||||
@@ -205,7 +205,7 @@ See the [Git documentation](/docs/deployment/methods/git.md#changing-the-deploy-
|
||||
|
||||
## Dockerfile deployment
|
||||
|
||||
See the [Dockerfile documentation](/docs/deployment/methods/dockerfiles.md) for information Dokku's Dockerfile support.
|
||||
See the [Dockerfile documentation](/docs/deployment/builders/dockerfiles.md) for information Dokku's Dockerfile support.
|
||||
|
||||
## Image tagging
|
||||
|
||||
@@ -213,7 +213,7 @@ See the [image tagging documentation](/docs/deployment/methods/images.md) for mo
|
||||
|
||||
## Specifying a custom buildpack
|
||||
|
||||
See the [herokuish buildpack documentation](/docs/deployment/methods/herokuish-buildpacks.md) for more information on how to specify a set of custom buildpacks for your application.
|
||||
See the [herokuish buildpack documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how to specify a set of custom buildpacks for your application.
|
||||
|
||||
## Removing a deployed app
|
||||
|
||||
|
||||
108
docs/deployment/builders/builder-management.md
Normal file
108
docs/deployment/builders/builder-management.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# Builder Management
|
||||
|
||||
> New as of 0.24.0
|
||||
|
||||
```
|
||||
builder:report [<app>] [<flag>] # Displays a builder report for one or more apps
|
||||
builder:set <app> <key> (<value>) # Set or clear a builder property for an app
|
||||
```
|
||||
|
||||
Builders are a way of customizing how an app is built from a source, allowing users flexibility in how artifacts are created for later scheduling.
|
||||
|
||||
## Usage
|
||||
|
||||
### Builder selection
|
||||
|
||||
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-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.
|
||||
|
||||
### Overriding the auto-selected builder
|
||||
|
||||
If desired, the builder can be specified via the `builder:set` command by speifying a value for `selected`. The selected builder will always be used.
|
||||
|
||||
```shell
|
||||
dokku builder:set node-js-app selected dockerfile
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku builder: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 builder:set --global selected herokuish
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku builder:set --global selected
|
||||
```
|
||||
|
||||
### Displaying builder reports for an app
|
||||
|
||||
You can get a report about the app's builder status using the `builder:report` command:
|
||||
|
||||
```shell
|
||||
dokku builder:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app builder information
|
||||
Builder computed selected: herokuish
|
||||
Builder global selected: herokuish
|
||||
Builder selected: herokuish
|
||||
=====> python-sample builder information
|
||||
Builder computed selected: dockerfile
|
||||
Builder global selected: herokuish
|
||||
Builder selected: dockerfile
|
||||
=====> ruby-sample builder information
|
||||
Builder computed selected: herokuish
|
||||
Builder global selected: herokuish
|
||||
Builder selected:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku builder:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app builder information
|
||||
Builder selected: herokuish
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku builder:report node-js-app --builder-selected
|
||||
```
|
||||
|
||||
### Custom builders
|
||||
|
||||
To create a custom builder, the following triggers must be implemented:
|
||||
|
||||
- `builder-build`:
|
||||
- arguments: `BUILDER_TYPE` `APP` `SOURCECODE_WORK_DIR`
|
||||
- description: Creates a docker image named with the output of `common#get_app_image_name $APP`.
|
||||
- `builder-detect`:
|
||||
- arguments: `APP` `SOURCECODE_WORK_DIR`
|
||||
- description: Outputs the name of the builder (without the `builder-` prefix) to use to build the app.
|
||||
- `builder-release`:
|
||||
- arguments: `BUILDER_TYPE` `APP` `IMAGE_AG`
|
||||
- description: A post-build, pre-release trigger that can be used to post-process the image. Usually simply tags and labels the image appropriately.
|
||||
|
||||
Custom plugins names _must_ have the prefix `builder-` or builder overriding via `builder:set` may not function as expected.
|
||||
|
||||
Builders can use any tools available on the system to build the docker image, and may even be used to schedule building off-server. The only current requirement is that the image must exist on the server at the end of the `builder-build` command, though this requirement may be relaxed in a future release.
|
||||
|
||||
For a simple example of how to implement this trigger, see `builder-pack`, which utilizes a cli tool - `pack-cli` - to generate an OCI image that is compatible with Docker and can be scheduled by the official scheduling plugins.
|
||||
@@ -5,23 +5,39 @@
|
||||
```
|
||||
buildpacks:set-property [--global|<app>] <key> <value> # Set or clear a buildpacks property for an app
|
||||
```
|
||||
Cloud Native Buildpacks are an evolution over the Buildpacks technology provided by the Herokuish builder. See the [herokuish buildpacks documentation](/docs/deployment/methods/herokuish-buildpacks.md) for more information on how to clear buildpack build cache for an application.
|
||||
|
||||
Cloud Native Buildpacks are an evolution over the Buildpacks technology provided by the Herokuish builder. See the [herokuish buildpacks documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how to clear buildpack build cache for an application.
|
||||
|
||||
> Warning: This functionality uses the `pack` cli from the [Cloud Native Buildpacks](https://buildpacks.io) project to build apps. As the integration is experimental in Dokku, it is likely to change over time.
|
||||
|
||||
## Usage
|
||||
|
||||
To use this builder instead of either `Dockerfile` or `herokuish`, you must set the `DOKKU_CNB_EXPERIMENTAL` environment variable for your app to `1`.
|
||||
### Detection
|
||||
|
||||
This builder will be auto-detected in either the following cases:
|
||||
|
||||
- The `DOKKU_CNB_EXPERIMENTAL` app environment variable is set to `1`.
|
||||
```shell
|
||||
dokku config:set --no-restart node-js-app DOKKU_CNB_EXPERIMENTAL=1
|
||||
```
|
||||
- A `.project.toml` file exists in the root of the app repository.
|
||||
- This file is consumed by `pack-cli` and used to describe how the app is built.
|
||||
|
||||
The builder can also be specified via the `builder:set` command:
|
||||
|
||||
```shell
|
||||
dokku config:set --no-restart node-js-app DOKKU_CNB_EXPERIMENTAL=1
|
||||
dokku builder:set node-js-app selected pack
|
||||
```
|
||||
|
||||
> Dokku will only select the `dockerfile` builder if both the `herokuish` and `pack` builders are not detected and a Dockerfile exists. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how that builder functions.
|
||||
|
||||
### Requirements
|
||||
|
||||
The `pack` cli tool is not included by default with Dokku or as a dependency. It must also be installed as shown on [this page](https://buildpacks.io/docs/tools/pack/).
|
||||
|
||||
Builds will proceed with the `pack` cli for the app from then on.
|
||||
|
||||
## Caveats
|
||||
### Caveats
|
||||
|
||||
As this functionality is highly experimental, there are a number of caveats. Please note that not all issuesare listed below.
|
||||
|
||||
@@ -6,12 +6,20 @@ While Dokku normally defaults to using [Heroku buildpacks](https://devcenter.her
|
||||
|
||||
> Dockerfile support is considered a *power user* feature. By using Dockerfile-based deployment, you agree that you will not have the same comfort as that enjoyed by buildpack users, and Dokku features may work differently. Differences between the two systems will be documented here.
|
||||
|
||||
To use a Dockerfile for deployment, commit a valid `Dockerfile` to the root of your repository and push the repository to your Dokku installation. If this file is detected, Dokku will default to using it to construct containers *except* in the following two cases:
|
||||
## Usage
|
||||
|
||||
- The application has a `BUILDPACK_URL` environment variable set via the `dokku config:set` command or in a committed `.env` file. In this case, Dokku will use your specified buildpack.
|
||||
- The application has a `.buildpacks` file in the root of the repository. In this case, Dokku will use your specified buildpack(s).
|
||||
### Detection
|
||||
|
||||
## Switching from buildpack deployments
|
||||
This builder will be auto-detected in the following case:
|
||||
|
||||
- A `Dockerfile` exists in the root of the app repository.
|
||||
|
||||
Dokku will only select the `dockerfile` builder if both the `herokuish` and `pack` builders are not detected and a Dockerfile exists. For more information on how those are detected, see the following links:
|
||||
|
||||
- [Cloud Native Buildpacks documentation](/docs/deployment/builders/cloud-native-buildpacks.md#detection)
|
||||
- [Herokuish documentation](/docs/deployment/builders/herokuish-buildpacks.md#detection)
|
||||
|
||||
### Switching from buildpack deployments
|
||||
|
||||
If an application was previously deployed via buildpacks, the following commands should be run before a Dockerfile deploy will succeed:
|
||||
|
||||
@@ -19,7 +27,7 @@ If an application was previously deployed via buildpacks, the following commands
|
||||
dokku config:unset --no-restart node-js-app DOKKU_PROXY_PORT_MAP
|
||||
```
|
||||
|
||||
## Build-time configuration variables
|
||||
### Build-time configuration variables
|
||||
|
||||
For security reasons - and as per [Docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available only during runtime.
|
||||
|
||||
@@ -65,11 +73,11 @@ ENV NODE_ENV ${NODE_ENV}
|
||||
RUN echo $NODE_ENV
|
||||
```
|
||||
|
||||
## Building images with Docker Buildkit
|
||||
### Building images with Docker Buildkit
|
||||
|
||||
If your Dockerfile is using Docker engine's [buildkit](https://docs.docker.com/develop/develop-images/build_enhancements/) (not to be confused with buildpacks), then the `DOCKER_BUILDKIT=1` environment variable needs to be set. One way to do this is to edit `/etc/environment` on your dokku host and reboot your instance. Note, for complete build log output, you should also set `BUILDKIT_PROGRESS=plain` in the same file.
|
||||
|
||||
## Customizing the run command
|
||||
### Customizing the run command
|
||||
|
||||
By default no arguments are passed to `docker run` when deploying the container and the `CMD` or `ENTRYPOINT` defined in the `Dockerfile` are executed. You can take advantage of docker ability of overriding the `CMD` or passing parameters to your `ENTRYPOINT` setting `$DOKKU_DOCKERFILE_START_CMD`. Let's say for example you are deploying a base Node.js image, with the following `ENTRYPOINT`:
|
||||
|
||||
@@ -118,6 +126,6 @@ started by running `docker run bin/run-worker.sh` (the actual `docker run` comma
|
||||
complex, but this is the basic idea). If you use an `ENTRYPOINT` in your `Dockerfile`, the lines
|
||||
in your `Procfile` will be passed as arguments to the `ENTRYPOINT` script instead of being executed.
|
||||
|
||||
## Exposed ports
|
||||
### 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.
|
||||
@@ -25,6 +25,23 @@ This page will cover usage of the `buildpacks` plugin.
|
||||
|
||||
## Usage
|
||||
|
||||
### Detection
|
||||
|
||||
This builder will be auto-detected in either the following cases:
|
||||
|
||||
- The `BUILDPACK_URL` app environment variable is set.
|
||||
- This can be done via `dokku config:set` or via a committed `.env` file in the root of the repository. See the [environment variable documentation](/docs/configuration/environment-variables.md) for more details.
|
||||
- A `.buildpacks` file exists in the root of the app repository.
|
||||
- This can be via a committed `.buildpacks` file or managed via the `buildpacks` plugin commands.
|
||||
|
||||
The builder can also be specified via the `builder:set` command:
|
||||
|
||||
```shell
|
||||
dokku builder:set node-js-app selected herokuish
|
||||
```
|
||||
|
||||
> Dokku will only select the `dockerfile` builder if both the `herokuish` and `pack` builders are not detected and a Dockerfile exists. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how that builder functions.
|
||||
|
||||
### Listing Buildpacks in Use
|
||||
|
||||
The `buildpacks:list` command can be used to show buildpacks that have been set for an app. This will omit any auto-detected buildpacks.
|
||||
@@ -225,7 +242,7 @@ dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-node
|
||||
|
||||
### Specifying commands via Procfile
|
||||
|
||||
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/docs/deployment/process-management.md) for more details around scaling individual processes.
|
||||
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/docs/processes/process-management.md) for more details around scaling individual processes.
|
||||
|
||||
A Procfile is a file named `Procfile`. It should be named `Procfile` exactly, and not anything else. For example, `Procfile.txt` is not valid. The file should be a simple text file.
|
||||
|
||||
@@ -246,7 +263,7 @@ worker: env QUEUE=* bundle exec rake resque:work
|
||||
importantworker: env QUEUE=important bundle exec rake resque:work
|
||||
```
|
||||
|
||||
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/docs/deployment/process-management.md) for more details around scaling individual processes.
|
||||
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/docs/processes/process-management.md) for more details around scaling individual processes.
|
||||
|
||||
|
||||
### `curl` build timeouts
|
||||
@@ -134,7 +134,7 @@ Vector uses the concept of log "sinks" to send logs to a given endpoint. Log sin
|
||||
```shell
|
||||
# setting the sink value in quotes is encouraged to avoid
|
||||
# issues with ampersand encoding in shell commands
|
||||
dokku logs:set node-js-app sink "console://?encoding[codec]=json"
|
||||
dokku logs:set node-js-app vector-sink "console://?encoding[codec]=json"
|
||||
```
|
||||
|
||||
A sink may be removed by setting an empty value, which will also reload the running vector container.
|
||||
|
||||
@@ -3,22 +3,28 @@
|
||||
> Subcommands new as of 0.12.0
|
||||
|
||||
```
|
||||
git:allow-host <host> # Adds a host to known_hosts
|
||||
git:allow-host <host> # Adds a host to known_hosts
|
||||
git:auth <host> [<username> <password>] # Configures netrc authentication for a given git server
|
||||
git:from-archive [--archive-type ARCHIVE_TYPE] <app> <archive-url> [<git-username> <git-email>] # Updates an app's git repository with a given archive file
|
||||
git:from-image [--build-dir DIRECTORY] <app> <docker-image> [<git-username> <git-email>] # Updates an app's git repository with a given docker image
|
||||
git:sync [--build] <app> <repository> [<git-ref>] # Clone or fetch an app from remote git repo
|
||||
git:initialize <app> # Initialize a git repository for an app
|
||||
git:public-key # Outputs the dokku public deploy key
|
||||
git:report [<app>] [<flag>] # Displays a git report for one or more apps
|
||||
git:set <app> <key> (<value>) # Set or clear a git property for an app
|
||||
git:initialize <app> # Initialize a git repository for an app
|
||||
git:public-key # Outputs the dokku public deploy key
|
||||
git:report [<app>] [<flag>] # Displays a git report for one or more apps
|
||||
git:set <app> <key> (<value>) # Set or clear a git property for an app
|
||||
git:unlock <app> [--force] # Removes previous git clone folder for new deployment
|
||||
```
|
||||
|
||||
Git-based deployment has been the traditional method of deploying applications in Dokku. As of v0.12.0, Dokku introduces a few ways to customize the experience of deploying via `git push`. A Git-based deployment currently supports building applications via:
|
||||
|
||||
- [Cloud Native Buildpacks](/docs/deployment/methods/cloud-native-buildpacks.md)
|
||||
- [Herokuish Buildpack](/docs/deployment/methods/herokuish-buildpacks.md)
|
||||
- [Dockerfiles](/docs/deployment/methods/dockerfiles.md)
|
||||
- [Cloud Native Buildpacks](/docs/deployment/builders/cloud-native-buildpacks.md)
|
||||
- [Herokuish Buildpack](/docs/deployment/builders/herokuish-buildpacks.md)
|
||||
- [Dockerfiles](/docs/deployment/builders/dockerfiles.md)
|
||||
|
||||
## Usage
|
||||
|
||||
> Warning: Pushing from a shallow clone is not currently supported and may have undefined behavior. Please unshallow your local repository before pushing to a Dokku app to avoid potential errors in the deployment process.
|
||||
|
||||
### Initializing an application
|
||||
|
||||
When an application is created via `git push`, Dokku will create the proper `pre-receive` hook in order to execute the build pipeline. In certain cases - such as when fronting deploys with the [`git-http-backend`](https://git-scm.com/docs/git-http-backend) - this may not be correctly created. As an alternative, the `git:initialize` command can be used to trigger this creation:
|
||||
@@ -58,6 +64,8 @@ dokku git:set --global deploy-branch SOME_BRANCH_NAME
|
||||
dokku git:set node-js-app deploy-branch SOME_BRANCH_NAME
|
||||
```
|
||||
|
||||
As of 0.22.1, Dokku will also respect the first pushed branch as the primary branch, and automatically set the `deploy-branch` value at that time.
|
||||
|
||||
Pushing multiple branches can also be supported by creating a [receive-branch](/docs/development/plugin-triggers.md#receive-branch) plugin trigger in a custom plugin.
|
||||
|
||||
### Configuring the `GIT_REV` environment variable
|
||||
@@ -109,12 +117,80 @@ dokku git:set node-js-app keep-git-dir false
|
||||
dokku git:set node-js-app keep-git-dir ""
|
||||
```
|
||||
|
||||
Please keep in mind that setting `keep-git-dir` to `true` may result in unstaged changes shown within the built container due to the build process generating application changes within the built app directory.
|
||||
|
||||
### Initializing an app repository from a docker image
|
||||
|
||||
> New as of 0.24.0
|
||||
|
||||
A Dokku app repository can be initialized or updated from a Docker image via the `git:from-image` command. This command will either initialize the app repository or update it to include the specified Docker image via a `FROM` stanza. This is an excellent way of tracking changes when deploying only a given docker image, especially if deploying an image from a remote CI/CD pipeline.
|
||||
|
||||
```shell
|
||||
dokku git:from-image node-js-app dokku/node-js-getting-started:latest
|
||||
```
|
||||
|
||||
In the above example, Dokku will build the app as if the repository contained _only_ a `Dockerfile` with the following content:
|
||||
|
||||
```Dockerfile
|
||||
FROM dokku/node-js-getting-started:latest
|
||||
```
|
||||
|
||||
Triggering a build with the same arguments multiple times will result in Dokku exiting `0` early as there will be no changes detected.
|
||||
|
||||
The `git:from-image` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
|
||||
|
||||
```shell
|
||||
dokku git:from-image node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
|
||||
```
|
||||
|
||||
Finally, certain images may require a custom build context in order for `ONBUILD ADD` and `ONBUILD COPY` statements to succeed. A custom build context can be specified via the `--build-dir` flag. All files in the specified `build-dir` will be copied into the repository for use within the `docker build` process. The build context _must_ be specified on each deploy, and is not otherwise persisted between builds.
|
||||
|
||||
```shell
|
||||
dokku git:from-image --build-dir path/to/build node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
|
||||
```
|
||||
|
||||
See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
|
||||
|
||||
### Initializing an app repository from an archive file
|
||||
|
||||
> New as of 0.24.0
|
||||
|
||||
A Dokku app repository can be initialized or updated from the contents of an archive file via the `git:from-archive` command. This is an excellent way of tracking changes when deploying pre-built binary archives, such as java jars or go binaries. This can also be useful when deploying directly from a Github repository at a specific commit.
|
||||
|
||||
```shell
|
||||
dokku git:from-archive node-js-app https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar
|
||||
```
|
||||
|
||||
In the above example, Dokku will build the app as if the repository contained the extracted contents of the specified archive file.
|
||||
|
||||
Triggering a build with the same archive file multiple times will result in Dokku exiting `0` early as there will be no changes detected.
|
||||
|
||||
The `git:from-archive` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
|
||||
|
||||
```shell
|
||||
dokku git:from-archive node-js-app https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar "Camila" "camila@example.com"
|
||||
```
|
||||
|
||||
The default archive type is always set to `.tar`. To use a different archive type, specify the `--archive-type` flag. Failure to do so will result in a failure to extract the archive.
|
||||
|
||||
```shell
|
||||
dokku git:from-archive --archive-type zip node-js-app https://github.com/dokku/smoke-test-app/archive/2.0.0.zip "Camila" "camila@example.com"
|
||||
```
|
||||
|
||||
Finally, if the archive url is specified as `--`, the archive will be fetched from stdin.
|
||||
|
||||
```shell
|
||||
curl -sSL https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar | dokku git:from-archive node-js-app --
|
||||
```
|
||||
|
||||
### Initializing an app repository from a remote repository
|
||||
|
||||
> The application must exist before the repository can be initialized
|
||||
> New as of 0.23.0
|
||||
|
||||
A Dokku app repository can be initialized or updated from a remote git repository via the `git:sync` command. This command will either clone or fetch updates from a remote repository and has undefined behavior if the history cannot be fast-fowarded to the referenced repository reference. Any repository that can be cloned by the `dokku` user can be specified.
|
||||
|
||||
> The application must exist before the repository can be initialized
|
||||
|
||||
```shell
|
||||
dokku git:sync node-js-app https://github.com/heroku/node-js-getting-started.git
|
||||
```
|
||||
@@ -138,6 +214,27 @@ By default, this command does not trigger an application build. To do so during
|
||||
dokku git:sync --build node-js-app https://github.com/heroku/node-js-getting-started.git
|
||||
```
|
||||
|
||||
### Initializing from private repositories
|
||||
|
||||
> New as of 0.24.0
|
||||
|
||||
Initializing from a private repository requires one of the following:
|
||||
|
||||
- A Public SSH Key (`id_rsa.pub` file) configured on the remote server, with the associated private key (`id_rsa`) in the Dokku server's `/home/dokku/.ssh/` directory.
|
||||
- A configured [`.netrc`](https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html) entry.
|
||||
|
||||
Dokku provides the `git:auth` command which can be used to configure a `netrc` entry for the remote server. This command can be used to add or remove configuration for any remote server.
|
||||
|
||||
```shell
|
||||
# add credentials for github.com
|
||||
dokku git:auth github.com username personal-access-token
|
||||
|
||||
# remove credentials for github.com
|
||||
dokku git:auth github.com
|
||||
```
|
||||
|
||||
For syncing to a private repository stored on a remote Git product such as Github or Gitlab, Dokku's recommendation is to use a personal access token on a bot user where possible. Please see your service's documentation for information regarding the recommended best practices.
|
||||
|
||||
### Allowing remote repository hosts
|
||||
|
||||
By default, the Dokku host may not have access to a server containing the remote repository. This can be initialized via the `git:allow-host` command.
|
||||
@@ -155,3 +252,5 @@ In order to clone a remote repository, the remote server should have the Dokku h
|
||||
```shell
|
||||
dokku git:public-key
|
||||
```
|
||||
|
||||
If there is no key, an error message is shown that displays the command that can be run on the Dokku server to generate a new public/private ssh key pair.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# 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
|
||||
|
||||
```
|
||||
@@ -78,7 +80,7 @@ dokku tags:deploy 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 http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ for examples
|
||||
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!
|
||||
@@ -168,4 +170,4 @@ ssh my.dokku.host "dokku tags:create test-app previous; dokku tags:deploy test-a
|
||||
## 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/advanced-usage/proxy-management.md)
|
||||
- [Setting up the ports](/docs/networking/proxy-management.md)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# 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-arhive`.
|
||||
>
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
|
||||
@@ -217,19 +217,19 @@ dokku checks:run APP
|
||||
-----> Running pre-flight checks
|
||||
-----> Running checks for app (APP.web.1)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
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!
|
||||
-----> Running checks for app (APP.web.2)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
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!
|
||||
-----> Running checks for app (APP.worker.1)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
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!
|
||||
@@ -245,7 +245,7 @@ dokku checks:run node-js-app worker
|
||||
-----> Running pre-flight checks
|
||||
-----> Running checks for app (APP.worker.1)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
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!
|
||||
@@ -261,7 +261,7 @@ dokku checks:run node-js-app web.2
|
||||
-----> Running pre-flight checks
|
||||
-----> Running checks for app (APP.web.2)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
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!
|
||||
|
||||
@@ -143,6 +143,24 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `builder-detect`
|
||||
|
||||
- Description: Allows overriding the auto-detected `herokuish` builder in favor of a custom one. Dockerfile gets lowest builder precedence.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; SOURCECODE_WORK_DIR="$2"
|
||||
|
||||
if [[ -f "$SOURCECODE_WORK_DIR/project.toml" ]]; then
|
||||
echo -n "pack"
|
||||
fi
|
||||
```
|
||||
|
||||
### `builder-create-dokku-image`
|
||||
|
||||
- Description: Allows modification of the configured dokku-image
|
||||
@@ -1075,12 +1093,12 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-build-cnb`
|
||||
### `post-build-pack`
|
||||
|
||||
> Warning: The cnb plugin trigger apis are under development and may change
|
||||
> Warning: The pack plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using cnb.
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using pack.
|
||||
- Invoked by: `internal function dokku_build() (build phase)`
|
||||
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
||||
- Example:
|
||||
@@ -1266,7 +1284,7 @@ REV="$3" # optional, may not be sent for tar-based builds
|
||||
pushd "$TMP_WORK_DIR" >/dev/null
|
||||
touch Procfile
|
||||
echo "clock: some-command" >> Procfile
|
||||
popd >/dev/null
|
||||
popd &>/dev/null
|
||||
```
|
||||
|
||||
### `post-proxy-ports-update`
|
||||
@@ -1308,14 +1326,14 @@ APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-release-cnb`
|
||||
### `post-release-pack`
|
||||
|
||||
> Warning: The cnb plugin trigger apis are under development and may change
|
||||
> Warning: The pack plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using cnb.
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using pack.
|
||||
- Invoked by: `internal function dokku_release() (release phase)`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
@@ -1382,12 +1400,12 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `pre-build-cnb`
|
||||
### `pre-build-pack`
|
||||
|
||||
> Warning: The cnb plugin trigger apis are under development and may change
|
||||
> Warning: The pack plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to apps using cnb.
|
||||
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to apps using pack.
|
||||
- Invoked by: `internal function dokku_build() (build phase)`
|
||||
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
||||
- Example:
|
||||
@@ -1539,12 +1557,12 @@ docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
|
||||
```
|
||||
|
||||
|
||||
### `pre-release-cnb`
|
||||
### `pre-release-pack`
|
||||
|
||||
> Warning: The cnb plugin trigger apis are under development and may change
|
||||
> Warning: The pack plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to apps using cnb.
|
||||
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to apps using pack.
|
||||
- Invoked by: `internal function dokku_release() (release phase)`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
@@ -29,7 +29,7 @@ The workflow looks like this:
|
||||
```shell
|
||||
# having dokku-arch in ../dokku-arch
|
||||
vagrant up build-arch
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.23.4-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.24.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.23.4
|
||||
docker pull dokku/dokku:0.24.2
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
|
||||
```shell
|
||||
docker run \
|
||||
docker container run \
|
||||
--env DOKKU_HOSTNAME=dokku.me \
|
||||
--name dokku \
|
||||
--publish 3022:22 \
|
||||
@@ -17,7 +17,7 @@ docker run \
|
||||
--publish 8443:443 \
|
||||
--volume /var/lib/dokku:/mnt/dokku \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
dokku/dokku:0.23.4
|
||||
dokku/dokku:0.24.2
|
||||
```
|
||||
|
||||
Dokku is run in the following configuration:
|
||||
@@ -31,7 +31,11 @@ Dokku is run in the following configuration:
|
||||
- The docker socket is mounted into container
|
||||
- The "web installer" is not supported.
|
||||
|
||||
Application repositories, plugin config, and plugin data is persisted to disk within the specified host directory for `/var/lib/dokku`.
|
||||
Application repositories, plugin config, as well as plugin data are persisted to disk within the specified host directory for `/var/lib/dokku`.
|
||||
|
||||
Other docker container options can also be used when running Dokku, though the specific outcome will depend upon the specified options. For example, the Dokku container's nginx port can be bound to a specific host ip by specifying `--publish $HOST_IP:8080:80`, where `$HOST_IP` is the IP desired. Please see the [docker container run documentation](https://docs.docker.com/engine/reference/commandline/run/) for further explanation for various docker arguments.
|
||||
|
||||
## Plugin Installation
|
||||
|
||||
To install custom plugins, create a `plugin-list` file in the host's `/var/lib/dokku` directory. The plugins listed herein will be automatically installed by Dokku on container boot. This file should be the following format:
|
||||
|
||||
@@ -46,6 +50,8 @@ postgres: https://github.com/dokku/dokku-postgres.git
|
||||
redis: https://github.com/dokku/dokku-redis.git
|
||||
```
|
||||
|
||||
## SSH Key Management
|
||||
|
||||
To initialize ssh-keys within the container, use `docker exec` to enter the container and run the appropriate ssh-keys commands.
|
||||
|
||||
```shell
|
||||
@@ -53,3 +59,15 @@ docker exec -it dokku bash
|
||||
```
|
||||
|
||||
Please see the [user management documentation](/docs/deployment/user-management.md) for more information.
|
||||
|
||||
## Pushing Applications
|
||||
|
||||
When exposing the Dokku container's SSH port (22) on 3022, something similar to the following will need to be setup within the user's `~/.ssh/config`:
|
||||
|
||||
```
|
||||
Host dokku.docker
|
||||
HostName 127.0.0.1
|
||||
Port 3022
|
||||
```
|
||||
|
||||
In the above example, the hostname `127.0.0.1` is being aliased to `dokku.docker`, while the port is being overriden to `3022`. All SSH commands - including git pushes - for the hostname `dokku.docker` will be transparently sent to `127.0.0.1:3022`.
|
||||
|
||||
@@ -21,8 +21,8 @@ To install the latest stable version of Dokku, you can run the following shell c
|
||||
|
||||
```shell
|
||||
# for debian systems, installs Dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.23.4/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.23.4 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.2/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.24.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -235,4 +235,4 @@ This isn't usually an issue with Dokku, but rather an app config problem. This c
|
||||
|
||||
In Rails at least, if your `application.rb` or `environmnents/production.rb` include the line `configure.force_ssl = true` which includes HSTS, try commenting that out and redeploying.
|
||||
|
||||
If this solves the issue temporarily, longer term you should consider [configuring SSL](http://dokku.viewdocs.io/dokku/configuration/ssl/).
|
||||
If this solves the issue temporarily, longer term you should consider [configuring SSL](/docs/configuration/ssl.md).
|
||||
|
||||
@@ -19,6 +19,7 @@ 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.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)
|
||||
- [Upgrading to 0.21](/docs/appendices/0.21.0-migration-guide.md)
|
||||
|
||||
@@ -4,7 +4,7 @@ If you’re stuck, there are a number of places you can get help:
|
||||
|
||||
## The Official Dokku Website
|
||||
|
||||
- [http://dokku.viewdocs.io/dokku/](/docs/)
|
||||
- [https://dokku.com/docs/](/docs/)
|
||||
|
||||
The Official Dokku website is always a great place to visit. It features links to oft-used developer tools, community plugins, and guides on using Dokku.
|
||||
|
||||
|
||||
@@ -10,61 +10,32 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.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.23.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.23.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.23.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.23.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.23.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.23.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.23.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.23.4/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.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.23.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
.sponsors {
|
||||
background-color: #272822;
|
||||
color: #FCFCFC;
|
||||
}
|
||||
.sponsors a {
|
||||
color: #f0ad4e;
|
||||
}
|
||||
.sponsors .backer img,
|
||||
.sponsors .sponsor img {
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
border: 8px solid gray;
|
||||
margin: 20px auto 20px auto;
|
||||
max-width: 192px;
|
||||
}
|
||||
.sponsors .backer img {
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
border: 0;
|
||||
}
|
||||
.sponsors img:hover {
|
||||
-moz-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
-webkit-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
box-shadow: 0px 0px 32px 0px rgba(0,0,0,0.75);
|
||||
}
|
||||
.sponsors .fund-link {
|
||||
display: block;
|
||||
font-size: .8em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -130,12 +101,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.23.4/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.24.2/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.23.4 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.24.2 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
@@ -215,7 +186,7 @@
|
||||
</div>
|
||||
|
||||
<div class="alternate-instructions">
|
||||
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://marketplace.digitalocean.com/apps/dokku?refcode=fe06b043a083 target="_blank">DigitalOcean</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/dreamhost/">DreamHost Cloud</a> instructions.</p>
|
||||
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://marketplace.digitalocean.com/apps/dokku?refcode=fe06b043a083" target="_blank">DigitalOcean</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/dreamhost/">DreamHost Cloud</a> instructions.</p>
|
||||
<p>Still no love? <a href="https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md" target="_blank">Contributions welcome</a>!</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -136,7 +136,7 @@ For buildpack deployments, your application *must* respect the `PORT` environmen
|
||||
|
||||
> Changed as of 0.5.0
|
||||
|
||||
Dokku's default proxy implementation - nginx - supports HTTP and GRPC request proxying. At this time, we do not support proxying plain TCP or UDP ports. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/advanced-usage/proxy-management.md).
|
||||
Dokku's default proxy implementation - nginx - supports HTTP and GRPC request proxying. At this time, we do not support proxying plain TCP or UDP ports. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/networking/proxy-management.md).
|
||||
|
||||
#### Applications using EXPOSE
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
> New as of 0.5.0, Enhanced in 0.6.0
|
||||
|
||||
```
|
||||
proxy:build-config <app> # (Re)builds config for given app
|
||||
proxy:disable <app> # Disable proxy for app
|
||||
proxy:enable <app> # Enable proxy for app
|
||||
proxy:report [<app>] [<flag>] # Displays a proxy report for one or more apps
|
||||
proxy:set <app> <proxy-type> # Set proxy type for app
|
||||
proxy:build-config [--parallel count] [--all|<app>] # (Re)builds config for given app
|
||||
proxy:disable [--parallel count] [--all|<app>] # Disable proxy for app
|
||||
proxy:enable [--parallel count] [--all|<app>] # Enable proxy for app
|
||||
proxy:report [<app>] [<flag>] # Displays a proxy report for one or more apps
|
||||
proxy:set <app> <proxy-type> # Set proxy type for app
|
||||
```
|
||||
|
||||
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
|
||||
@@ -22,11 +22,23 @@ In certain cases, your app proxy configs may drift from the correct config for y
|
||||
dokku proxy:build-config node-js-app
|
||||
```
|
||||
|
||||
### Container network interface binding
|
||||
All apps may have their proxy config rebuilt by using the `--all` flag.
|
||||
|
||||
> Changed as of 0.11.0
|
||||
```shell
|
||||
dokku proxy:build-config --all
|
||||
```
|
||||
|
||||
From Dokku versions `0.5.0` until `0.11.0`, enabling or disabling an application's proxy would **also** control whether or not the application was bound to all interfaces - e.g. `0.0.0.0`. As of `0.11.0`, this is now controlled by the network plugin. Please see the [network documentation](/docs/networking/network.md#container-network-interface-binding) for more information.
|
||||
By default, rebuilding proxy configs for all apps happens serially. The parallelism may be controlled by the `--parallel` flag.
|
||||
|
||||
```shell
|
||||
dokku proxy:build-config --all --parallel 2
|
||||
```
|
||||
|
||||
Finally, the number of parallel workers may be automatically set to the number of CPUs available by setting the `--parallel` flag to `-1`
|
||||
|
||||
```shell
|
||||
dokku proxy:build-config --all --parallel -1
|
||||
```
|
||||
|
||||
### Displaying proxy reports for an app
|
||||
|
||||
@@ -94,3 +106,9 @@ dokku proxy:set node-js-app nginx
|
||||
### Proxy port mapping
|
||||
|
||||
See the [port management documentation](/docs/networking/port-management.md) for more information on how port mappings are managed for an application.
|
||||
|
||||
### Container network interface binding
|
||||
|
||||
> Changed as of 0.11.0
|
||||
|
||||
From Dokku versions `0.5.0` until `0.11.0`, enabling or disabling an application's proxy would **also** control whether or not the application was bound to all interfaces - e.g. `0.0.0.0`. As of `0.11.0`, this is now controlled by the network plugin. Please see the [network documentation](/docs/networking/network.md#container-network-interface-binding) for more information.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Process and Container Management
|
||||
# Process Management
|
||||
|
||||
> New as of 0.3.14, Enhanced in 0.7.0
|
||||
|
||||
|
||||
@@ -7,28 +7,28 @@
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
<title>Dokku - {{DOC_TITLE}}</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.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.23.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.23.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.23.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.23.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.23.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.23.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.23.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.23.4/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.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.23.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -42,19 +42,10 @@
|
||||
</script>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.23.4/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
}
|
||||
.list-group-item {
|
||||
font-size: 14px;
|
||||
}
|
||||
.markdown-body {
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -127,11 +118,14 @@
|
||||
<a href="/{{NAME}}/deployment/user-management/" class="list-group-item">User Management</a>
|
||||
<a href="/{{NAME}}/deployment/zero-downtime-deploys/" class="list-group-item">Zero Downtime Deploy Checks</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Deployment Methods</a>
|
||||
<a href="#" class="list-group-item disabled">Builders</a>
|
||||
|
||||
<a href="/{{NAME}}/deployment/methods/cloud-native-buildpacks/" class="list-group-item">Cloud Native Buildpacks</a>
|
||||
<a href="/{{NAME}}/deployment/methods/herokuish-buildpacks/" class="list-group-item">Herokuish Buildpacks</a>
|
||||
<a href="/{{NAME}}/deployment/methods/dockerfiles/" class="list-group-item">Dockerfile Deployment</a>
|
||||
<a href="/{{NAME}}/deployment/builders/builder-management/" class="list-group-item">Builder Management</a>
|
||||
<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="#" 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>
|
||||
@@ -143,11 +137,11 @@
|
||||
<a href="/{{NAME}}/configuration/nginx/" class="list-group-item">Nginx Configuration</a>
|
||||
<a href="/{{NAME}}/configuration/ssl/" class="list-group-item">SSL Configuration</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Process Management</a>
|
||||
<a href="#" class="list-group-item disabled">Interacting with Processes</a>
|
||||
|
||||
<a href="/{{NAME}}/processes/entering-containers/" class="list-group-item">Entering Containers</a>
|
||||
<a href="/{{NAME}}/processes/one-off-tasks/" class="list-group-item">One-Off Tasks</a>
|
||||
<a href="/{{NAME}}/processes/process-management/" class="list-group-item">Process Scaling</a>
|
||||
<a href="/{{NAME}}/processes/process-management/" class="list-group-item">Process Management</a>
|
||||
<a href="/{{NAME}}/processes/scheduled-cron-tasks/" class="list-group-item">Scheduled Cron Tasks</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Network Management</a>
|
||||
@@ -217,8 +211,6 @@
|
||||
</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
|
||||
Free document hosting provided by <a href="http://progrium.viewdocs.io/viewdocs/">Viewdocs</a>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,9 +13,14 @@
|
||||
"deployment/process-management": "processes/process-management/",
|
||||
"deployment/one-off-processes": "processes/one-off-tasks/",
|
||||
|
||||
"deployment/buildpacks": "deployment/methods/herokuish-buildpacks/",
|
||||
"deployment/methods/buildpacks": "deployment/methods/herokuish-buildpacks/",
|
||||
"deployment/dockerfiles": "deployment/methods/dockerfiles/",
|
||||
"deployment/buildpacks": "deployment/builders/herokuish-buildpacks/",
|
||||
"deployment/methods/buildpacks": "deployment/builders/herokuish-buildpacks/",
|
||||
"deployment/dockerfiles": "deployment/builders/dockerfiles/",
|
||||
|
||||
"deployment/methods/cloud-native-buildpacks": "deployment/builders/cloud-native-buildpacks/",
|
||||
"deployment/methods/dockerfiles": "deployment/builders/dockerfiles/",
|
||||
"deployment/methods/herokuish-buildpacks": "deployment/builders/herokuish-buildpacks/",
|
||||
|
||||
"deployment/images": "deployment/methods/images/",
|
||||
"configuration-management": "configuration/environment-variables/",
|
||||
"deployment/ssl-configuration": "configuration/ssl/",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.23.4"
|
||||
version = "0.24.2"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/20_events/builder-detect
Symbolic link
1
plugins/20_events/builder-detect
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -8,8 +8,8 @@ cmd-events-help() {
|
||||
local plugin_name="events"
|
||||
local plugin_description="Manage event logging"
|
||||
|
||||
if [[ "$CMD" == "$plugin_name:help" ]]; then
|
||||
echo -e "Usage: dokku $plugin_name[:COMMAND]"
|
||||
if [[ "$CMD" == "${plugin_name}:help" ]]; then
|
||||
echo -e "Usage: dokku ${plugin_name}[:COMMAND]"
|
||||
echo ''
|
||||
echo "$plugin_description"
|
||||
echo ''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.23.4"
|
||||
version = "0.24.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -14,6 +14,7 @@ type AppJSON struct {
|
||||
Predeploy string `json:"predeploy"`
|
||||
Postdeploy string `json:"postdeploy"`
|
||||
} `json:"dokku"`
|
||||
Postdeploy string `json:"postdeploy"`
|
||||
} `json:"scripts"`
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,10 @@ func getPhaseScript(appName string, phase string) (string, error) {
|
||||
return "", fmt.Errorf("Cannot parse app.json: %v", err)
|
||||
}
|
||||
|
||||
if phase == "heroku.postdeploy" {
|
||||
return appJSON.Scripts.Postdeploy, nil
|
||||
}
|
||||
|
||||
if phase == "predeploy" {
|
||||
return appJSON.Scripts.Dokku.Predeploy, nil
|
||||
}
|
||||
@@ -143,7 +147,11 @@ func getDokkuAppShell(appName string) string {
|
||||
}
|
||||
|
||||
func executeScript(appName string, image string, imageTag string, phase string) error {
|
||||
common.LogInfo1(fmt.Sprintf("Checking for %s task", phase))
|
||||
phaseName := phase
|
||||
if phase == "heroku.postdeploy" {
|
||||
phaseName = "first deploy postdeploy"
|
||||
}
|
||||
common.LogInfo1(fmt.Sprintf("Checking for %s task", phaseName))
|
||||
command := ""
|
||||
phaseSource := ""
|
||||
if phase == "release" {
|
||||
@@ -158,11 +166,11 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
}
|
||||
|
||||
if command == "" {
|
||||
common.LogVerbose(fmt.Sprintf("No %s task found, skipping", phase))
|
||||
common.LogVerbose(fmt.Sprintf("No %s task found, skipping", phaseName))
|
||||
return nil
|
||||
}
|
||||
|
||||
common.LogInfo1(fmt.Sprintf("Executing %s task from %s: %s", phase, phaseSource, command))
|
||||
common.LogInfo1(fmt.Sprintf("Executing %s task from %s: %s", phaseName, phaseSource, command))
|
||||
isHerokuishImage := common.IsImageHerokuishBased(image, appName)
|
||||
isCnbImage := common.IsImageCnbBased(image)
|
||||
dockerfileEntrypoint := ""
|
||||
@@ -180,7 +188,7 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
if isHerokuishImage {
|
||||
imageSourceType = "herokuish"
|
||||
} else if isCnbImage {
|
||||
imageSourceType = "cnb"
|
||||
imageSourceType = "pack"
|
||||
}
|
||||
|
||||
cacheDir := fmt.Sprintf("%s/cache", common.AppRoot(appName))
|
||||
@@ -237,19 +245,19 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
|
||||
containerID, err := createdContainerID(appName, dockerArgs, image, script, phase)
|
||||
if err != nil {
|
||||
common.LogFail(fmt.Sprintf("Failed to create %s execution container: %s", phase, err.Error()))
|
||||
return fmt.Errorf("Failed to create %s execution container: %s", phase, err.Error())
|
||||
}
|
||||
|
||||
if !waitForExecution(containerID) {
|
||||
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phase, containerID[0:9]))
|
||||
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
|
||||
common.LogVerboseQuietContainerLogs(containerID)
|
||||
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phase, containerID[0:9]))
|
||||
common.LogFail(fmt.Sprintf("Execution of %s task failed: %s", phase, command))
|
||||
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
|
||||
return fmt.Errorf("Execution of %s task failed: %s", phaseName, command)
|
||||
}
|
||||
|
||||
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phase, containerID[0:9]))
|
||||
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
|
||||
common.LogVerboseQuietContainerLogs(containerID)
|
||||
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phase, containerID[0:9]))
|
||||
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
|
||||
|
||||
if phase != "predeploy" {
|
||||
return nil
|
||||
@@ -284,7 +292,7 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
containerCommitCmd.ShowOutput = false
|
||||
containerCommitCmd.Command.Stderr = os.Stderr
|
||||
if !containerCommitCmd.Execute() {
|
||||
common.LogFail(fmt.Sprintf("Commiting of '%s' to image failed: %s", phase, command))
|
||||
return fmt.Errorf("Commiting of '%s' to image failed: %s", phase, command)
|
||||
}
|
||||
|
||||
return common.PlugnTrigger("scheduler-register-retired", []string{appName, containerID}...)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.23.4"
|
||||
version = "0.24.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -32,10 +32,10 @@ func main() {
|
||||
imageTag := flag.Arg(1)
|
||||
err = appjson.TriggerPreDeploy(appName, imageTag)
|
||||
default:
|
||||
common.LogFail(fmt.Sprintf("Invalid plugin trigger call: %s", trigger))
|
||||
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
common.LogFail(err.Error())
|
||||
common.LogFailWithError(err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package appjson
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@@ -9,16 +10,16 @@ import (
|
||||
|
||||
// TriggerInstall initializes app restart policies
|
||||
func TriggerInstall() error {
|
||||
if err := common.PropertySetup("common"); err != nil {
|
||||
return fmt.Errorf("Unable to install the common plugin: %s", err.Error())
|
||||
}
|
||||
|
||||
directory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json")
|
||||
if err := os.MkdirAll(directory, 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := common.SetPermissions(directory, 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return common.SetPermissions(directory, 0755)
|
||||
}
|
||||
|
||||
// TriggerPostDelete destroys the app-json data for a given app container
|
||||
@@ -41,10 +42,7 @@ func TriggerPostDeploy(appName string, imageTag string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := executeScript(appName, image, imageTag, "postdeploy"); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return executeScript(appName, image, imageTag, "postdeploy")
|
||||
}
|
||||
|
||||
// TriggerPreDeploy is a trigger to execute predeploy and release deployment tasks
|
||||
@@ -65,5 +63,19 @@ func TriggerPreDeploy(appName string, imageTag string) error {
|
||||
if err := executeScript(appName, image, imageTag, "release"); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
if common.PropertyGet("common", appName, "deployed") == "true" {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Ensure that a failed postdeploy does not trigger twice
|
||||
if common.PropertyGet("app-json", appName, "heroku.postdeploy") == "executed" {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := common.PropertyWrite("app-json", appName, "heroku.postdeploy", "executed"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return executeScript(appName, image, imageTag, "heroku.postdeploy")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.23.4"
|
||||
version = "0.24.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -78,10 +78,10 @@ func main() {
|
||||
appName := args.Arg(0)
|
||||
err = apps.CommandUnlock(appName)
|
||||
default:
|
||||
common.LogFail(fmt.Sprintf("Invalid plugin subcommand call: %s", subcommand))
|
||||
err = fmt.Errorf("Invalid plugin subcommand call: %s", subcommand)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
common.LogFail(err.Error())
|
||||
common.LogFailWithError(err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@ func main() {
|
||||
appName := flag.Arg(0)
|
||||
err = apps.ReportSingleApp(appName, "", "")
|
||||
default:
|
||||
common.LogFail(fmt.Sprintf("Invalid plugin trigger call: %s", trigger))
|
||||
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
common.LogFail(err.Error())
|
||||
common.LogFailWithError(err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-cnb plugin"
|
||||
version = "0.23.4"
|
||||
[plugin.config]
|
||||
35
plugins/builder-dockerfile/builder-detect
Executable file
35
plugins/builder-dockerfile/builder-detect
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-dockerfile-builder-detect() {
|
||||
declare desc="builder-dockerfile builder-detect plugin trigger"
|
||||
declare trigger="builder-detect"
|
||||
declare APP="$1" SOURCECODE_WORK_DIR="$2"
|
||||
|
||||
# hack: unfortunately our legacy code requires that buildpacks
|
||||
# are detected before dockerfile support is detected
|
||||
# as such, we need to force-check the herokuish and pack
|
||||
# builders before allowing the dockerfile check to succeed
|
||||
# in a future release, we may drop this hack, but for now,
|
||||
# such is life
|
||||
if [[ -f "$PLUGIN_ENABLED_PATH/builder-herokuish/builder-detect" ]]; then
|
||||
if [[ -n "$($PLUGIN_ENABLED_PATH/builder-herokuish/builder-detect "$APP" "$SOURCECODE_WORK_DIR")" ]]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "$PLUGIN_ENABLED_PATH/builder-pack/builder-detect" ]]; then
|
||||
if [[ -n "$($PLUGIN_ENABLED_PATH/builder-pack/builder-detect "$APP" "$SOURCECODE_WORK_DIR")" ]]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "$SOURCECODE_WORK_DIR/Dockerfile" ]]; then
|
||||
echo "dockerfile"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
trigger-builder-dockerfile-builder-detect "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-dockerfile plugin"
|
||||
version = "0.23.4"
|
||||
version = "0.24.2"
|
||||
[plugin.config]
|
||||
|
||||
27
plugins/builder-herokuish/builder-detect
Executable file
27
plugins/builder-herokuish/builder-detect
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/builder-herokuish/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-herokuish-builder-detect() {
|
||||
declare desc="builder-herokuish builder-detect plugin trigger"
|
||||
declare trigger="builder-detect"
|
||||
declare APP="$1" SOURCECODE_WORK_DIR="$2"
|
||||
|
||||
if fn-has-buildpacks-file "$SOURCECODE_WORK_DIR"; then
|
||||
echo "herokuish"
|
||||
return
|
||||
fi
|
||||
|
||||
if fn-has-buildpack-dotenv "$SOURCECODE_WORK_DIR"; then
|
||||
echo "herokuish"
|
||||
return
|
||||
fi
|
||||
|
||||
if fn-has-buildpack-env "$APP"; then
|
||||
echo "herokuish"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
trigger-builder-herokuish-builder-detect "$@"
|
||||
38
plugins/builder-herokuish/functions
Executable file
38
plugins/builder-herokuish/functions
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
fn-has-buildpacks-file() {
|
||||
declare SOURCECODE_WORK_DIR="$1"
|
||||
|
||||
if [[ -f "$SOURCECODE_WORK_DIR/.buildpacks" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
fn-has-buildpack-dotenv() {
|
||||
declare SOURCECODE_WORK_DIR="$1"
|
||||
|
||||
if [[ ! -f "$SOURCECODE_WORK_DIR/.env" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if grep -q BUILDPACK_URL "$SOURCECODE_WORK_DIR/.env"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
fn-has-buildpack-env() {
|
||||
declare APP="$1"
|
||||
|
||||
if [[ -n $(config_get "$APP" BUILDPACK_URL || true) ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-herokuish plugin"
|
||||
version = "0.23.4"
|
||||
version = "0.24.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -14,7 +14,7 @@ trigger-builder-herokuish-post-app-clone-setup() {
|
||||
|
||||
pushd "$DOKKU_ROOT/$OLD_APP/." >/dev/null
|
||||
find ./* \( -name ".cache" -o -name "cache" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
||||
popd >/dev/null 2>&1 || pushd "/tmp" >/dev/null
|
||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||
|
||||
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
|
||||
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$NEW_APP"
|
||||
|
||||
@@ -20,7 +20,7 @@ trigger-builder-herokuish-post-app-clone-setup() {
|
||||
|
||||
pushd "$DOKKU_ROOT/$OLD_APP/." >/dev/null
|
||||
find ./* \( -name ".cache" -o -name "cache" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
||||
popd >/dev/null 2>&1 || pushd "/tmp" >/dev/null
|
||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||
}
|
||||
|
||||
trigger-builder-herokuish-post-app-clone-setup "$@"
|
||||
|
||||
@@ -4,16 +4,15 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
trigger-builder-cnb-builder-build() {
|
||||
declare desc="builder-cnb builder-build plugin trigger"
|
||||
trigger-builder-pack-builder-build() {
|
||||
declare desc="builder-pack builder-build plugin trigger"
|
||||
declare trigger="builder-build"
|
||||
declare BUILDER_TYPE="$1" APP="$2" SOURCECODE_WORK_DIR="$3"
|
||||
|
||||
if [[ "$BUILDER_TYPE" != "cnb" ]]; then
|
||||
if [[ "$BUILDER_TYPE" != "pack" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
local stack="$(plugn trigger buildpack-stack-name "$APP")"
|
||||
if [[ -z "$stack" ]]; then
|
||||
DOKKU_CNB_STACK="$stack"
|
||||
@@ -32,15 +31,15 @@ trigger-builder-cnb-builder-build() {
|
||||
local TMP_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
|
||||
trap "rm -rf '$TMP_FILE' >/dev/null" RETURN INT TERM
|
||||
|
||||
config_export app "$APP" --format envfile --merged > "$TMP_FILE"
|
||||
config_export app "$APP" --format envfile --merged >"$TMP_FILE"
|
||||
|
||||
plugn trigger pre-build-cnb "$APP" "$SOURCECODE_WORK_DIR"
|
||||
plugn trigger pre-build-pack "$APP" "$SOURCECODE_WORK_DIR"
|
||||
|
||||
pack build "$IMAGE" --builder "$DOKKU_CNB_BUILDER" --path "$SOURCECODE_WORK_DIR" --default-process web
|
||||
|
||||
docker-image-labeler --label=com.dokku.image-stage=build --label=com.dokku.app-name=$APP --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku "$IMAGE"
|
||||
|
||||
plugn trigger post-build-cnb "$APP" "$SOURCECODE_WORK_DIR"
|
||||
plugn trigger post-build-pack "$APP" "$SOURCECODE_WORK_DIR"
|
||||
}
|
||||
|
||||
trigger-builder-cnb-builder-build "$@"
|
||||
trigger-builder-pack-builder-build "$@"
|
||||
22
plugins/builder-pack/builder-detect
Executable file
22
plugins/builder-pack/builder-detect
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-pack-builder-detect() {
|
||||
declare desc="builder-pack builder-detect plugin trigger"
|
||||
declare trigger="builder-detect"
|
||||
declare APP="$1" SOURCECODE_WORK_DIR="$2"
|
||||
|
||||
if [[ -f "$SOURCECODE_WORK_DIR/project.toml" ]]; then
|
||||
echo "pack"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "$(config_get "$APP" DOKKU_CNB_EXPERIMENTAL || true)" == "1" ]]; then
|
||||
echo "pack"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
trigger-builder-pack-builder-detect "$@"
|
||||
@@ -3,20 +3,20 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
trigger-builder-cnb-builder-release() {
|
||||
declare desc="builder-cnb builder-release plugin trigger"
|
||||
trigger-builder-pack-builder-release() {
|
||||
declare desc="builder-pack builder-release plugin trigger"
|
||||
declare trigger="builder-release"
|
||||
declare BUILDER_TYPE="$1" APP="$2" IMAGE_TAG="$3"
|
||||
|
||||
if [[ "$BUILDER_TYPE" != "cnb" ]]; then
|
||||
if [[ "$BUILDER_TYPE" != "pack" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
plugn trigger pre-release-cnb "$APP" "$IMAGE_TAG"
|
||||
plugn trigger pre-release-pack "$APP" "$IMAGE_TAG"
|
||||
|
||||
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"
|
||||
plugn trigger post-release-cnb "$APP" "$IMAGE_TAG"
|
||||
plugn trigger post-release-pack "$APP" "$IMAGE_TAG"
|
||||
}
|
||||
|
||||
trigger-builder-cnb-builder-release "$@"
|
||||
trigger-builder-pack-builder-release "$@"
|
||||
4
plugins/builder-pack/plugin.toml
Normal file
4
plugins/builder-pack/plugin.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-pack plugin"
|
||||
version = "0.24.2"
|
||||
[plugin.config]
|
||||
10
plugins/builder/.gitignore
vendored
Normal file
10
plugins/builder/.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/commands
|
||||
/core-post-deploy
|
||||
/subcommands/*
|
||||
/triggers/*
|
||||
/triggers
|
||||
/network-*
|
||||
/install
|
||||
/post-*
|
||||
/report
|
||||
/builder-detect
|
||||
6
plugins/builder/Makefile
Normal file
6
plugins/builder/Makefile
Normal file
@@ -0,0 +1,6 @@
|
||||
SUBCOMMANDS = subcommands/report subcommands/set
|
||||
TRIGGERS = triggers/builder-detect triggers/install triggers/post-delete triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = builder
|
||||
|
||||
include ../../common.mk
|
||||
13
plugins/builder/builder.go
Normal file
13
plugins/builder/builder.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package builder
|
||||
|
||||
var (
|
||||
// DefaultProperties is a map of all valid network properties with corresponding default property values
|
||||
DefaultProperties = map[string]string{
|
||||
"selected": "",
|
||||
}
|
||||
|
||||
// GlobalProperties is a map of all valid global network properties
|
||||
GlobalProperties = map[string]bool{
|
||||
"selected": true,
|
||||
}
|
||||
)
|
||||
12
plugins/builder/go.mod
Normal file
12
plugins/builder/go.mod
Normal file
@@ -0,0 +1,12 @@
|
||||
module github.com/dokku/dokku/plugins/builder
|
||||
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27
|
||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
)
|
||||
|
||||
replace github.com/dokku/dokku/plugins/common => ../common
|
||||
10
plugins/builder/go.sum
Normal file
10
plugins/builder/go.sum
Normal file
@@ -0,0 +1,10 @@
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 h1:utdYOikI1XjNtTFGCwSM6OmFJblU4ld4gACoJsbadJg=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
4
plugins/builder/plugin.toml
Normal file
4
plugins/builder/plugin.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder plugin"
|
||||
version = "0.24.2"
|
||||
[plugin.config]
|
||||
44
plugins/builder/report.go
Normal file
44
plugins/builder/report.go
Normal file
@@ -0,0 +1,44 @@
|
||||
package builder
|
||||
|
||||
import (
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
// ReportSingleApp is an internal function that displays the builder report for one or more apps
|
||||
func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
flags := map[string]common.ReportFunc{
|
||||
"--builder-computed-selected": reportComputedSelected,
|
||||
"--builder-global-selected": reportGlobalSelected,
|
||||
"--builder-selected": reportSelected,
|
||||
}
|
||||
|
||||
flagKeys := []string{}
|
||||
for flagKey := range flags {
|
||||
flagKeys = append(flagKeys, flagKey)
|
||||
}
|
||||
|
||||
trimPrefix := false
|
||||
uppercaseFirstCharacter := true
|
||||
infoFlags := common.CollectReport(appName, infoFlag, flags)
|
||||
return common.ReportSingleApp("builder", appName, infoFlag, infoFlags, flagKeys, format, trimPrefix, uppercaseFirstCharacter)
|
||||
}
|
||||
|
||||
func reportComputedSelected(appName string) string {
|
||||
value := reportSelected(appName)
|
||||
if value == "" {
|
||||
value = reportGlobalSelected(appName)
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
func reportGlobalSelected(appName string) string {
|
||||
return common.PropertyGet("builder", "--global", "selected")
|
||||
}
|
||||
|
||||
func reportSelected(appName string) string {
|
||||
return common.PropertyGet("builder", appName, "selected")
|
||||
}
|
||||
56
plugins/builder/src/commands/commands.go
Normal file
56
plugins/builder/src/commands/commands.go
Normal file
@@ -0,0 +1,56 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
const (
|
||||
helpHeader = `Usage: dokku builder[:COMMAND]
|
||||
|
||||
Manage builder settings for an app
|
||||
|
||||
Additional commands:`
|
||||
|
||||
helpContent = `
|
||||
builder:report [<app>] [<flag>], Displays a builder report for one or more apps
|
||||
builder:set <app> <property> (<value>), Set or clear a builder property for an app
|
||||
`
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.Usage = usage
|
||||
flag.Parse()
|
||||
|
||||
cmd := flag.Arg(0)
|
||||
switch cmd {
|
||||
case "builder", "builder:help":
|
||||
usage()
|
||||
case "help":
|
||||
command := common.NewShellCmd(fmt.Sprintf("ps -o command= %d", os.Getppid()))
|
||||
command.ShowOutput = false
|
||||
output, err := command.Output()
|
||||
|
||||
if err == nil && strings.Contains(string(output), "--all") {
|
||||
fmt.Println(helpContent)
|
||||
} else {
|
||||
fmt.Print("\n builder, Manage builder settings for an app\n")
|
||||
}
|
||||
default:
|
||||
dokkuNotImplementExitCode, err := strconv.Atoi(os.Getenv("DOKKU_NOT_IMPLEMENTED_EXIT"))
|
||||
if err != nil {
|
||||
fmt.Println("failed to retrieve DOKKU_NOT_IMPLEMENTED_EXIT environment variable")
|
||||
dokkuNotImplementExitCode = 10
|
||||
}
|
||||
os.Exit(dokkuNotImplementExitCode)
|
||||
}
|
||||
}
|
||||
|
||||
func usage() {
|
||||
common.CommandUsage(helpHeader, helpContent)
|
||||
}
|
||||
50
plugins/builder/src/subcommands/subcommands.go
Normal file
50
plugins/builder/src/subcommands/subcommands.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/builder"
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
|
||||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
// main entrypoint to all subcommands
|
||||
func main() {
|
||||
parts := strings.Split(os.Args[0], "/")
|
||||
subcommand := parts[len(parts)-1]
|
||||
|
||||
var err error
|
||||
switch subcommand {
|
||||
case "report":
|
||||
args := flag.NewFlagSet("builder:report", flag.ExitOnError)
|
||||
format := args.String("format", "stdout", "format: [ stdout | json ]")
|
||||
osArgs, infoFlag, flagErr := common.ParseReportArgs("builder", os.Args[2:])
|
||||
if flagErr == nil {
|
||||
args.Parse(osArgs)
|
||||
appName := args.Arg(0)
|
||||
err = builder.CommandReport(appName, *format, infoFlag)
|
||||
}
|
||||
case "set":
|
||||
args := flag.NewFlagSet("builder:set", flag.ExitOnError)
|
||||
global := args.Bool("global", false, "--global: set a global property")
|
||||
args.Parse(os.Args[2:])
|
||||
appName := args.Arg(0)
|
||||
property := args.Arg(1)
|
||||
value := args.Arg(2)
|
||||
if *global {
|
||||
appName = "--global"
|
||||
property = args.Arg(0)
|
||||
value = args.Arg(1)
|
||||
}
|
||||
err = builder.CommandSet(appName, property, value)
|
||||
default:
|
||||
err = fmt.Errorf("Invalid plugin subcommand call: %s", subcommand)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
common.LogFailWithError(err)
|
||||
}
|
||||
}
|
||||
39
plugins/builder/src/triggers/triggers.go
Normal file
39
plugins/builder/src/triggers/triggers.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/builder"
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
// main entrypoint to all triggers
|
||||
func main() {
|
||||
parts := strings.Split(os.Args[0], "/")
|
||||
trigger := parts[len(parts)-1]
|
||||
flag.Parse()
|
||||
|
||||
var err error
|
||||
switch trigger {
|
||||
case "builder-detect":
|
||||
appName := flag.Arg(0)
|
||||
err = builder.TriggerBuilderDetect(appName)
|
||||
case "install":
|
||||
err = builder.TriggerInstall()
|
||||
case "post-delete":
|
||||
appName := flag.Arg(0)
|
||||
err = builder.TriggerPostDelete(appName)
|
||||
case "report":
|
||||
appName := flag.Arg(0)
|
||||
err = builder.ReportSingleApp(appName, "", "")
|
||||
default:
|
||||
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
common.LogFailWithError(err)
|
||||
}
|
||||
}
|
||||
29
plugins/builder/subcommands.go
Normal file
29
plugins/builder/subcommands.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package builder
|
||||
|
||||
import (
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
// CommandReport displays a network report for one or more apps
|
||||
func CommandReport(appName string, format string, infoFlag string) error {
|
||||
if len(appName) == 0 {
|
||||
apps, err := common.DokkuApps()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, appName := range apps {
|
||||
if err := ReportSingleApp(appName, format, infoFlag); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
return ReportSingleApp(appName, format, infoFlag)
|
||||
}
|
||||
|
||||
// CommandSet set or clear a builder property for an app
|
||||
func CommandSet(appName string, property string, value string) error {
|
||||
common.CommandPropertySet("builder", appName, property, value, DefaultProperties, GlobalProperties)
|
||||
return nil
|
||||
}
|
||||
36
plugins/builder/triggers.go
Normal file
36
plugins/builder/triggers.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package builder
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
// TriggerBuilderDetect outputs a manually selected builder for the app
|
||||
func TriggerBuilderDetect(appName string) error {
|
||||
if builder := common.PropertyGet("builder", appName, "selected"); builder != "" {
|
||||
fmt.Println(builder)
|
||||
return nil
|
||||
}
|
||||
|
||||
if builder := common.PropertyGet("builder", "--global", "selected"); builder != "" {
|
||||
fmt.Println(builder)
|
||||
return nil
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerInstall runs the install step for the builder plugin
|
||||
func TriggerInstall() error {
|
||||
if err := common.PropertySetup("builder"); err != nil {
|
||||
return fmt.Errorf("Unable to install the builder plugin: %s", err.Error())
|
||||
}
|
||||
|
||||
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.23.4"
|
||||
version = "0.24.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -72,10 +72,10 @@ func main() {
|
||||
}
|
||||
err = buildpacks.CommandSetProperty(appName, property, value)
|
||||
default:
|
||||
common.LogFail(fmt.Sprintf("Invalid plugin subcommand call: %s", subcommand))
|
||||
err = fmt.Errorf("Invalid plugin subcommand call: %s", subcommand)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
common.LogFail(err.Error())
|
||||
common.LogFailWithError(err)
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user