Compare commits
229 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e2c79c5ed | ||
|
|
a0cece197f | ||
|
|
57858c1788 | ||
|
|
88736c1000 | ||
|
|
48357adac1 | ||
|
|
3b4d101a42 | ||
|
|
c3871e7da9 | ||
|
|
7a4ead4db4 | ||
|
|
c32d0cc791 | ||
|
|
b3c732e487 | ||
|
|
ae14b02cbd | ||
|
|
1532590b50 | ||
|
|
d3cbb730ac | ||
|
|
ffd5c896ed | ||
|
|
6bc960e10c | ||
|
|
2e237041ec | ||
|
|
23798b575b | ||
|
|
b690d9d18d | ||
|
|
cd030f4fa0 | ||
|
|
6db82861e6 | ||
|
|
a637ffc848 | ||
|
|
760be655e9 | ||
|
|
01e317259b | ||
|
|
c74c542b1f | ||
|
|
c4ad455aad | ||
|
|
8c43542f2e | ||
|
|
61f8590553 | ||
|
|
d84c17d9e2 | ||
|
|
c9d10b8a2b | ||
|
|
b43cec2d6b | ||
|
|
e1d5228796 | ||
|
|
fd77f9c7a0 | ||
|
|
f6b03dd55f | ||
|
|
43631e8847 | ||
|
|
afea3b54a8 | ||
|
|
17a2b333f3 | ||
|
|
06e63c8f95 | ||
|
|
1bc8bb2a24 | ||
|
|
1bf8493cd1 | ||
|
|
e705d4eed8 | ||
|
|
6e46bacf92 | ||
|
|
69bb8e3077 | ||
|
|
3aa7d39358 | ||
|
|
867403f589 | ||
|
|
cce7c5cb97 | ||
|
|
6ad8aa7988 | ||
|
|
36294e09a3 | ||
|
|
fddf130abd | ||
|
|
c0b6942392 | ||
|
|
f949fe2a49 | ||
|
|
55554ce9bd | ||
|
|
904894722f | ||
|
|
a8a167f87f | ||
|
|
cd7b8afccb | ||
|
|
6c6e72ca04 | ||
|
|
9616473c3a | ||
|
|
e53e8bb59f | ||
|
|
5cfe7610b2 | ||
|
|
6b50ba66a9 | ||
|
|
685ef90018 | ||
|
|
b48b79f5ca | ||
|
|
8f7f03a7d8 | ||
|
|
d1a16717b3 | ||
|
|
aa77638ca7 | ||
|
|
e893ac2aaa | ||
|
|
1f8c5509cf | ||
|
|
3c6396fbca | ||
|
|
8984b748c5 | ||
|
|
9fc7c49da5 | ||
|
|
650eb57e91 | ||
|
|
33a6c29517 | ||
|
|
ba2126c57a | ||
|
|
00bb9fad9f | ||
|
|
396ba7b1ab | ||
|
|
6fb306eb03 | ||
|
|
d12c9d7362 | ||
|
|
363039fe34 | ||
|
|
ef4eeab029 | ||
|
|
9ffd262801 | ||
|
|
a4318ecdbd | ||
|
|
c335eb9ad6 | ||
|
|
9d883f53c7 | ||
|
|
a25071f02f | ||
|
|
5f5efe2563 | ||
|
|
fa1f3d0a08 | ||
|
|
0720c3ef66 | ||
|
|
ea86a9f2ca | ||
|
|
4cf717baf8 | ||
|
|
bab3e714f7 | ||
|
|
74b2961f8d | ||
|
|
76201aed64 | ||
|
|
9e27b07772 | ||
|
|
51c5c58354 | ||
|
|
2d1b93c354 | ||
|
|
f945696d15 | ||
|
|
4687b96003 | ||
|
|
92524c2da0 | ||
|
|
a5ea0ba896 | ||
|
|
b7c7155852 | ||
|
|
fd28bf53de | ||
|
|
52d9cb6188 | ||
|
|
5dcdce8b62 | ||
|
|
b41b5c0a68 | ||
|
|
a9f820bfaa | ||
|
|
a2e40de597 | ||
|
|
2fa7baa035 | ||
|
|
177f0be21c | ||
|
|
c29def79f3 | ||
|
|
8fb50bbf68 | ||
|
|
ed9d356f60 | ||
|
|
a4be3a06f9 | ||
|
|
e636609fa8 | ||
|
|
1d1cf56692 | ||
|
|
82778a0aad | ||
|
|
3d239344fe | ||
|
|
c266d8c41e | ||
|
|
6f2c218f29 | ||
|
|
abfb0d3977 | ||
|
|
9a1a97d56f | ||
|
|
44caf44ce6 | ||
|
|
e800b8a9a7 | ||
|
|
4d0ff4a834 | ||
|
|
ce4fe7850b | ||
|
|
869a6ce553 | ||
|
|
43b90f1ae8 | ||
|
|
3e694926c9 | ||
|
|
1c277a99cb | ||
|
|
071416ef11 | ||
|
|
5502a61452 | ||
|
|
96924e54c4 | ||
|
|
8cff88dea0 | ||
|
|
fbff08a580 | ||
|
|
9b45aed6f0 | ||
|
|
d9eea74f18 | ||
|
|
301d5a19b0 | ||
|
|
8cb4bb74fa | ||
|
|
61447f9ffd | ||
|
|
06742cfcc4 | ||
|
|
82dfcc01e2 | ||
|
|
892391a7fd | ||
|
|
44a43cb130 | ||
|
|
e00c98546f | ||
|
|
27e2f7ab3d | ||
|
|
eadf9f1f8e | ||
|
|
597fb7d219 | ||
|
|
e27d19a346 | ||
|
|
15bf4a8386 | ||
|
|
003ed01e30 | ||
|
|
db239debf1 | ||
|
|
fccd4e1a20 | ||
|
|
0c8c093cf7 | ||
|
|
f74b702c5e | ||
|
|
75309bf3a0 | ||
|
|
dc310c4ce4 | ||
|
|
0aa3c3fa53 | ||
|
|
2d180f5e0f | ||
|
|
d83471bd46 | ||
|
|
974f601fa9 | ||
|
|
4a8ed5cd06 | ||
|
|
709d8d411c | ||
|
|
e79b750b6d | ||
|
|
bb4a2da52e | ||
|
|
79bb5cb9a7 | ||
|
|
70877e351c | ||
|
|
8877abb83f | ||
|
|
cdc5eb9909 | ||
|
|
e1482df157 | ||
|
|
b45b2db8e7 | ||
|
|
d21efd90b4 | ||
|
|
d82a259bab | ||
|
|
6f64a59f49 | ||
|
|
d67aa94709 | ||
|
|
f8376c8845 | ||
|
|
52f3cf2af0 | ||
|
|
0997fd3347 | ||
|
|
2c4fec77bb | ||
|
|
2a04ed70b6 | ||
|
|
1ea821a6c3 | ||
|
|
3358254212 | ||
|
|
dbde0b2719 | ||
|
|
9ead92a490 | ||
|
|
feb6f2fed6 | ||
|
|
128c442b17 | ||
|
|
162db40370 | ||
|
|
5855fd069f | ||
|
|
c045b1ca6b | ||
|
|
d1319977d6 | ||
|
|
9c073364f5 | ||
|
|
e9554447d6 | ||
|
|
f3f9d37d59 | ||
|
|
0454f3bc8f | ||
|
|
aa81bc0589 | ||
|
|
3f70ee3e54 | ||
|
|
e922615cc7 | ||
|
|
d6a70c7e7b | ||
|
|
c725506d63 | ||
|
|
cafcf5cb7c | ||
|
|
54e6dd59f1 | ||
|
|
bd89c31cb7 | ||
|
|
4136c2682f | ||
|
|
5b8c93fd29 | ||
|
|
0337a21f66 | ||
|
|
407c54757d | ||
|
|
5dbefcbd9c | ||
|
|
70e552535b | ||
|
|
8e6b19c36e | ||
|
|
c379b3e477 | ||
|
|
2271c476e9 | ||
|
|
c70be7a386 | ||
|
|
6c7217b873 | ||
|
|
aa276f0b18 | ||
|
|
c43149f4c9 | ||
|
|
3d4252f43c | ||
|
|
d0219ced67 | ||
|
|
2bc7b7e2cc | ||
|
|
8c42e85fcc | ||
|
|
257abfaee8 | ||
|
|
faf53aa479 | ||
|
|
d9204083f7 | ||
|
|
775e78bd08 | ||
|
|
997cc4f466 | ||
|
|
a825e2678c | ||
|
|
6c6e26712d | ||
|
|
c4985bca67 | ||
|
|
620a36be82 | ||
|
|
7bf61b401f | ||
|
|
10f6d00e04 | ||
|
|
dfae840ace | ||
|
|
f6ec744a1f |
19
.devcontainer/Dockerfile
Normal file
19
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM dokku/dokku:latest
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install --no-install-recommends -y build-essential file nano && \
|
||||
apt-get install --no-install-recommends -y help2man shellcheck uuid-runtime wget xmlstarlet && \
|
||||
apt-get clean autoclean && \
|
||||
apt-get autoremove --yes && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD https://raw.githubusercontent.com/dokku/dokku/master/tests/dhparam.pem /mnt/dokku/etc/nginx/dhparam.pem
|
||||
|
||||
COPY .devcontainer/bin/ /usr/local/bin/
|
||||
COPY ["tests.mk", "Makefile"]
|
||||
RUN make ci-dependencies
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV DOKKU_HOSTNAME=dokku.me
|
||||
LABEL org.label-schema.schema-version=1.0 org.label-schema.vendor=dokku com.dokku.devcontainer=true
|
||||
9
.devcontainer/bin/copy-plugin
Executable file
9
.devcontainer/bin/copy-plugin
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
main() {
|
||||
declare PLUGIN_NAME="$1"
|
||||
|
||||
make go-build-plugin copyplugin PLUGIN_NAME=$PLUGIN_NAME
|
||||
}
|
||||
|
||||
main "$@"
|
||||
18
.devcontainer/devcontainer.json
Normal file
18
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"context": ".."
|
||||
},
|
||||
"containerEnv": {
|
||||
"DOKKU_HOST_ROOT": "${localWorkspaceFolder}/tmp/data/home/dokku",
|
||||
"GO_ROOT_MOUNT": "${localWorkspaceFolder}:/go/src/github.com/dokku/dokku"
|
||||
},
|
||||
"initializeCommand": ["mkdir", "-p", "tmp/data"],
|
||||
"mounts": [
|
||||
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
|
||||
"source=${localWorkspaceFolder}/tmp/data/,target=/mnt/dokku/,type=bind"
|
||||
],
|
||||
"overrideCommand": false,
|
||||
"postCreateCommand": ["make", "setup-deploy-tests"],
|
||||
"runArgs": ["--init"]
|
||||
}
|
||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -159,6 +159,6 @@ jobs:
|
||||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1
|
||||
with:
|
||||
check_name: Unit Test Results
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
files: test-results/**/*.xml
|
||||
comment_on_pr: false
|
||||
|
||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -83,5 +83,6 @@ jobs:
|
||||
run: |
|
||||
git config --global user.name 'Dokku Bot'
|
||||
git config --global user.email no-reply@dokku.com
|
||||
brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
|
||||
# brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
|
||||
brew tap dokku/repo
|
||||
brew bump-formula-pr -f --no-browse --no-audit --no-fork --debug --verbose --url "https://github.com/dokku/dokku/archive/${{ needs.release.outputs.version }}.tar.gz" dokku/repo/dokku
|
||||
|
||||
@@ -9,7 +9,7 @@ several ways to help out:
|
||||
- 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)
|
||||
- Sponsor the Dokku project financially on [Github](https://github.com/sponsors/dokku), [OpenCollective](https://opencollective.com/dokku#support) or [Patreon](https://www.patreon.com/dokku)
|
||||
|
||||
There are a few guidelines that we need contributors to follow so that we have
|
||||
a chance of keeping on top of things.
|
||||
|
||||
281
HISTORY.md
281
HISTORY.md
@@ -1,5 +1,284 @@
|
||||
# History
|
||||
|
||||
## 0.26.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4888: @josegonzalez Ensure installations treat raspbian as similar to debian buster as possible
|
||||
- #4887: @josegonzalez Ensure we do not add two debian folders in a single armhf package
|
||||
|
||||
### New Features
|
||||
|
||||
- #4886: @josegonzalez Add created-at time to apps:report output
|
||||
|
||||
## 0.26.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4884: @josegonzalez Correct recommends entry for bash-completion
|
||||
|
||||
### New Features
|
||||
|
||||
- #4885: @josegonzalez Add experimental support for arm devices
|
||||
|
||||
## 0.26.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
See the [0.26.0 migration guide](/docs/appendices/0.26.0-migration-guide.md) for more information on migrating to 0.26.0.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4882: @josegonzalez Add missing setup/teardown of builder plugin properties
|
||||
- #4880: @josegonzalez Ensure the null scheduler reports the app as running when in use
|
||||
- #4871: @josegonzalez Do not error when default Procfile path does not exist when using a custom procfile-path
|
||||
- #4861: @josegonzalez Add missing clone/rename code for plugins
|
||||
|
||||
### New Features
|
||||
|
||||
- #4864: @josegonzalez Switch to unauthenticated tap for formula bumping
|
||||
- #4860: @josegonzalez Add ability to increase the max parallelism when deploying a given process type
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4883: @josegonzalez Enable vertical scrolling on the version selector
|
||||
- #4879: @josegonzalez Clarify that the docker-based dokku installation is ready when a certain message appears
|
||||
- #4863: @josegonzalez Clarify what is necessary for implementing a scheduler plugin
|
||||
|
||||
### Other
|
||||
|
||||
- #4874: @josegonzalez Upgrade vector log integration to 0.17.x
|
||||
- #4881: @josegonzalez Drop bindutils as alternative dependency to bind-utils
|
||||
- #4869: @dependabot[bot] chore(deps): bump socket.io from 4.2.0 to 4.3.0 in /tests/apps/.websocket.disabled
|
||||
- #4868: @dependabot[bot] chore(deps): bump jetty-servlet from 11.0.6 to 11.0.7 in /tests/apps/java
|
||||
- #4866: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 198 to 199 in /tests/apps/php
|
||||
- #4862: @josegonzalez Set deploy-source and metadata at deploy time
|
||||
- #4853: @josegonzalez Remove dangling images
|
||||
- #4765: @josegonzalez Allow specifying a single process type to restart
|
||||
- #4859: @josegonzalez Remove deprecated tar plugin
|
||||
- #4858: @josegonzalez Remove deprecated tags plugin
|
||||
- #4857: @josegonzalez Implement scheduler management plugin
|
||||
|
||||
## 0.25.7
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.7 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4855: @josegonzalez Output remote client help when there is no remote host
|
||||
|
||||
### New Features
|
||||
|
||||
- #4854: @josegonzalez Fix parallel usage for scheduler-docker-local
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4856: @josegonzalez Add a note to the migration guide regarding using a Procfile for Dockerfile deploys
|
||||
- #4843: @schmijos Clarify that docker-options are not passed to the launched process but instead to the docker run command
|
||||
|
||||
### Other
|
||||
|
||||
- #4844: @dependabot[bot] chore(deps): bump werkzeug from 2.0.1 to 2.0.2 in /tests/apps/python-flask
|
||||
|
||||
## 0.25.6
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.6/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.6 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4841: @josegonzalez Ensure pack is run as root user when building apps in docker
|
||||
- #4836: @josegonzalez Fix custom dockerfile path detection
|
||||
- #4839: @josegonzalez Choose the correct app when a named remote is specified in the remote ssh client
|
||||
|
||||
### New Features
|
||||
|
||||
- #4829: @josegonzalez Add ability to schedule process types in parallel
|
||||
- #4837: @josegonzalez Filter --link and --volume flags during Dockerfile builds
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4840: @josegonzalez Explain sha256 image digest alternative when reusing docker image tags for git:from-image deployments
|
||||
|
||||
### Tests
|
||||
|
||||
- #4842: @josegonzalez Set default process list in test cnb buildpacks
|
||||
|
||||
### Other
|
||||
|
||||
- #4832: @dependabot[bot] chore(deps): bump flask from 2.0.1 to 2.0.2 in /tests/apps/python-flask
|
||||
- #4833: @dependabot[bot] chore(deps): bump jinja2 from 3.0.1 to 3.0.2 in /tests/apps/python-flask
|
||||
- #4831: @dependabot[bot] chore(deps): bump flask from 2.0.1 to 2.0.2 in /tests/apps/multi
|
||||
|
||||
## 0.25.5
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4787: @josegonzalez Do not require double quotes when issuing dokku run commands
|
||||
- #4816: @josegonzalez Set the DOKKU_HOST_ROOT on docker container start
|
||||
- #4810: @josegonzalez Handle udp ports when fetching network config
|
||||
- #4812: @josegonzalez Silence stderr when fetching a command from the Procfile
|
||||
- #4800: @josegonzalez Add help2man os package for copyfiles make target to devcontainer
|
||||
- #4796: @josegonzalez Remove the --restart flag from pre-deploy chown containers
|
||||
|
||||
### New Features
|
||||
|
||||
- #4809: @josegonzalez Implement storage:ensure-directory command
|
||||
- #4801: @josegonzalez Expose git-from-archive and git-from-image plugin triggers
|
||||
- #4785: @josegonzalez Add support for VSCode Dev Containers
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4819: @stephenheron Fixed typo in tar documentation
|
||||
- #4824: @dy3l Fix GitLab case
|
||||
- #4822: @josegonzalez Add a note about using the registry:login command for private image deployments
|
||||
- #4808: @francipvb Added a comment about Dockerfile deployment
|
||||
- #4807: @FinnWoelm Docs: Fix instructions for enabling Docker Buildkit
|
||||
- #4786: @josegonzalez Add missing argument from trigger documentation
|
||||
- #4780: @adam12 Update source for `dokku-update`
|
||||
|
||||
### Tests
|
||||
|
||||
- #4828: @josegonzalez Update golang in test apps to latest version
|
||||
- #4815: @josegonzalez tests: use python3 shebang for shellcheck-to-junit script
|
||||
- #4814: @josegonzalez Add wget to devcontainer to fix shfmt installation
|
||||
- #4791: @josegonzalez Fix test running in devcontainer
|
||||
|
||||
### Other
|
||||
|
||||
- #4813: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 197 to 198 in /tests/apps/php
|
||||
- #4802: @dependabot[bot] chore(deps): bump django from 3.1.12 to 3.1.13 in /tests/apps/dockerfile-release
|
||||
- #4784: @josegonzalez Upgrade vector image to 0.16.x
|
||||
|
||||
## 0.25.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4775: @josegonzalez Add support for url-encoded vector-sink config values …
|
||||
- #4777: @josegonzalez Set correct version for registry plugin
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4776: @josegonzalez Clarify valid values for container-type when entering containers
|
||||
|
||||
### Other
|
||||
|
||||
- #4774: @dependabot[bot] chore(deps): bump sqlparse from 0.4.1 to 0.4.2 in /tests/apps/dockerfile-release
|
||||
|
||||
## 0.25.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4767: @josegonzalez Output logs when container rename fails and continue on
|
||||
- #4764: @josegonzalez Reference correct plugin when setting up app-json plugin
|
||||
|
||||
### Refactors
|
||||
|
||||
- #4741: @josegonzalez Use a Dockerfile to speed up env var injection for herokuish app builds
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4763: @josegonzalez Remove install doc references to removed web installer
|
||||
|
||||
### Other
|
||||
|
||||
- #4766: @josegonzalez Capitalize certain log messages for aesthetic reasons
|
||||
|
||||
## 0.25.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4760: @josegonzalez Add missing rsync to OS dependency list for git:sync command
|
||||
|
||||
### New Features
|
||||
|
||||
- #4761: @josegonzalez Correct permissions for userns support
|
||||
- #4742: @ashkulz bootstrap: add support for Debian 11 (bullseye)
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4747: @erickedji Fix process management references to formation key in app.json
|
||||
|
||||
### Other
|
||||
|
||||
- #4753: @dependabot[bot] chore(deps): bump socket.io from 4.1.3 to 4.2.0 in /tests/apps/.websocket.disabled
|
||||
- #4750: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 196 to 197 in /tests/apps/php
|
||||
- #4758: @ltalirz Fix typo in network docs
|
||||
- #4748: @trival Remove spare backtick in 0.25.0-migration-guide.md
|
||||
|
||||
## 0.25.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4736: @josegonzalez Ensure herokuish deploys respects the env vars during the release process
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4734: @josegonzalez docs: add github sponsorship link to contributing docs
|
||||
|
||||
## 0.25.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
@@ -3169,7 +3448,6 @@ Thanks to all the contributors who helped with this release!
|
||||
- #2388: @josegonzalez Add documentation for proxy ports scheme handling
|
||||
- #2389: @josegonzalez Add plugin management documentation
|
||||
|
||||
|
||||
## 0.7.0
|
||||
|
||||
Another great minor release! There are no known backwards incompatibilities with this release, though the following may be of interest to our users:
|
||||
@@ -4555,7 +4833,6 @@ This release pegs Dokku to Docker 1.6.2. Docker 1.7.0 introduced changes in `doc
|
||||
- #749: @vincentfretin Fix app certificate directory in backup-import/export
|
||||
- #750: @th4t Remove unintended phrase repetition in installation.md
|
||||
|
||||
|
||||
## 0.2.0 (2013-11-24)
|
||||
|
||||
* Added DOKKU_TRACE variable for verbose trace information
|
||||
|
||||
9
Makefile
9
Makefile
@@ -110,7 +110,11 @@ endif
|
||||
|
||||
addman: help2man man-db
|
||||
mkdir -p /usr/local/share/man/man1
|
||||
ifneq ("$(wildcard /usr/local/share/man/man1/dokku.1-generated)","")
|
||||
cp /usr/local/share/man/man1/dokku.1-generated /usr/local/share/man/man1/dokku.1
|
||||
else
|
||||
help2man -Nh help -v version -n "configure and get information from your dokku installation" -o /usr/local/share/man/man1/dokku.1 dokku
|
||||
endif
|
||||
mandb
|
||||
|
||||
version:
|
||||
@@ -127,12 +131,15 @@ plugin-dependencies: plugn procfile-util
|
||||
plugins: plugn procfile-util docker
|
||||
sudo -E dokku plugin:install --core
|
||||
|
||||
dependencies: apt-update docker-image-labeler netrc 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 parallel
|
||||
$(MAKE) -e stack
|
||||
|
||||
apt-update:
|
||||
apt-get update -qq
|
||||
|
||||
parallel:
|
||||
apt-get -qq -y --no-install-recommends install parallel
|
||||
|
||||
jq:
|
||||
apt-get -qq -y --no-install-recommends install jq
|
||||
|
||||
|
||||
@@ -98,11 +98,11 @@ Otherwise, you will need to import the keypair manually after installation using
|
||||
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.0 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.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.
|
||||
You can then proceed to configure your server domain (via `dokku domains:set-global`) and user access (via `dokku ssh-keys:add`) to complete the installation.
|
||||
|
||||
If you wish for a more unattended installation method, see [these](https://dokku.com/docs/getting-started/install/debian/#unattended-installation) docs.
|
||||
|
||||
|
||||
13
bootstrap.sh
13
bootstrap.sh
@@ -12,7 +12,7 @@ set -eo pipefail
|
||||
# That's good because it prevents our output overlapping with wget's.
|
||||
# It also means that we can't run a partially downloaded script.
|
||||
|
||||
SUPPORTED_VERSIONS="Debian [9, 10], CentOS [7], Fedora (partial) [33, 34], Ubuntu [18.04, 20.04]"
|
||||
SUPPORTED_VERSIONS="Debian [9, 10, 11], CentOS [7], Fedora (partial) [33, 34], Ubuntu [18.04, 20.04]"
|
||||
|
||||
log-fail() {
|
||||
declare desc="log fail formatter"
|
||||
@@ -163,7 +163,7 @@ install-dokku-from-deb-package() {
|
||||
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
||||
local OS_ID
|
||||
|
||||
if ! in-array "$DOKKU_DISTRO_VERSION" "18.04" "20.04" "9" "10"; then
|
||||
if ! in-array "$DOKKU_DISTRO_VERSION" "18.04" "20.04" "9" "10" "11"; then
|
||||
log-fail "Unsupported Linux distribution. Only the following versions are supported: $SUPPORTED_VERSIONS"
|
||||
fi
|
||||
|
||||
@@ -189,7 +189,7 @@ install-dokku-from-deb-package() {
|
||||
fi
|
||||
|
||||
OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
|
||||
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu"; then
|
||||
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu" "raspbian"; then
|
||||
DOKKU_DISTRO="ubuntu"
|
||||
OS_ID="bionic"
|
||||
fi
|
||||
@@ -200,7 +200,12 @@ install-dokku-from-deb-package() {
|
||||
OS_ID="bionic"
|
||||
fi
|
||||
elif [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
||||
OS_IDS=("stretch" "buster")
|
||||
OS_IDS=("stretch" "buster" "bullseye")
|
||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||
OS_ID="bullseye"
|
||||
fi
|
||||
elif [[ "$DOKKU_DISTRO" == "raspbian" ]]; then
|
||||
OS_IDS=("buster")
|
||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||
OS_ID="buster"
|
||||
fi
|
||||
|
||||
@@ -3,7 +3,9 @@ GO_PLUGIN_MAKE_TARGET ?= build
|
||||
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
||||
BUILD_IMAGE := golang:1.15.6
|
||||
GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache
|
||||
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
|
||||
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
|
||||
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)
|
||||
GOARCH ?= amd64
|
||||
|
||||
.PHONY: build-in-docker build clean src-clean
|
||||
|
||||
@@ -12,14 +14,14 @@ build: $(BUILD)
|
||||
build-in-docker: clean
|
||||
mkdir -p /tmp/dokku-go-build-cache
|
||||
docker run --rm \
|
||||
-v $$PWD/../..:$(GO_REPO_ROOT) \
|
||||
-v $(GO_ROOT_MOUNT) \
|
||||
-v $(GO_BUILD_CACHE):/root/.cache \
|
||||
-v $(GO_MOD_CACHE):/go/pkg/mod \
|
||||
-e PLUGIN_NAME=$(PLUGIN_NAME) \
|
||||
-e GO111MODULE=on \
|
||||
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
|
||||
$(BUILD_IMAGE) \
|
||||
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
|
||||
bash -c "GO_ARGS='$(GO_ARGS)' CGO_ENABLED=0 GOOS=linux GOARCH=$(GOARCH) make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM dokku/build-base:0.0.1
|
||||
FROM dokku/build-base:0.0.1 AS builder
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@@ -8,8 +8,8 @@ RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
ARG GOLANG_VERSION
|
||||
|
||||
RUN wget -qO /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz \
|
||||
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz \
|
||||
&& cp /usr/local/go/bin/* /usr/local/bin
|
||||
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz \
|
||||
&& cp /usr/local/go/bin/* /usr/local/bin
|
||||
|
||||
ARG WORKDIR=/go/src/github.com/dokku/dokku
|
||||
|
||||
@@ -22,19 +22,41 @@ RUN make deb-setup rpm-setup sshcommand plugn
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
||||
ENV GOPATH=/go
|
||||
|
||||
FROM builder as amd64
|
||||
|
||||
ARG PLUGIN_MAKE_TARGET
|
||||
ARG DOKKU_VERSION=master
|
||||
ARG DOKKU_GIT_REV
|
||||
ARG IS_RELEASE=false
|
||||
|
||||
ENV GOPATH=/go
|
||||
RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
DOKKU_VERSION=${DOKKU_VERSION} \
|
||||
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
make version copyfiles \
|
||||
&& make deb-dokku rpm-dokku
|
||||
|
||||
FROM builder as armhf
|
||||
|
||||
COPY --from=amd64 /tmp /tmp
|
||||
COPY --from=amd64 /usr/local/share/man/man1/dokku.1 /usr/local/share/man/man1/dokku.1-generated
|
||||
|
||||
RUN rm -rf /tmp/build-dokku
|
||||
|
||||
ARG PLUGIN_MAKE_TARGET
|
||||
ARG DOKKU_VERSION=master
|
||||
ARG DOKKU_GIT_REV
|
||||
ARG IS_RELEASE=false
|
||||
|
||||
RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
DOKKU_VERSION=${DOKKU_VERSION} \
|
||||
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
make version copyfiles \
|
||||
&& make deb-dokku rpm-dokku
|
||||
DOKKU_VERSION=${DOKKU_VERSION} \
|
||||
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
GOARCH=arm make version copyfiles \
|
||||
&& DOKKU_ARCHITECTURE=armhf GOARCH=arm make deb-dokku
|
||||
|
||||
RUN ls -lha /tmp/
|
||||
|
||||
@@ -55,7 +55,7 @@ fn-dokku-host() {
|
||||
fi
|
||||
|
||||
if [[ -z "$DOKKU_HOST" ]]; then
|
||||
fn-client-help-msg
|
||||
return
|
||||
fi
|
||||
|
||||
echo "$DOKKU_HOST"
|
||||
@@ -100,11 +100,14 @@ main() {
|
||||
done
|
||||
|
||||
DOKKU_REMOTE_HOST="$(fn-dokku-host "$DOKKU_GIT_REMOTE" "$DOKKU_HOST")"
|
||||
if [[ -z "$DOKKU_REMOTE_HOST" ]]; then
|
||||
fn-client-help-msg
|
||||
fi
|
||||
|
||||
if [[ -z "$APP" ]]; then
|
||||
if [[ -d .git ]] || git rev-parse --git-dir >/dev/null 2>&1; then
|
||||
set +e
|
||||
APP=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
||||
APP=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
||||
set -e
|
||||
else
|
||||
echo " ! This is not a git repository" 1>&2
|
||||
|
||||
@@ -49,6 +49,7 @@ fn-build-dokku() {
|
||||
--build-arg IS_RELEASE="$IS_RELEASE" \
|
||||
--build-arg PLUGIN_MAKE_TARGET="build" \
|
||||
--build-arg GOLANG_VERSION="$GOLANG_VERSION" \
|
||||
--progress plain \
|
||||
-f "contrib/build-dokku.Dockerfile" \
|
||||
-t "$NAME" .
|
||||
return "$?"
|
||||
@@ -134,8 +135,19 @@ fn-publish-package() {
|
||||
|
||||
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
[[ "$RELEASE_TYPE" == "raspbian" ]] && DIST=raspbian
|
||||
|
||||
if [[ "$DIST" == "ubuntu" ]]; then
|
||||
if [[ "$RELEASE_TYPE" == "raspbian" ]]; then
|
||||
OS_IDS=("buster")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing deb to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
ex="$?"
|
||||
if [[ "$ex" -ne "0" ]]; then
|
||||
EXIT_CODE="$ex"
|
||||
fi
|
||||
done
|
||||
elif [[ "$DIST" == "ubuntu" ]]; then
|
||||
OS_IDS=("bionic" "focal")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
@@ -147,7 +159,7 @@ fn-publish-package() {
|
||||
done
|
||||
|
||||
DIST=debian
|
||||
OS_IDS=("stretch" "buster")
|
||||
OS_IDS=("stretch" "buster" "bullseye")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
@@ -379,11 +391,13 @@ main() {
|
||||
|
||||
fn-repo-update "$IS_RELEASE" "$CURRENT_VERSION" "$NEXT_VERSION"
|
||||
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION" || log-fail "Error building package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_armhf.deb" || log-fail "Error extracting deb package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
|
||||
cp -f "build/dokku_${NEXT_VERSION}_amd64.deb" build/dokku.deb
|
||||
|
||||
if [[ "$RELEASE" != "build" ]]; then
|
||||
fn-publish-package "$IS_RELEASE" "raspbian" "build/dokku_${NEXT_VERSION}_armhf.deb" || log-fail "Error publishing deb package"
|
||||
fn-publish-package "$IS_RELEASE" "deb" "build/dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
|
||||
fn-publish-package "$IS_RELEASE" "rpm" "build/dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
|
||||
fn-build-docker-image "$NEXT_VERSION" || log-fail "Error building docker image"
|
||||
|
||||
11
deb.mk
11
deb.mk
@@ -1,8 +1,7 @@
|
||||
BUILD_DIRECTORY ?= /tmp
|
||||
|
||||
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE = amd64
|
||||
BUILD_DIRECTORY ?= /tmp
|
||||
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE ?= amd64
|
||||
|
||||
ifndef IS_RELEASE
|
||||
IS_RELEASE = true
|
||||
@@ -45,9 +44,9 @@ ifneq (,$(findstring false,$(IS_RELEASE)))
|
||||
endif
|
||||
|
||||
cp -r debian /tmp/build-dokku/DEBIAN
|
||||
sed -i.bak "s/^Architecture: .*/Architecture: $(DOKKU_ARCHITECTURE)/g" /tmp/build-dokku/DEBIAN/control && rm /tmp/build-dokku/DEBIAN/control.bak
|
||||
rm -f /tmp/build-dokku/DEBIAN/lintian-overrides
|
||||
cp debian/lintian-overrides /tmp/build-dokku/usr/share/lintian/overrides/dokku
|
||||
sed -i.bak "s/^Version: .*/Version: `cat /tmp/build-dokku/var/lib/dokku/STABLE_VERSION`/g" /tmp/build-dokku/DEBIAN/control && rm /tmp/build-dokku/DEBIAN/control.bak
|
||||
dpkg-deb --build /tmp/build-dokku "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
lintian "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
|
||||
|
||||
6
debian/control
vendored
6
debian/control
vendored
@@ -1,10 +1,10 @@
|
||||
Package: dokku
|
||||
Version: 0.25.0
|
||||
Version: 0.26.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, netrc, software-properties-common, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsyslog, dos2unix, jq, unzip
|
||||
Recommends: herokuish (>= 0.3.4), bash-completion, parallel, dokku-update, dokku-event-listener
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), net-tools, netrc, software-properties-common, parallel, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip
|
||||
Recommends: herokuish (>= 0.3.4), bash-completion, dokku-update, dokku-event-listener
|
||||
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||
|
||||
@@ -12,9 +12,20 @@ log-fail() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
support-userns() {
|
||||
chown 0:0 /usr/bin/sudo
|
||||
chmod 4755 /usr/bin/sudo
|
||||
chown 0:0 /usr/lib/sudo/sudoers.so
|
||||
chown -R 0:0 /etc/sudoers
|
||||
chown -R 0:0 /etc/sudoers.d
|
||||
chown -R 0:0 /run/sshd
|
||||
}
|
||||
|
||||
main() {
|
||||
local NGINX_ROOT
|
||||
|
||||
support-userns
|
||||
|
||||
if [[ ! -d /mnt/dokku ]]; then
|
||||
log-info "Creating missing /mnt/dokku"
|
||||
mkdir -p /mnt/dokku
|
||||
@@ -51,6 +62,12 @@ main() {
|
||||
echo "export DOCKER_BIN=/usr/local/bin/docker" >"/home/dokku/.dokkurc/DOCKER_BIN"
|
||||
fi
|
||||
|
||||
if [[ -n "$DOKKU_HOST_ROOT" ]]; then
|
||||
touch /etc/default/dokku
|
||||
echo "export DOKKU_HOST_ROOT=$DOKKU_HOST_ROOT" >>/etc/default/dokku
|
||||
chown dokku:dokku /etc/default/dokku
|
||||
fi
|
||||
|
||||
NGINX_ROOT="/etc/nginx"
|
||||
if [[ -x /usr/bin/openresty ]]; then
|
||||
NGINX_ROOT="/usr/local/openresty/nginx/conf"
|
||||
|
||||
@@ -1 +1 @@
|
||||
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-image-labeler
|
||||
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-image-labeler,/usr/bin/pack
|
||||
|
||||
20
docker/usr/local/bin/pack
Executable file
20
docker/usr/local/bin/pack
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
main() {
|
||||
declare desc="re-runs pack commands as sudo"
|
||||
local PACK_BIN=""
|
||||
if [[ -x "/usr/bin/pack" ]]; then
|
||||
PACK_BIN="/usr/bin/pack"
|
||||
fi
|
||||
|
||||
if [[ -z "$PACK_BIN" ]]; then
|
||||
echo "! No pack binary found" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo -E "$PACK_BIN" "$@"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
> New as of 0.3.17
|
||||
|
||||
Pass [options](https://docs.docker.com/engine/reference/run/) to Docker during Dokku's `build`, `deploy` and `run` phases
|
||||
Pass [container options](https://docs.docker.com/engine/reference/run/) to the `docker run` command during Dokku's `build`, `deploy` and `run` phases
|
||||
|
||||
```
|
||||
docker-options:add <app> <phase(s)> OPTION # Add Docker option to app for phase (comma-separated phase list)
|
||||
@@ -29,6 +29,8 @@ Manipulation of docker options will not restart running containers. This enables
|
||||
|
||||
More information on supported Docker options can be found here: https://docs.docker.com/engine/reference/commandline/run/.
|
||||
|
||||
Container options configured via the `docker-options` plugin are not used to modify the process a container runs. Container options are the `[OPTIONS]` portion of the following, where `[CONTAINER_COMMAND]` and `[ARG]` are the process and the arguments passed to it that are launched in the created container: `docker run [OPTIONS] [CONTAINER_COMMAND] [ARG...]`. Please see the documentation for [customizing the run command](/docs/deployment/builders/dockerfiles.md#customizing-the-run-command) or use a [Procfile](/docs/deployment/builders/dockerfiles.md#procfiles-and-multiple-processes) to modify the command used by a Dockerfile-based container.
|
||||
|
||||
## Examples
|
||||
|
||||
### Add Docker options
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
The preferred method to mount external containers to a Dokku managed container, is to use the Dokku storage plugin.
|
||||
|
||||
```
|
||||
storage:list <app> # List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
|
||||
storage:report [<app>] [<flag>] # Displays a checks report for one or more apps
|
||||
storage:unmount <app> <host-dir:container-dir> # Remove an existing bind mount
|
||||
storage:ensure-directory [--chown option] <directory> # Creates a persistent storage directory in the recommended storage path
|
||||
storage:list <app> # List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
|
||||
storage:report [<app>] [<flag>] # Displays a checks report for one or more apps
|
||||
storage:unmount <app> <host-dir:container-dir> # Remove an existing bind mount
|
||||
```
|
||||
|
||||
> The storage plugin is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy/run phase.
|
||||
@@ -20,50 +21,77 @@ The storage plugin supports the following mount points:
|
||||
|
||||
## Usage
|
||||
|
||||
This example demonstrates how to mount the recommended directory to `/storage` inside an application called `node-js-app`. For simplicity, the Dokku project recommends using the directory `/var/lib/dokku/data/storage` directory as the root host path for mounts. This directory is created on Dokku installation.
|
||||
### Creating storage directories
|
||||
|
||||
> New as of 0.25.5
|
||||
|
||||
A storage directory can be created with the `storage:ensure-directory` command. This command will create a subdirectory in the recommended `/var/lib/doku/data/storage` path - created during Dokku installation - and prepare it for use with an app.
|
||||
|
||||
```shell
|
||||
# we use a subdirectory inside of the host directory to scope it to just the app
|
||||
dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage
|
||||
dokku storage:ensure-directory lollipop
|
||||
```
|
||||
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage/node-js-app` to `/storage` inside the container. Mounts are only available for containers crated via `run` and by the deploy process, and not during the build process. In addition, the host path is never auto-created by either Dokku or Docker, and should be an explicit path, not one relative to the current working directory.
|
||||
```
|
||||
-----> Ensuring /var/lib/dokku/data/storage/lollipop exists
|
||||
Setting directory ownership to 32767:32767
|
||||
Directory ready for mounting
|
||||
```
|
||||
|
||||
> If the `/storage` path within the container had pre-existing content, the container files will be overrwritten. This may be an issue for users that create assets at build time but then mount a directory at the same place during runtime. Files are not merged.
|
||||
By default, permissions are set for usage with Herokuish buildpacks. These permissions can be changed via the `--chown` option according to the following table:
|
||||
|
||||
Once you have mounted persistent storage, you will also need to restart the application. See the
|
||||
[process scaling documentation](/docs/processes/process-management.md) for more information.
|
||||
- `--chown herokuish` (default): Use `32767:32767` as the folder permissions.
|
||||
- This is used for apps deployed with Buildpacks via Herokuish.
|
||||
- `--chown heroku`: Use `1000:1000` as the folder permissions.
|
||||
- This is used for apps deployed with Cloud Native Buildpacks using the `heroku/buildpacks` builder.
|
||||
- `--chown packeto`: Use `2000:2000` as the folder permissions.
|
||||
- This is used for apps deployed with Cloud Native Buildpacks using the `cloudfoundry/cnb` or `packeto` builders.
|
||||
- `--chown false`: Skips the `chown` call.
|
||||
|
||||
Users deploying via Dockerfile will want to specify `--chown false` and manually `chown` the created directory if the user and/or group id of the runnning process in the deployed container do not correspond to any of the above options.
|
||||
|
||||
> Warning: Failing to set the correct directory ownership may result in issues in persisting files written to the mounted storage directory.
|
||||
|
||||
### Mounting storage into apps
|
||||
|
||||
Dokku supports mounting both explicit host paths as well as docker volumes via the `storage:mount` command. This takes two arguments, an app name and a `host-path:container-path` or `docker-volume:container-path` combination.
|
||||
|
||||
```shell
|
||||
# mount the directory into your container's /app/storage directory, relative to the container root (/)
|
||||
# explicit host paths _must_ exist prior to usage.
|
||||
dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/app/storage
|
||||
|
||||
# mount the docker volume into your container's /app/storage directory, relative to the container root (/)
|
||||
# docker volumes _must_ exist prior to usage.
|
||||
dokku storage:mount node-js-app some-docker-volume:/app/storage
|
||||
```
|
||||
|
||||
In the first example, Dokku will then mount the shared contents of `/var/lib/dokku/data/storage/node-js-app` to `/app/storage` inside the container. The mount point is *not* relative to your app's working directory, and is instead relative to the root (`/`) of the container. Mounts are only available for containers created via `run` and by the deploy process, and not during the build process. In addition, the host path is never auto-created by either Dokku or Docker, and should be an explicit path, not one relative to the current working directory.
|
||||
|
||||
> If the `/storage` path within the container had pre-existing content, the container files will be over-written. This may be an issue for users that create assets at build time but then mount a directory at the same place during runtime. Files are not merged.
|
||||
|
||||
Once persistent storage is mounted, the app requires a restart. See the [process scaling documentation](/docs/processes/process-management.md) for more information.
|
||||
|
||||
```shell
|
||||
dokku ps:restart app-name
|
||||
```
|
||||
|
||||
A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root (`/`) of the container.
|
||||
### Unmounting storage
|
||||
|
||||
If an app no longer requires a mounted volume or directory, the `storage:unmount` command can be called. This takes the same arguments as the `storage:mount` command, an app name and a `host-path:container-path` or `docker-volume:container-path` combination.
|
||||
|
||||
```shell
|
||||
# creating storage for the app 'node-js-app'
|
||||
mkdir -p /var/lib/dokku/data/storage/node-js-app
|
||||
# unmount the directory from your container's /app/storage directory, relative to the container root (/)
|
||||
dokku storage:unmount node-js-app /var/lib/dokku/data/storage/node-js-app:/app/storage
|
||||
|
||||
# set the directory ownership. Below is an example for herokuish
|
||||
# but see the `Directory Permissions` section for more details
|
||||
chown -R 32767:32767 /var/lib/dokku/data/storage/node-js-app
|
||||
|
||||
# mount the directory into your container's /app/storage directory, relative to root
|
||||
dokku storage:mount app-name /var/lib/dokku/data/storage/node-js-app:/app/storage
|
||||
# unmount the docker volume from your container's /app/storage directory, relative to the container root (/)
|
||||
dokku storage:unmount node-js-app some-docker-volume:/app/storage
|
||||
```
|
||||
|
||||
You can mount one or more directories as desired by following the above pattern.
|
||||
Once persistent storage is unmounted, the app requires a restart. See the [process scaling documentation](/docs/processes/process-management.md) for more information.
|
||||
|
||||
### Directory Permissions
|
||||
|
||||
The host directory should always be owned by the container user and group id. If this is not the case, files may not persist when written to mounted storage.
|
||||
|
||||
- Buildpacks via Herokuish: Use `32767:32767` as the file permissions
|
||||
- For Cloud Native Buildpacks: This will depend on the builder in question, but can be retrieved via the `CNB_USER_ID` and `CNB_GROUP_ID` environment variables on the builder image. Common builders are as follows:
|
||||
- heroku/buildpacks: `1000:1000`
|
||||
- cloudfoundry/cnb: `2000:2000`
|
||||
- packeto: `2000:2000`
|
||||
- Dockerfile and Docker Image: Use the user and group id which corresponds to the one running the process within the container.
|
||||
```shell
|
||||
dokku ps:restart app-name
|
||||
```
|
||||
|
||||
### Displaying storage reports for an app
|
||||
|
||||
@@ -113,7 +141,7 @@ dokku storage:report node-js-app --storage-deploy-mounts
|
||||
|
||||
### Sharing storage across deploys
|
||||
|
||||
Dokku is powered by Docker containers, which recommends in their [best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#containers-should-be-ephemeral) that containers be treated as ephemeral. In order to manage persistent storage for web applications, like user uploads or large binary assets like images, a directory outside the container should be mounted.
|
||||
Dokku is powered by Docker containers, which recommends in their [best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#containers-should-be-ephemeral) that containers be treated as ephemeral. In order to manage persistent storage for web apps, like user uploads or large binary assets like images, a directory outside the container should be mounted.
|
||||
|
||||
### Shared storage between containers
|
||||
|
||||
@@ -139,11 +167,11 @@ You cannot use mounted volumes during the build phase of a Dockerfile deploy. Th
|
||||
|
||||
> Note: **This can cause data loss** if you bind a mount under `/app` in buildpack apps as herokuish will attempt to remove the original app path during the build phase.
|
||||
|
||||
## Application User and Persistent Storage file ownership (buildpack apps only)
|
||||
## App User and Persistent Storage file ownership (buildpack apps only)
|
||||
|
||||
> New as of 0.7.1
|
||||
|
||||
By default, Dokku will execute your buildpack application processes as the `herokuishuser` user. You may override this by setting the `DOKKU_APP_USER` config variable.
|
||||
By default, Dokku will execute your buildpack app processes as the `herokuishuser` user. You may override this by setting the `DOKKU_APP_USER` config variable.
|
||||
|
||||
> NOTE: this user must exist in your herokuish image.
|
||||
|
||||
|
||||
@@ -35,35 +35,35 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.25.0 enabled dokku core standard plugin
|
||||
20_events 0.25.0 enabled dokku core events logging plugin
|
||||
app-json 0.25.0 enabled dokku core app-json plugin
|
||||
apps 0.25.0 enabled dokku core apps plugin
|
||||
build-env 0.25.0 enabled dokku core build-env plugin
|
||||
buildpacks 0.25.0 enabled dokku core buildpacks plugin
|
||||
certs 0.25.0 enabled dokku core certificate management plugin
|
||||
checks 0.25.0 enabled dokku core checks plugin
|
||||
common 0.25.0 enabled dokku core common plugin
|
||||
config 0.25.0 enabled dokku core config plugin
|
||||
docker-options 0.25.0 enabled dokku core docker-options plugin
|
||||
domains 0.25.0 enabled dokku core domains plugin
|
||||
enter 0.25.0 enabled dokku core enter plugin
|
||||
git 0.25.0 enabled dokku core git plugin
|
||||
logs 0.25.0 enabled dokku core logs plugin
|
||||
network 0.25.0 enabled dokku core network plugin
|
||||
nginx-vhosts 0.25.0 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.25.0 enabled dokku core plugin plugin
|
||||
proxy 0.25.0 enabled dokku core proxy plugin
|
||||
ps 0.25.0 enabled dokku core ps plugin
|
||||
repo 0.25.0 enabled dokku core repo plugin
|
||||
resource 0.25.0 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.25.0 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.25.0 enabled dokku core shell plugin
|
||||
ssh-keys 0.25.0 enabled dokku core ssh-keys plugin
|
||||
storage 0.25.0 enabled dokku core storage plugin
|
||||
tags 0.25.0 enabled dokku core tags plugin
|
||||
tar 0.25.0 enabled dokku core tar plugin
|
||||
trace 0.25.0 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.26.2 enabled dokku core standard plugin
|
||||
20_events 0.26.2 enabled dokku core events logging plugin
|
||||
app-json 0.26.2 enabled dokku core app-json plugin
|
||||
apps 0.26.2 enabled dokku core apps plugin
|
||||
build-env 0.26.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.26.2 enabled dokku core buildpacks plugin
|
||||
certs 0.26.2 enabled dokku core certificate management plugin
|
||||
checks 0.26.2 enabled dokku core checks plugin
|
||||
common 0.26.2 enabled dokku core common plugin
|
||||
config 0.26.2 enabled dokku core config plugin
|
||||
docker-options 0.26.2 enabled dokku core docker-options plugin
|
||||
domains 0.26.2 enabled dokku core domains plugin
|
||||
enter 0.26.2 enabled dokku core enter plugin
|
||||
git 0.26.2 enabled dokku core git plugin
|
||||
logs 0.26.2 enabled dokku core logs plugin
|
||||
network 0.26.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.26.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.26.2 enabled dokku core plugin plugin
|
||||
proxy 0.26.2 enabled dokku core proxy plugin
|
||||
ps 0.26.2 enabled dokku core ps plugin
|
||||
repo 0.26.2 enabled dokku core repo plugin
|
||||
resource 0.26.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.26.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.26.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.26.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.26.2 enabled dokku core storage plugin
|
||||
tags 0.26.2 enabled dokku core tags plugin
|
||||
tar 0.26.2 enabled dokku core tar plugin
|
||||
trace 0.26.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.
|
||||
|
||||
@@ -18,13 +18,14 @@ The [dokku-registry](https://github.com/dokku/dokku-registry) plugin is now buil
|
||||
- The `pre-deploy` plugin trigger is now called internally by Dokku. Scheduler plugins should avoid calling this trigger, as any image changes introduced by subsequent trigger calls will be ignored.
|
||||
- The default image used for Herokuish Buildpack builds is now `gliderlabs/herokuish:latest-20`, and is based on both the `heroku-20` stack as well as Ubuntu 20.04. Users that wish to stick with the old, `heroku-18`/Ubuntu 18.04 builder may specify `gliderlabs/herokuish:latest-18` as their builder image. Please see the [herokuish buildpack deployment documentation](/docs/deployment/builders/herokuish-buildpacks.md#customizing-the-buildpack-stack-builder) for more information on how to specify a custom buildpack stack builder.
|
||||
- This change does not impact any users of Cloud Native Buildpacks.
|
||||
- We fixed an issue that required extracting Procfiles at the beginning of a deploy. Due to this change, a `Dockerfile` app contains a `Procfile` that does not specify a `web` process will fail to start. Usage of a `Procfile` with _only_ a `release` command should be replaced with a `scripts.dokku.postdeploy` deployment task in the `app.json` file. The alternative is to define the `web` process in the `Procfile`. See the [deployment task documentation](/docs/advanced-usage/deployment-tasks.md) for more information.
|
||||
|
||||
### Deprecations
|
||||
|
||||
- In previous versions of Dokku, the only way to specify a custom `Dockerfile` was to use the `docker-options` plugin to set the `--file` flag for a docker build. As of 0.25.0, the `builder-dockerfile:set` command should be used instead, as outlined in the [docs here](/docs/deployment/builders/dockerfiles.md#changingthe-dockerfile-location). Usage of the old method should be migrated to the new method.
|
||||
- The `--rm` and ``--rm-container` flags may be specified but no longer have any effect on `dokku run`.
|
||||
- The `--rm` and `--rm-container` flags may be specified but no longer have any effect on `dokku run`.
|
||||
- The `--detach` flag is deprecated in favor of the `run:detached` command.
|
||||
- The `DOKKU_SCALE` file is deprecated. Please see the [process management documentation](/docs/processes/process-management.md#manually-managing-process-scaling) for more information on it's replacement with the `formations` key of the `app.json` file.
|
||||
- The `DOKKU_SCALE` file is deprecated. Please see the [process management documentation](/docs/processes/process-management.md#manually-managing-process-scaling) for more information on it's replacement with the `formation` key of the `app.json` file.
|
||||
- The hooks `post-release-buildpack`, `post-release-dockerfile`, and `post-release-pack` are deprecated in favor of `post-release-builder`. See the [plugin triggers documentation](https://dokku.com/docs/development/plugin-triggers/#post-release-builder) for more details.
|
||||
|
||||
## Removals
|
||||
|
||||
12
docs/appendices/0.26.0-migration-guide.md
Normal file
12
docs/appendices/0.26.0-migration-guide.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# 0.26.0 Migration Guide
|
||||
|
||||
## Removals
|
||||
|
||||
- The `tags` plugin - deprecated in [0.24.0](/docs/appendices/0.24.0-migration-guide.md) - was removed. Users are highly encouraged to switch their workflows to `git:from-image`.
|
||||
- The `tar` plugin - deprecated in [0.24.0](/docs/appendices/0.24.0-migration-guide.md) - was removed. Users are highly encouraged to switch their workflows to `git:from-archive`.
|
||||
|
||||
## Changes
|
||||
|
||||
- The `scheduler` plugin now controls the scheduler in use for deploys. Apps will have their `DOKKU_SCHEDULER` environment variables migrated to the scheduler plugin, after which that value will be removed from said app. Please see the [scheduler documentation](/docs/deployment/schedulers/scheduler-management.md) for more information.
|
||||
- The `deploy-source` metadata from `apps:report` is now no longer computed on the fly, but hydrated at deploy time via the `deploy-source-set` trigger. This value may be empty until your next deploy.
|
||||
- Additionally, the `deploy-source` trigger has now been removed.
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.25.0\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.0\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.0\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.0\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.0\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.0\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -42,13 +42,13 @@ h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.25.0/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -540,7 +540,9 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
bottom: 20px;
|
||||
display: block;
|
||||
left: auto;
|
||||
max-height: 600px;
|
||||
max-width: 300px;
|
||||
overflow: scroll;
|
||||
right: 20px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"0.22.9",
|
||||
"0.23.9",
|
||||
"0.24.10",
|
||||
"0.25.0"
|
||||
"0.25.7",
|
||||
"0.26.2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -243,17 +243,23 @@ dokku apps:report
|
||||
|
||||
```
|
||||
=====> node-js-app app information
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
App created at: 1635126111
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App deploy source metadata: cd7b8afccb202f222e7dc7b427553e71ba5ddafd
|
||||
App locked: false
|
||||
=====> python-sample app information
|
||||
App dir: /home/dokku/python-sample
|
||||
App created at: 1635126000
|
||||
App dir: /home/dokku/python-sample
|
||||
App deploy source:
|
||||
App locked: false
|
||||
App deploy source metadata:
|
||||
App locked: false
|
||||
=====> ruby-sample app information
|
||||
App dir: /home/dokku/ruby-sample
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
App created at: 1635122462
|
||||
App dir: /home/dokku/ruby-sample
|
||||
App deploy source: git
|
||||
App deploy source metadata: c60921ea2799ca108276414b95ea197f16798d51
|
||||
App locked: false
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
@@ -264,9 +270,10 @@ dokku apps:report node-js-app
|
||||
|
||||
```
|
||||
=====> node-js-app app information
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App deploy source metadata: cd7b8afccb202f222e7dc7b427553e71ba5ddafd
|
||||
App locked: false
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
@@ -17,6 +17,7 @@ Dokku supports the following built-in builders:
|
||||
|
||||
- `builder-dockerfile`: Builds apps using a `Dockerfile` via `docker build`. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how this builder functions.
|
||||
- `builder-herokuish`: Builds apps with Heroku's v2a Buildpack specification via `gliderlabs/herokuish`. See the [herokuish builder documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how this builder functions.
|
||||
- `builder-null`: Does nothing during the build phase. See the [null builder documentation](/docs/deployment/builders/null.md) for more information on how this builder functions.
|
||||
- `builder-pack`: Builds apps with Cloud Native Buildpacks via the `pack-cli` tool. See the [cloud native buildpacks builder documentation](/docs/deployment/builders/cloud-native-buildpacks.md) for more information on how this builder functions.
|
||||
|
||||
Builders run a detection script against a source code repository, and the first detected builder will be used to build the app artifact. The exception to this is when a `Dockerfile` is detected and the app is also able to use either `herokuish` or `pack-cli` for building, in which case one of the latter will be chosen.
|
||||
|
||||
@@ -148,12 +148,8 @@ RUN echo $NODE_ENV
|
||||
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. Additionally, complete build log output can be forced via `BUILDKIT_PROGRESS=plain`. Both of these environment variables can be set as follows:
|
||||
|
||||
```shell
|
||||
# via config:set
|
||||
dokku config:set --global DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain
|
||||
|
||||
# on the /etc/default/dokku file
|
||||
echo DOCKER_BUILDKIT=1 | sudo tee -a /etc/default/dokku
|
||||
echo BUILDKIT_PROGRESS=plain | sudo tee -a /etc/default/dokku
|
||||
echo "export DOCKER_BUILDKIT=1" | sudo tee -a /etc/default/dokku
|
||||
echo "export BUILDKIT_PROGRESS=plain" | sudo tee -a /etc/default/dokku
|
||||
```
|
||||
|
||||
#### Buildkit directory caching
|
||||
|
||||
@@ -37,7 +37,7 @@ You can use these modifiers as follows:
|
||||
dokku logs node-js-app -t -p web
|
||||
```
|
||||
|
||||
will show logs continually from the web process.
|
||||
The above command will show logs continually from the web process.
|
||||
|
||||
### Failed deploy logs
|
||||
|
||||
@@ -127,6 +127,29 @@ dokku logs:vector-stop
|
||||
|
||||
The `vector` container will be stopped and removed from the system. If the container is not running, this command will do nothing.
|
||||
|
||||
#### Checking Vector's Logs
|
||||
|
||||
It may be necessary to check the vector container's logs to ensure that vector is operating as expected. This can be performed with the `logs:vector-logs` command.
|
||||
|
||||
```shell
|
||||
dokku logs:vector-logs
|
||||
```
|
||||
|
||||
This command also supports the following modifiers:
|
||||
|
||||
```shell
|
||||
--num NUM # the number of lines to display
|
||||
--tail # continually stream logs
|
||||
```
|
||||
|
||||
You can use these modifiers as follows:
|
||||
|
||||
```shell
|
||||
dokku logs:vector-logs --tail --num 10
|
||||
```
|
||||
|
||||
The above command will show logs continually from the vector container, with an initial history of 10 log lines
|
||||
|
||||
#### Configuring a log sink
|
||||
|
||||
Vector uses the concept of log "sinks" to send logs to a given endpoint. Log sinks may be configured globally or on a per-app basis by specifying a `vector-sink` in DSN form with the `logs:set` command. Specifying a sink value will reload any running vector container.
|
||||
@@ -174,4 +197,13 @@ Valid values for `SINK_TYPE` include all log vector log sinks, while `SINK_OPTIO
|
||||
- `[int]`: form: `key[]=int`
|
||||
- `table`: form: `option[key]=value`
|
||||
|
||||
For some sinks - such as the `http` sink - it may be useful to use special characters such as `&`. These characters must be url escaped as per [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986.html).
|
||||
|
||||
```shell
|
||||
# the following command will set the `http` sink with a uri config value
|
||||
# for a uri config value: https://loggerservice.com:1234/?token=abc1234&type=vector
|
||||
# the url quoted version: https%3A//loggerservice.com%3A1234/%3Ftoken%3Dabc1234%26type%3Dvector
|
||||
dokku logs:set test vector-sink "http://?uri=https%3A//loggerservice.com%3A1234/%3Ftoken%3Dabc1234%26type%3Dvector"
|
||||
```
|
||||
|
||||
Please read the [sink documentation](https://vector.dev/docs/reference/sinks/) for your sink of choice to configure the sink as desired.
|
||||
|
||||
@@ -135,7 +135,18 @@ In the above example, Dokku will build the app as if the repository contained _o
|
||||
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.
|
||||
Triggering a build with the same arguments multiple times will result in Dokku exiting `0` early as there will be no changes detected. If the image tag is reused but the underlying image is different, it is recommended to use the image digest instead of the tag. This can be retrieved via the following command:
|
||||
|
||||
```shell
|
||||
docker inspect --format='{{index .RepoDigests 0}}' $IMAGE_NAME
|
||||
```
|
||||
|
||||
The resulting `git:from-image` call would then be:
|
||||
|
||||
```shell
|
||||
# where the image sha is: sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
|
||||
dokku git:from-image node-js-app dokku/node-js-getting-started:@sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
@@ -143,6 +154,8 @@ The `git:from-image` command can optionally take a git `user.name` and `user.ema
|
||||
dokku git:from-image node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
|
||||
```
|
||||
|
||||
If the image is a private image that requires a docker login to access, the `registry:login` command should be used to log into the registry. See the [registry documentation](/docs/advanced-usage/registry-management.md#logging-into-a-registry) for more details on this process.
|
||||
|
||||
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
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
# Docker Image Tag Deployment
|
||||
|
||||
> Warning: As of 0.24.0, this functionality is deprecated in favor of the [`git:from-image`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-a-docker-image) command. It will be removed in a future release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-image`.
|
||||
>
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
tags <app> # List all app image tags
|
||||
tags:create <app> <tag> # Add tag to latest running app image
|
||||
tags:deploy <app> <tag> # Deploy tagged app image
|
||||
tags:destroy <app> <tag> # Remove app image tag
|
||||
```
|
||||
|
||||
The Dokku tags plugin allows you to add Docker image tags to the currently deployed app image for versioning and subsequent deployment.
|
||||
|
||||
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tags` plugin, the following may occur:
|
||||
>
|
||||
> - Applications previously deployed via another method (`git`/`tar`): The application may revert to a state before the latest custom image tag was deployed.
|
||||
> - Applications that were only ever deployed via the `tags` plugin: No action will be taken against your application.
|
||||
>
|
||||
> Please use the `tags:deploy` command when redeploying an application deployed via Docker image.
|
||||
|
||||
## Usage
|
||||
|
||||
### Exposed ports
|
||||
|
||||
See the [port management documentation](/docs/networking/port-management.md) for more information on how Dokku exposes ports for applications and how you can configure these for your app.
|
||||
|
||||
### Listing tags for an application
|
||||
|
||||
For example, you can list all tags for a given application:
|
||||
|
||||
```shell
|
||||
dokku tags node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
```
|
||||
|
||||
### Creating a tag
|
||||
|
||||
You can also create new tags for that app using the `tags:create` function. Tags should conform to the Docker tagging specification for your Docker version. As of 1.10, that specification is available [here](https://github.com/docker/docker/blob/master/image/spec/v1.1.md), while users of older versions can check the documentation [here](https://github.com/docker/docker/blob/master/image/spec/v1.md).
|
||||
|
||||
```shell
|
||||
dokku tags:create node-js-app v1
|
||||
```
|
||||
|
||||
```
|
||||
=====> Added v1 tag to dokku/node-js-app
|
||||
```
|
||||
|
||||
Once the tag is created, you can see the output by running the `tags` command again.
|
||||
|
||||
```shell
|
||||
dokku tags node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
dokku/node-js-app v1 936a42f25901 About a minute ago 1.025 GB
|
||||
```
|
||||
|
||||
### Deploying an image tag
|
||||
|
||||
Finally, you can also deploy a local image using the `tags:deploy` command. When specifying a tag that is not `latest`, the released image will be retagged as the `latest` image tag for the app.
|
||||
|
||||
> Warning: For images based on Herokuish, using the `tags:deploy` command will reset environment variables written into the image, causing a retag to occur. This will - on average - add two extra layers to your deployed image. Note that this does not affect Dockerfile-based images, which are the majority of images deployed via the `tags` command.
|
||||
|
||||
```shell
|
||||
dokku tags:deploy node-js-app v1
|
||||
```
|
||||
|
||||
```
|
||||
-----> Releasing node-js-app (dokku/node-js-app:v1)...
|
||||
-----> Deploying node-js-app (dokku/node-js-app:v1)...
|
||||
-----> Running pre-flight checks
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
=====> node-js-app container output:
|
||||
Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
|
||||
Recommending WEB_CONCURRENCY=1
|
||||
> node-js-app@0.1.0 start /app
|
||||
> node index.js
|
||||
Node app is running at localhost:5000
|
||||
=====> end node-js-app container output
|
||||
-----> Running post-deploy
|
||||
-----> Configuring node-js-app.dokku.me...
|
||||
-----> Creating http nginx.conf
|
||||
Reloading nginx
|
||||
-----> Shutting down old containers in 60 seconds
|
||||
=====> 025eec3fa3b442fded90933d58d8ed8422901f0449f5ea0c23d00515af5d3137
|
||||
=====> Application deployed:
|
||||
http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
## Image workflows
|
||||
|
||||
### Deploying from a Docker registry
|
||||
|
||||
You can alternatively add image pulled from a Docker registry and deploy from it by using tagging feature. In this example, we are deploying from Docker Hub.
|
||||
|
||||
1. Create Dokku app as usual.
|
||||
|
||||
```shell
|
||||
dokku apps:create test-app
|
||||
```
|
||||
|
||||
2. Pull image from Docker Hub.
|
||||
|
||||
```shell
|
||||
docker pull demo-repo/some-image:v12
|
||||
```
|
||||
|
||||
3. Retag the image to match the created app.
|
||||
|
||||
```shell
|
||||
docker tag demo-repo/some-image:v12 dokku/test-app:v12
|
||||
```
|
||||
|
||||
4. Deploy tag.
|
||||
|
||||
```shell
|
||||
dokku tags:deploy test-app v12
|
||||
```
|
||||
|
||||
### Deploying an image from CI
|
||||
|
||||
To ensure your builds are always reproducible, it's considered bad practice to store build
|
||||
artifacts in your repository. For some projects however, building artifacts during deployment
|
||||
to Dokku may affect the performance of running applications.
|
||||
|
||||
One solution is to build a finished Docker image on a CI service (or even locally) and deploy
|
||||
it directly to the host running Dokku.
|
||||
|
||||
1. Build image on CI (or locally).
|
||||
|
||||
```shell
|
||||
docker build -t dokku/test-app:v12 .
|
||||
# Note: The image must be tagged `dokku/<app-name>:<version>`
|
||||
```
|
||||
|
||||
2. Deploy image to Dokku host.
|
||||
|
||||
```shell
|
||||
docker save dokku/test-app:v12 | ssh my.dokku.host "docker load | dokku tags:deploy test-app v12"
|
||||
```
|
||||
|
||||
> Note: You can also use a Docker registry to push and pull
|
||||
> the image rather than uploading it directly.
|
||||
|
||||
Here's a more complete example using the above method:
|
||||
|
||||
```shell
|
||||
# build the image
|
||||
docker build -t dokku/test-app:v12 .
|
||||
# copy the image to the dokku host
|
||||
docker save dokku/test-app:v12 | bzip2 | ssh my.dokku.host "bunzip2 | docker load"
|
||||
# tag and deploy the image
|
||||
ssh my.dokku.host "dokku tags:create test-app previous; dokku tags:deploy test-app v12"
|
||||
```
|
||||
|
||||
## Related articles
|
||||
- [Setting up persistent storage](/docs/advanced-usage/persistent-storage.md)
|
||||
- [Defining environment variables](/docs/configuration/environment-variables.md)
|
||||
- [Setting up the ports](/docs/networking/proxy-management.md)
|
||||
@@ -1,38 +0,0 @@
|
||||
# Tarball Deployment
|
||||
|
||||
> Warning: As of 0.24.0, this functionality is deprecated in favor of the [`git:from-archive`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-an-archive-file) command. It will be removed in a future release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-arhive`.
|
||||
>
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
tar:from <app> <url> # Loads an app tarball from url
|
||||
tar:in <app> # Reads an tarball containing the app from stdin
|
||||
```
|
||||
|
||||
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tar` plugin, the following may occur:
|
||||
>
|
||||
> - Applications previously deployed via another method (`git`): The application may revert to a state before the latest custom image tag was deployed.
|
||||
> - Applications that were only ever deployed via the `tar` plugin: The application will be properly rebuilt.
|
||||
>
|
||||
> Please use the appropriate `tar` command when redeploying an application deployed via tarball.
|
||||
|
||||
## Usage
|
||||
|
||||
### Deploying from a tarball
|
||||
|
||||
In some cases, it may be useful to deploy an application from a tarball. For instance, if you implemented a non-Git based deployment plugin, tarring the generated artifact may be an easier route to interface with the existing Dokku infrastructure.
|
||||
|
||||
You can place the tarball on an external webserver and deploy via the `tar:from` command.
|
||||
|
||||
```shell
|
||||
dokku tar:from node-js-app https://dokku.me/releases/node-js-app/v1
|
||||
```
|
||||
|
||||
### Deploying via stdin
|
||||
|
||||
As an alternative, a deploy can be trigged from a tarball read from stdin using the `tar:in` command:
|
||||
|
||||
```shell
|
||||
# run from the generated artifact directory
|
||||
tar c . $* | dokku tar:in node-js-app
|
||||
```
|
||||
@@ -1,10 +0,0 @@
|
||||
# Alternative Schedulers
|
||||
|
||||
In addition to the built-in [docker-local scheduler](/docs/advanced-usage/schedulers/docker-local.md), Dokku also supports two scheduler plugins:
|
||||
|
||||
- [Kubernetes](https://github.com/dokku/dokku-scheduler-kubernetes)
|
||||
- [Nomad](https://github.com/dokku/dokku-scheduler-nomad)
|
||||
|
||||
These scheduler implementations may not be complete, though provide enough functionality for a user to get an app deployed via the underlying scheduler.
|
||||
|
||||
For users that require additional functionality, please refer to the [Sponsoring Documentation](https://github.com/dokku/.github/blob/master/SPONSORING.md).
|
||||
@@ -37,30 +37,73 @@ Once set, you may re-enable it by setting a blank value for `disable-chown`:
|
||||
dokku scheduler-docker-local:set node-js-app disable-chown
|
||||
```
|
||||
|
||||
### Deploying Process Types in Parallel
|
||||
|
||||
> New as of 0.25.5
|
||||
|
||||
By default, Dokku deploys an app's processes one-by-one in order, with the `web` process being deployed first. Deployment parallelism may be achieved by setting the `parallel-schedule-count` property, which defaults to `1`. Increasing this number increases the number of process types that may be deployed in parallel (with the web process being the exception).
|
||||
|
||||
```shell
|
||||
# Increase parallelism from 1 process type at a time to 4 process types at a time.
|
||||
dokku scheduler-docker-local:set node-js-app parallel-schedule-count 4
|
||||
```
|
||||
|
||||
Once set, you may reset it by setting a blank value for `parallel-schedule-count`:
|
||||
|
||||
```shell
|
||||
dokku scheduler-docker-local:set node-js-app parallel-schedule-count
|
||||
```
|
||||
|
||||
If the value of `parallel-schedule-count` is increased and a given process type fails to schedule successfully, then any in-flight process types will continue to be processed, while all process types that have not been scheduled will be skipped before the deployment finally fails.
|
||||
|
||||
Container scheduling output is shown in the order it is received, and thus may be out of order in case of output to stderr.
|
||||
|
||||
Note that increasing the value of `parallel-schedule-count` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.
|
||||
|
||||
#### Increasing parallelism within a process deploy
|
||||
|
||||
> New as of 0.26.0
|
||||
|
||||
By default, Dokku will deploy one instance of a given process type at a time. This can be increased by customizing the `app.json` `formation` key to include a `max_parallel` key for the given process type.
|
||||
|
||||
An `app.json` file can be committed to the root of the pushed app repository, and must be within the built image artifact in the image's working directory as shown below.
|
||||
|
||||
- Buildpacks: `/app/app.json`
|
||||
- Dockerfile: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
||||
- Docker Image: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
||||
|
||||
The `formation` key should be specified as follows in the `app.json` file:
|
||||
|
||||
```Procfile
|
||||
{
|
||||
"formation": {
|
||||
"web": {
|
||||
"max_parallel": 1
|
||||
},
|
||||
"worker": {
|
||||
"max_parallel": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Omitting or removing the entry will result in parallelism for that process type to return to 1 entry at a time. This can be combined with the `parallel-schedule-count` property to speed up deployments.
|
||||
|
||||
Note that increasing the value of `max_parallel` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.
|
||||
|
||||
## Implemented Triggers
|
||||
|
||||
This plugin implements various functionality through `plugn` triggers to integrate with Docker for running apps on a single server. The following functionality is supported by the `scheduler-docker-local` plugin.
|
||||
|
||||
- `check-deploy`
|
||||
- `core-post-deploy`
|
||||
- `post-app-clone-setup`
|
||||
- `post-app-rename-setup`
|
||||
- `post-create`
|
||||
- `post-delete`
|
||||
- `pre-deploy`
|
||||
- `pre-restore`
|
||||
- `scheduler-app-status`
|
||||
- `scheduler-deploy`
|
||||
- `scheduler-docker-cleanup`
|
||||
- `scheduler-inspect`
|
||||
- `scheduler-is-deployed`
|
||||
- `scheduler-logs`
|
||||
- `scheduler-logs-failed`
|
||||
- `scheduler-retire`
|
||||
- `scheduler-run`
|
||||
- `scheduler-stop`
|
||||
- `scheduler-tags-create`
|
||||
- `scheduler-tags-destroy`
|
||||
- `apps:clone`
|
||||
- `apps:destroy`
|
||||
- `apps:rename`
|
||||
- `deploy`
|
||||
- `enter`
|
||||
- `logs`
|
||||
- `ps:inspect`
|
||||
- `ps:stop`
|
||||
- `run`
|
||||
|
||||
## Supported Resource Management Properties
|
||||
|
||||
|
||||
14
docs/deployment/schedulers/kubernetes.md
Normal file
14
docs/deployment/schedulers/kubernetes.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Kubernetes Scheduler
|
||||
|
||||
> Warning: This scheduler is not in Dokku core and thus is considered experimental.
|
||||
|
||||
The [Kubernetes Scheduler Plugin](https://github.com/dokku/dokku-scheduler-kubernetes) implements the following functionality:
|
||||
|
||||
- `apps:destroy`
|
||||
- `deploy`: partial, does not implement failed deploy log capture
|
||||
- `logs`: partial, does not implement failure logs
|
||||
- `ps:stop`
|
||||
|
||||
Please see the plugin's [issue tracker](https://github.com/dokku/dokku-scheduler-kubernetes/issues) for more information on the status of the plugin.
|
||||
|
||||
For users that require additional functionality, please refer to the [Sponsoring Documentation](https://github.com/dokku/.github/blob/master/SPONSORING.md).
|
||||
13
docs/deployment/schedulers/nomad.md
Normal file
13
docs/deployment/schedulers/nomad.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Nomad Scheduler
|
||||
|
||||
> Warning: This scheduler is not in Dokku core and thus is considered experimental.
|
||||
|
||||
The [Nomad Scheduler Plugin](https://github.com/dokku/dokku-scheduler-nomad) implements the following functionality:
|
||||
|
||||
- `apps:destroy`
|
||||
- `deploy`
|
||||
- `ps:stop`
|
||||
|
||||
Please see the plugin's [issue tracker](https://github.com/dokku/dokku-scheduler-nomad/issues) for more information on the status of the plugin.
|
||||
|
||||
For users that require additional functionality, please refer to the [Sponsoring Documentation](https://github.com/dokku/.github/blob/master/SPONSORING.md).
|
||||
@@ -8,8 +8,8 @@ The `null` scheduler does nothing, and is useful for routing to services not man
|
||||
|
||||
### Detection
|
||||
|
||||
This scheduler is _never_ auto-detected. The scheduler _must_ be specified via the `config:set` command:
|
||||
This scheduler is _never_ auto-detected. The scheduler _must_ be specified via the `scheduler:set` command:
|
||||
|
||||
```shell
|
||||
dokku config:set node-js-app DOCKER_SCHEDULER=null
|
||||
dokku scheduler:set node-js-app selected null
|
||||
```
|
||||
|
||||
118
docs/deployment/schedulers/scheduler-management.md
Normal file
118
docs/deployment/schedulers/scheduler-management.md
Normal file
@@ -0,0 +1,118 @@
|
||||
# Scheduler Management
|
||||
|
||||
> New as of 0.26.0
|
||||
|
||||
```
|
||||
scheduler:report [<app>] [<flag>] # Displays a scheduler report for one or more apps
|
||||
scheduler:set <app> <key> (<value>) # Set or clear a scheduler property for an app
|
||||
```
|
||||
|
||||
Schedulers are a way of customizing how an app image is deployed, and can be used to interact with non-local systems such as Kubernetes and Nomad.
|
||||
|
||||
## Usage
|
||||
|
||||
### Scheduler selection
|
||||
|
||||
Dokku supports the following built-in schedulers:
|
||||
|
||||
- `scheduler-docker-local`: Schedules apps against the local docker socket and runs containers directly on the Dokku host. See the [docker-local scheduler documentation](/docs/deployment/schedulers/docker-local.md) for more information on how this scheduler functions.
|
||||
- `scheduler-null`: Does nothing during the scheduler phase. See the [null scheduler documentation](/docs/deployment/schedulers/null.md) for more information on how this scheduler functions.
|
||||
|
||||
See the [alternate schedulers documentation](/docs/deployment/schedulers/alternate-schedulers.md) for more information on other scheduler plugins.
|
||||
|
||||
### Overriding the auto-selected scheduler
|
||||
|
||||
If desired, the scheduler can be specified via the `scheduler:set` command by speifying a value for `selected`. The selected scheduler will always be used.
|
||||
|
||||
```shell
|
||||
dokku scheduler:set node-js-app selected docker-local
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku scheduler:set node-js-app selected
|
||||
```
|
||||
|
||||
The `selected` property can also be set globally. The global default is an empty string, and auto-detection will be performed when no value is set per-app or globally.
|
||||
|
||||
```shell
|
||||
dokku scheduler:set --global selected docker-local
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku scheduler:set --global selected
|
||||
```
|
||||
|
||||
### Displaying scheduler reports for an app
|
||||
|
||||
You can get a report about the app's scheduler status using the `scheduler:report` command:
|
||||
|
||||
```shell
|
||||
dokku scheduler:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app scheduler information
|
||||
Scheduler computed selected: herokuish
|
||||
Scheduler global selected: herokuish
|
||||
Scheduler selected: herokuish
|
||||
=====> python-sample scheduler information
|
||||
Scheduler computed selected: dockerfile
|
||||
Scheduler global selected: herokuish
|
||||
Scheduler selected: dockerfile
|
||||
=====> ruby-sample scheduler information
|
||||
Scheduler computed selected: herokuish
|
||||
Scheduler global selected: herokuish
|
||||
Scheduler selected:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku scheduler:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app scheduler information
|
||||
Scheduler selected: herokuish
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku scheduler:report node-js-app --scheduler-selected
|
||||
```
|
||||
|
||||
## Implementing a Scheduler
|
||||
|
||||
Custom plugins names _must_ have the prefix `scheduler-` or scheduler overriding via `scheduler:set` may not function as expected.
|
||||
|
||||
At this time, the following dokku commands are used to implement a complete scheduler.
|
||||
|
||||
- `apps:destroy`: stops the app processes on the scheduler
|
||||
- triggers: post-delete, scheduler-register-retired, scheduler-retire
|
||||
- `apps:rename`: handles app renaming
|
||||
- triggers: post-app-rename-setup
|
||||
- `apps:clone`: handles app cloning
|
||||
- triggers: post-app-clone-setup
|
||||
- `deploy`: deploys app proceses and checks the status of a deploy
|
||||
- triggers: scheduler-app-status, scheduler-deploy, scheduler-is-deployed, scheduler-logs-failed
|
||||
- `enter`: enters a running container
|
||||
- triggers: scheduler-enter
|
||||
- `logs`: fetches app logs
|
||||
- triggers: scheduler-logs
|
||||
- `run`: starts one-off run containers (detached and non-detached) as well as listing run processes
|
||||
- triggers: scheduler-run, scheduler-run-list
|
||||
- `ps:stop`: stops app processes
|
||||
- triggers: scheduler-stop
|
||||
- `ps:inspect`: outputs inspect output for processes in an app
|
||||
- triggers: scheduler-inspect
|
||||
|
||||
Schedulers may decide to omit some functionality here, or use plugin triggers to supplement config with information from other plugins. Additionally, a scheduler may implement other triggers in order handle any extra processes needed during a deploy.
|
||||
|
||||
Schedulers can use any tools available on the system to build the docker image, and may even be used to interact with off-server systems. The only current requirement is that the scheduler must have access to the image built in the build phase. If this is not the case, the registry plugin can be used to push the image to a registry that the scheduler software can access.
|
||||
|
||||
Deployment tasks are currently executed directly on the primary Dokku server.
|
||||
@@ -74,6 +74,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-json-process-deploy-parallelism`
|
||||
|
||||
- Description: Decides the parallelism to use when deploying a given process type. The default is 1 process entry at a type.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP $PROCESS_TYPE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-maybe-create`
|
||||
|
||||
- Description: Creates an app (gated by whether this is globally enabled or not)
|
||||
@@ -346,8 +361,8 @@ curl "http://httpstat.us/200"
|
||||
|
||||
> To avoid issues with community plugins, this plugin trigger should be used _only_ for core plugins. Please avoid using this trigger in your own plugins.
|
||||
|
||||
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git/tarball but _before_ the image source type is detected.
|
||||
- Invoked by: `dokku tar:in`, `dokku tar:from` and the `receive-app` plugin trigger
|
||||
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git but _before_ the image source type is detected.
|
||||
- Invoked by: The `receive-app` plugin trigger
|
||||
- Arguments: `$APP` `$TMP_WORK_DIR` `$REV`
|
||||
- Example:
|
||||
|
||||
@@ -418,7 +433,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian|ubuntu)
|
||||
debian|raspbian|ubuntu)
|
||||
apt-get -qq -y --no-install-recommends install nginx
|
||||
;;
|
||||
|
||||
@@ -428,31 +443,22 @@ case "$DOKKU_DISTRO" in
|
||||
esac
|
||||
```
|
||||
|
||||
### `deploy-source`
|
||||
### `deploy`
|
||||
|
||||
- Description: Used for reporting what the current detected deployment source is. The first detected source should always win.
|
||||
- Invoked by: `dokku apps:report`
|
||||
- Arguments: `$APP`
|
||||
- Description: Triggers a deploy for the given app. Can override the image tag to deploy, as well as specify a single process type to deploy.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP [$IMAGE_TAG] [$PROC_TYPE]`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Checks if the app should be deployed via git
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
APP="$1"
|
||||
STDIN=$(cat)
|
||||
APP="$1" IMAGE_TAG="$2" PROC_TYPE="$3"
|
||||
|
||||
# bail if another source is detected
|
||||
if [[ -n "$STDIN" ]]; then
|
||||
echo "$STDIN"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -d "$DOKKU_ROOT/$APP/refs" ]]; then
|
||||
echo "git"
|
||||
fi
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `deployed-app-image-repo`
|
||||
@@ -723,6 +729,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-from-archive`
|
||||
|
||||
- Description: Updates an app's git repository from an archive and then triggers a build
|
||||
- Invoked by: `git:from-archive`
|
||||
- Arguments: `$APP $ARCHIVE_URL $ARCHIVE_TYPE $USER_NAME $USER_EMAIL`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-from-directory`
|
||||
|
||||
- Description: Updates an app's git repository from a source directory and then triggers a build
|
||||
@@ -738,6 +759,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-from-image`
|
||||
|
||||
- Description: Updates an app's git repository from a docker image and then triggers a build as necessary
|
||||
- Invoked by: `git:from-image`
|
||||
- Arguments: `$APP $DOCKER_IMAGE $BUILD_DIR $USER_NAME $USER_EMAIL`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-post-pull`
|
||||
|
||||
- Description:
|
||||
@@ -914,7 +950,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
- Description: Return the port for a given app container
|
||||
- Invoked by: `internally triggered by a deploy`
|
||||
- Arguments: `$APP $PROC_TYPE $CONTAINER_ID $IS_HEROKUISH_CONTAINER`
|
||||
- Arguments: `$APP $PROCESS_TYPE $CONTAINER_ID $IS_HEROKUISH_CONTAINER`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -1319,8 +1355,8 @@ sudo service haproxy reload
|
||||
|
||||
### `post-extract`
|
||||
|
||||
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git/tarball but _before_ the image source type is detected.
|
||||
- Invoked by: `dokku tar:in`, `dokku tar:from` and the `receive-app` plugin trigger
|
||||
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git but _before_ the image source type is detected.
|
||||
- Invoked by: The `receive-app` plugin trigger
|
||||
- Arguments: `$APP` `$TMP_WORK_DIR` `$REV`
|
||||
- Example:
|
||||
|
||||
@@ -1674,7 +1710,7 @@ APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
- Description: Allows you to run commands before all containers are restored
|
||||
- Invoked by: `dokku ps:restore`
|
||||
- Arguments: `$DOKKU_SCHEDULER`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -2028,6 +2064,25 @@ DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_TAG="$3";
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-detect`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to check which scheduler is in use for an app
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-enter`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
@@ -2219,44 +2274,6 @@ DOKKU_SCHEDULER="$1"; APP="$2"; REMOVE_CONTAINERS="$3";
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-tags-create`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when a tag is created
|
||||
- Invoked by: `dokku tags:create`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $SOURCE_IMAGE $TARGET_IMAGE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1" APP="$2" SOURCE_IMAGE="$3" TARGET_IMAGE="$4"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-tags-destroy`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when a tag is destroyed
|
||||
- Invoked by: `dokku tags:destroy`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $IMAGE_REPO $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_REPO="$3"; IMAGE_TAG="$4";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `storage-list`
|
||||
|
||||
- Description: Returns a list of storage mounts
|
||||
@@ -2272,41 +2289,6 @@ APP="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
### `tags-create`
|
||||
|
||||
- Description: Allows you to run commands once a tag for an app image has been added
|
||||
- Invoked by: `dokku tags:create`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Upload an app image to docker hub
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
IMAGE_ID=$(docker inspect --format '{{ .Id }}' $IMAGE)
|
||||
docker tag -f $IMAGE_ID $DOCKER_HUB_USER/$APP:$IMAGE_TAG
|
||||
docker push $DOCKER_HUB_USER/$APP:$IMAGE_TAG
|
||||
```
|
||||
|
||||
### `tags-destroy`
|
||||
|
||||
- Description: Allows you to run commands once a tag for an app image has been removed
|
||||
- Invoked by: `dokku tags:destroy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Remove an image tag from docker hub
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; IMAGE_TAG="$2"
|
||||
|
||||
# some code to remove a docker hub tag because it's not implemented in the CLI...
|
||||
```
|
||||
|
||||
### `uninstall`
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ The workflow looks like this:
|
||||
```shell
|
||||
# having dokku-arch in ../dokku-arch
|
||||
vagrant up build-arch
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.25.0-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.26.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,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.25.0
|
||||
docker pull dokku/dokku:0.26.2
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
@@ -11,15 +11,18 @@ Next, run the image.
|
||||
```shell
|
||||
docker container run \
|
||||
--env DOKKU_HOSTNAME=dokku.me \
|
||||
--env DOKKU_HOST_ROOT=/var/lib/dokku/home/dokku \
|
||||
--name dokku \
|
||||
--publish 3022:22 \
|
||||
--publish 8080:80 \
|
||||
--publish 8443:443 \
|
||||
--volume /var/lib/dokku:/mnt/dokku \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
dokku/dokku:0.25.0
|
||||
dokku/dokku:0.26.2
|
||||
```
|
||||
|
||||
The above command will start a new docker container that is ready when a message similar to `Runit started as PID 12345` appears.
|
||||
|
||||
Dokku is run in the following configuration:
|
||||
|
||||
- The global hostname is set to `dokku.me` on boot.
|
||||
@@ -28,7 +31,8 @@ Dokku is run in the following configuration:
|
||||
- Container HTTP port 80 is exposed on the host as 8080.
|
||||
- Container HTTPS port 443 is exposed on the host as 8443.
|
||||
- Data within the container is stored on the host within the `/var/lib/dokku` directory.
|
||||
- The docker socket is mounted into container
|
||||
- Image build cache is set to the data dir + `/home/dokku`.
|
||||
- The docker socket is mounted into container.
|
||||
|
||||
Application repositories, plugin config, as well as plugin data are persisted to disk within the specified host directory for `/var/lib/dokku`.
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ To install the latest stable version of Dokku, you can run the following shell c
|
||||
|
||||
```shell
|
||||
# for debian systems, installs Dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.0/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.25.0 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.2/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.26.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -64,6 +64,25 @@ Save the file and try stopping nginx and starting it again:
|
||||
## * Starting nginx nginx [ OK ]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Using the `EXPOSE` directive in a Dockerfile may be another reason why you might see the default site. When the `EXPOSE` directive is in use and a proxy plugin is enabled (the default), the proxy plugin will listen to requests on the ports specified in the `EXPOSE` stanza.
|
||||
|
||||
For example, if you have an `EXPOSE` directive like so:
|
||||
|
||||
```Dockerfile
|
||||
EXPOSE 8000
|
||||
```
|
||||
|
||||
The proxy port mapping will be `http:8000:8000`.
|
||||
|
||||
To avoid this issue, either of the following can be done:
|
||||
|
||||
- Remove `EXPOSE` directive: This will require respecting the `$PORT` environment variable (automatically set by Dokku). Once that change is deployed, the port mapping should be cleared via the `dokku proxy:ports-clear $APP` command (where `$APP` is your app name).
|
||||
- Update the port mapping: Updating the port mapping to redirect port `80` to your app's exposed port via `dokku proxy:ports-set $APP http:80:$EXPOSED_PORT` can also fix the issue. This will also allow certificate management and the letsencrypt plugin to work correctly.
|
||||
|
||||
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.
|
||||
|
||||
### I want to deploy my app, but while pushing I get the following error
|
||||
|
||||
The following error may be emitted from a deploy:
|
||||
|
||||
@@ -19,6 +19,8 @@ Docker releases updates periodically to their engine. We recommend reading their
|
||||
|
||||
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
|
||||
|
||||
- [Upgrading to 0.26](/docs/appendices/0.26.0-migration-guide.md)
|
||||
- [Upgrading to 0.25](/docs/appendices/0.25.0-migration-guide.md)
|
||||
- [Upgrading to 0.24](/docs/appendices/0.24.0-migration-guide.md)
|
||||
- [Upgrading to 0.23](/docs/appendices/0.23.0-migration-guide.md)
|
||||
- [Upgrading to 0.22](/docs/appendices/0.22.0-migration-guide.md)
|
||||
@@ -69,16 +71,6 @@ new buildpacks that were released:
|
||||
dokku ps:rebuild --all
|
||||
```
|
||||
|
||||
> If you have any applications deployed via the `tags` or `tar` commands, do not run the `ps:rebuild --all` command,
|
||||
> and instead trigger `ps:rebuild` manually for each `git`-deployed application:
|
||||
>
|
||||
> ```
|
||||
> dokku ps:rebuild APP
|
||||
> ```
|
||||
>
|
||||
> Please see the [images documentation](/docs/deployment/methods/images.md) and [tar documentation](/docs/deployment/methods/tar.md)
|
||||
> for instructions on rebuilding applications deployed by those plugins.
|
||||
|
||||
## Upgrading using `dokku-update`
|
||||
|
||||
We provide a helpful binary called `dokku-update`. This is a recommended package that:
|
||||
@@ -87,7 +79,8 @@ We provide a helpful binary called `dokku-update`. This is a recommended package
|
||||
- Automates many of the upgrade instructions for you.
|
||||
- Provides a clean way for us to further enhance the upgrade process in the future.
|
||||
|
||||
When installing from source, this is available from `contrib/dokku-update`, and is also available on Debian and RPM-based systems from our package repositories under the name `dokku-update`.
|
||||
This binary is available on Debian and RPM-based systems from our package repositories under the name `dokku-update`. When installing from source,
|
||||
this is available from a separate Github repository at [dokku/dokku-update](https://github.com/dokku/dokku-update).
|
||||
|
||||
## Upgrading using `apt`
|
||||
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.26.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.25.0/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.25.0/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
</style>
|
||||
@@ -95,15 +95,18 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.25.0/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.26.2/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.25.0 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.26.2 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
<span class="output"> # Configure your server domain via `dokku domains:set-global`</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # and user access (via `dokku ssh-keys:add`) to complete the installation</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -163,7 +166,10 @@
|
||||
<span class="command">dokku plugin:install-dependencies --core <span class="output"># run with root!</span></span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
<span class="output"> # Configure your server domain via `dokku domains:set-global`</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # and user access (via `dokku ssh-keys:add`) to complete the installation</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ dokku apps:create local-app
|
||||
dokku builder:set local-app selected null
|
||||
|
||||
# set the scheduler to the null scheduler, which does nothing
|
||||
dokku config:set local-app DOKKU_SCHEDULER=null
|
||||
dokku scheduler:set local-app selected null
|
||||
|
||||
# set the static-web-listener network property to the ip:port combination for your app.
|
||||
dokku network:set local-app static-web-listener 127.0.0.1:8080
|
||||
@@ -182,7 +182,7 @@ dokku network:set node-js-app attach-post-deploy
|
||||
dokku network:set node-js-app initial-network
|
||||
```
|
||||
|
||||
The network properties can also be set globally. The global default is emty string, and the global value is used when no app-specific value is set.
|
||||
The network properties can also be set globally. The global default value is an empty string, and the global value is used when no app-specific value is set.
|
||||
|
||||
```shell
|
||||
dokku network:set --global attach-post-create global-create-network
|
||||
|
||||
@@ -11,14 +11,26 @@ enter <app> [<container-type> || --container-id <container-id>] # Connect to a
|
||||
The `enter` command can be used to enter a running container. The following variations of the command exist:
|
||||
|
||||
```shell
|
||||
# enter the web process
|
||||
dokku enter node-js-app web
|
||||
|
||||
# enter the first web process
|
||||
dokku enter node-js-app web.1
|
||||
|
||||
# enter a process for an app by container ID
|
||||
dokku enter node-js-app --container-id ID
|
||||
```
|
||||
|
||||
The `container-type` argument can be one either:
|
||||
|
||||
- If your app has a `Procfile`, the name of a process type in your `Procfile`.
|
||||
- If your app has no `Procfile`, the word `web`.
|
||||
|
||||
If the specified process type is scaled up to more than one container, then the first container will be automatically selected. this can be overriden by specifying an integer index denoting the desired container, where the first container's index is `1`.
|
||||
|
||||
Additionally, the `enter` command can be executed with no `<container-type>`. If only a single `<container-type>` is defined in the app's Procfile, executing `enter` will drop the terminal into the only running container. This behavior is not supported when specifying a custom command; as described below.
|
||||
|
||||
By default, it runs a `/bin/bash`, but can also be used to run a custom command:
|
||||
By default, `dokku enter` will run a `/bin/bash`, but can also be used to run custom commands:
|
||||
|
||||
```shell
|
||||
# just echo hi
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
ps:inspect <app> # Displays a sanitized version of docker inspect for an app
|
||||
ps:rebuild [--parallel count] [--all|<app>] # Rebuilds an app from source
|
||||
ps:report [<app>] [<flag>] # Displays a process report for one or more apps
|
||||
ps:restart [--parallel count] [--all|<app>] # Restart an app
|
||||
ps:restart [--parallel count] [--all|<app>] [<process-name>] # Restart an app
|
||||
ps:restore [<app>] # Start previously running apps e.g. after reboot
|
||||
ps:scale [--skip-deploy] <app> <proc>=<count> [<proc>=<count>...] # Get/Set how many instances of a given process to run
|
||||
ps:set <app> <key> <value> # Set or clear a ps property for an app
|
||||
@@ -30,9 +30,6 @@ This command will gather all the running container IDs for your app and call `do
|
||||
|
||||
### Rebuilding apps
|
||||
|
||||
> Warning: This section applies only to git-based deploys, and only works deterministically for these apps. Please see the [images documentation](/docs/deployment/methods/images.md) and [tar documentation](/docs/deployment/methods/tar.md)
|
||||
> in for more information concerning rebuilding those apps.
|
||||
|
||||
It may be useful to rebuild an app at will, such as for commands that do not rebuild an app or when skipping a rebuild after setting multiple config values. For these use cases, the `ps:rebuild` function can be used.
|
||||
|
||||
```shell
|
||||
@@ -67,7 +64,13 @@ An app may be restarted using the `ps:restart` command.
|
||||
dokku ps:restart node-js-app
|
||||
```
|
||||
|
||||
All apps may be restarted by using the `--all` flag.
|
||||
A single process type - such as `web` or `worker` - may also be specified. This _does not_ support specifying a given instance of a process type, and only supports restarting all instances of that process type.
|
||||
|
||||
```shell
|
||||
dokku ps:restart node-js-app web
|
||||
```
|
||||
|
||||
All apps may be restarted by using the `--all` flag. This flag is incompatible with specifying a process type.
|
||||
|
||||
```shell
|
||||
dokku ps:restart --all
|
||||
@@ -106,7 +109,7 @@ web: 1
|
||||
|
||||
#### Via CLI
|
||||
|
||||
> This functionality is disabled if the formation is managed via the `formations` key of `app.json`.
|
||||
> This functionality is disabled if the formation is managed via the `formation` key of `app.json`.
|
||||
|
||||
Dokku can also manage scaling itself via the `ps:scale` command. This command can be used to scale multiple process types at the same time.
|
||||
|
||||
@@ -128,7 +131,7 @@ dokku ps:scale --skip-deploy node-js-app web=1
|
||||
|
||||
#### Manually managing process scaling
|
||||
|
||||
> Using a `formations` key in an `app.json` file disables the ability to use `ps:scale` for scaling.
|
||||
> Using a `formation` key in an `app.json` file with _any_ `quantity` specified disables the ability to use `ps:scale` for scaling.
|
||||
|
||||
An `app.json` file can be committed to the root of the pushed app repository, and must be within the built image artifact in the image's working directory as shown below.
|
||||
|
||||
@@ -136,11 +139,11 @@ An `app.json` file can be committed to the root of the pushed app repository, an
|
||||
- Dockerfile: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
||||
- Docker Image: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
||||
|
||||
The `formations` key should be specified as follows in the `app.json` file:
|
||||
The `formation` key should be specified as follows in the `app.json` file:
|
||||
|
||||
```Procfile
|
||||
{
|
||||
"formations": {
|
||||
"formation": {
|
||||
"web": {
|
||||
"quantity": 1
|
||||
},
|
||||
@@ -155,7 +158,7 @@ Removing the file will result in Dokku respecting the `ps:scale` command for set
|
||||
|
||||
#### The `web` process
|
||||
|
||||
For initial app deploys, Dokku will default to starting a single `web` process for each app. This process may be defined within the `Procfile` or as the `CMD` (for Dockerfile or Docker image deploys). Scaling of the `web` process - and all other processes - may be managed via `ps:scale` or the `formations` key in the `app.json` file either before or after the initial deploy.
|
||||
For initial app deploys, Dokku will default to starting a single `web` process for each app. This process may be defined within the `Procfile` or as the `CMD` (for Dockerfile or Docker image deploys). Scaling of the `web` process - and all other processes - may be managed via `ps:scale` or the `formation` key in the `app.json` file either before or after the initial deploy.
|
||||
|
||||
There are also a few other exceptions for the `web` process.
|
||||
|
||||
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - {{DOC_TITLE}}</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.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.26.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.26.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.25.0/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -42,7 +42,7 @@
|
||||
</script>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.0/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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>
|
||||
@@ -118,11 +118,10 @@
|
||||
<a href="/{{NAME}}/deployment/builders/cloud-native-buildpacks/" class="list-group-item">Cloud Native Buildpacks</a>
|
||||
<a href="/{{NAME}}/deployment/builders/herokuish-buildpacks/" class="list-group-item">Herokuish Buildpacks</a>
|
||||
<a href="/{{NAME}}/deployment/builders/dockerfiles/" class="list-group-item">Dockerfile Deployment</a>
|
||||
<a href="/{{NAME}}/deployment/builders/null/" class="list-group-item">Null Builder</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Deployment Methods</a>
|
||||
<a href="/{{NAME}}/deployment/methods/images/" class="list-group-item">Docker Image Deployment</a>
|
||||
<a href="/{{NAME}}/deployment/methods/git/" class="list-group-item">Git Deployment</a>
|
||||
<a href="/{{NAME}}/deployment/methods/tar/" class="list-group-item">Tarfile Deployment</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Configuration</a>
|
||||
|
||||
@@ -159,8 +158,12 @@
|
||||
|
||||
<a href="#" class="list-group-item disabled">Schedulers</a>
|
||||
|
||||
<a href="/{{NAME}}/advanced-usage/schedulers/docker-local/" class="list-group-item">Docker Local</a>
|
||||
<a href="/{{NAME}}/advanced-usage/schedulers/alternate-schedulers/" class="list-group-item">Alternate Schedulers</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/scheduler-management/" class="list-group-item">Scheduler Management</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/docker-local/" class="list-group-item">Docker Local</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/kubernetes/" class="list-group-item">Kubernetes</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/nomad/" class="list-group-item">Nomad</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/null/" class="list-group-item">Null Scheduler</a>
|
||||
<a href="/{{NAME}}/deployment/schedulers/alternate-schedulers/" class="list-group-item">Alternate Schedulers</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Development</a>
|
||||
|
||||
@@ -171,7 +174,7 @@
|
||||
|
||||
<a href="#" class="list-group-item disabled">Continuous Integration</a>
|
||||
<a href="/{{NAME}}/deployment/continuous-integration/github-actions/" class="list-group-item">GitHub Actions</a>
|
||||
<a href="/{{NAME}}/deployment/continuous-integration/gitlab-ci/" class="list-group-item">Gitlab CI</a>
|
||||
<a href="/{{NAME}}/deployment/continuous-integration/gitlab-ci/" class="list-group-item">GitLab CI</a>
|
||||
<a href="/{{NAME}}/deployment/continuous-integration/generic/" class="list-group-item">Generic</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Community Contributions</a>
|
||||
|
||||
@@ -21,7 +21,10 @@
|
||||
"deployment/methods/dockerfiles": "deployment/builders/dockerfiles/",
|
||||
"deployment/methods/herokuish-buildpacks": "deployment/builders/herokuish-buildpacks/",
|
||||
|
||||
"deployment/images": "deployment/methods/images/",
|
||||
"deployment/images": "deployment/methods/git/#initializing-an-app-repository-from-a-docker-image",
|
||||
"deployment/tar": "deployment/methods/git/#initializing-an-app-repository-from-an-archive-file",
|
||||
"deployment/methods/images": "deployment/methods/git/#initializing-an-app-repository-from-a-docker-image",
|
||||
"deployment/methods/tar": "deployment/methods/git/#initializing-an-app-repository-from-an-archive-file",
|
||||
"configuration-management": "configuration/environment-variables/",
|
||||
"deployment/ssl-configuration": "configuration/ssl/",
|
||||
"nginx": "configuration/nginx/",
|
||||
@@ -38,8 +41,9 @@
|
||||
"dokku-events-logs": "advanced-usage/event-logs/",
|
||||
"dokku-storage": "advanced-usage/persistent-storage/",
|
||||
|
||||
"advanced-usage/schedulers/alternate-schedulers": "deployment/schedulers/alternate-schedulers",
|
||||
"advanced-usage/schedulers/docker-local": "deployment/schedulers/docker-local",
|
||||
"advanced-usage/schedulers/alternate-schedulers": "deployment/schedulers/scheduler-management/",
|
||||
"advanced-usage/schedulers/docker-local": "deployment/schedulers/docker-local/",
|
||||
"deployment/schedulers/alternate-schedulers": "deployment/schedulers/scheduler-management/",
|
||||
|
||||
"community/tutorials/deploying-with-gitlab-ci": "deployment/continuous-integration/gitlab-ci/",
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.25.0"
|
||||
version = "0.26.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -17,7 +17,7 @@ trigger-events-install() {
|
||||
# shellcheck disable=SC2174
|
||||
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch | debian | centos | fedora | rhel)
|
||||
arch | debian | centos | fedora | raspbian | rhel)
|
||||
chgrp dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
*)
|
||||
@@ -28,7 +28,7 @@ trigger-events-install() {
|
||||
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
|
||||
touch "$DOKKU_EVENTS_LOGFILE"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch | debian | centos | fedora | rhel)
|
||||
arch | debian | centos | fedora | raspbian | rhel)
|
||||
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
;;
|
||||
*)
|
||||
@@ -70,7 +70,7 @@ $DOKKU_LOGS_DIR/*.log {
|
||||
}
|
||||
EOF
|
||||
|
||||
if [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
||||
if [[ "$DOKKU_DISTRO" == "debian" ]] || [[ "$DOKKU_DISTRO" == "raspbian" ]]; then
|
||||
sed -i 's/ syslog dokku$/ root dokku/g' $DOKKU_LOGROTATE_FILE
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.25.0"
|
||||
version = "0.26.2"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/20_events/scheduler-detect
Symbolic link
1
plugins/20_events/scheduler-detect
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/app-json/.gitignore
vendored
1
plugins/app-json/.gitignore
vendored
@@ -6,3 +6,4 @@
|
||||
/subcommands/*
|
||||
/triggers
|
||||
/triggers/*
|
||||
/app-json-process-deploy-parallelism
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SUBCOMMANDS = subcommands/report subcommands/set
|
||||
TRIGGERS = triggers/install triggers/post-delete triggers/post-deploy triggers/pre-deploy triggers/report
|
||||
TRIGGERS = triggers/app-json-process-deploy-parallelism triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/post-deploy triggers/pre-deploy triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = app-json
|
||||
|
||||
|
||||
@@ -39,7 +39,8 @@ type CronCommand struct {
|
||||
|
||||
// Formation is a struct that represents the scale for a process from an app.json file
|
||||
type Formation struct {
|
||||
Quantity int `json:"quantity"`
|
||||
Quantity *int `json:"quantity"`
|
||||
MaxParallel *int `json:"max_parallel"`
|
||||
}
|
||||
|
||||
// GetAppjsonDirectory returns the directory containing a given app's extracted app.json file
|
||||
|
||||
@@ -500,7 +500,9 @@ func setScale(appName string, image string) error {
|
||||
clearExisting := false
|
||||
args := []string{appName, strconv.FormatBool(skipDeploy), strconv.FormatBool(clearExisting)}
|
||||
for processType, formation := range appJSON.Formation {
|
||||
args = append(args, fmt.Sprintf("%s=%d", processType, formation.Quantity))
|
||||
if formation.Quantity != nil {
|
||||
args = append(args, fmt.Sprintf("%s=%d", processType, *formation.Quantity))
|
||||
}
|
||||
}
|
||||
|
||||
if len(args) == 3 {
|
||||
@@ -567,7 +569,7 @@ func injectDokkuScale(appName string, image string) error {
|
||||
}
|
||||
|
||||
appJSON.Formation[processType] = Formation{
|
||||
Quantity: quantity,
|
||||
Quantity: &quantity,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.25.0"
|
||||
version = "0.26.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -18,8 +18,20 @@ func main() {
|
||||
|
||||
var err error
|
||||
switch trigger {
|
||||
case "app-json-process-deploy-parallelism":
|
||||
appName := flag.Arg(0)
|
||||
processType := flag.Arg(1)
|
||||
err = appjson.TriggerAppJSONProcessDeployParallelism(appName, processType)
|
||||
case "install":
|
||||
err = appjson.TriggerInstall()
|
||||
case "post-app-clone-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = appjson.TriggerPostAppCloneSetup(oldAppName, newAppName)
|
||||
case "post-app-rename-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = appjson.TriggerPostAppRenameSetup(oldAppName, newAppName)
|
||||
case "post-delete":
|
||||
appName := flag.Arg(0)
|
||||
err = appjson.TriggerPostDelete(appName)
|
||||
|
||||
@@ -8,10 +8,36 @@ import (
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
// TriggerAppJSONProcessDeployParallelism returns the max number of processes to deploy in parallel
|
||||
func TriggerAppJSONProcessDeployParallelism(appName string, processType string) error {
|
||||
appJSON, err := getAppJSON(appName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
parallelism := 1
|
||||
for procType, formation := range appJSON.Formation {
|
||||
if procType != processType {
|
||||
continue
|
||||
}
|
||||
|
||||
if formation.MaxParallel == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if *formation.MaxParallel > 0 {
|
||||
parallelism = *formation.MaxParallel
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println(parallelism)
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerInstall initializes app restart policies
|
||||
func TriggerInstall() error {
|
||||
if err := common.PropertySetup("common"); err != nil {
|
||||
return fmt.Errorf("Unable to install the common plugin: %s", err.Error())
|
||||
if err := common.PropertySetup("app-json"); err != nil {
|
||||
return fmt.Errorf("Unable to install the app-json plugin: %s", err.Error())
|
||||
}
|
||||
|
||||
directory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json")
|
||||
@@ -22,6 +48,29 @@ func TriggerInstall() error {
|
||||
return common.SetPermissions(directory, 0755)
|
||||
}
|
||||
|
||||
// TriggerPostAppCloneSetup creates new app-json files
|
||||
func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
|
||||
err := common.PropertyClone("app-json", oldAppName, newAppName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppRenameSetup renames app-json files
|
||||
func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
|
||||
if err := common.PropertyClone("app-json", oldAppName, newAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := common.PropertyDestroy("app-json", oldAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostDelete destroys the app-json data for a given app container
|
||||
func TriggerPostDelete(appName string) error {
|
||||
directory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json", appName)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SUBCOMMANDS = subcommands/clone subcommands/create subcommands/destroy subcommands/exists subcommands/list subcommands/lock subcommands/locked subcommands/rename subcommands/report subcommands/unlock
|
||||
TRIGGERS = triggers/app-create triggers/app-destroy triggers/app-exists triggers/app-maybe-create triggers/post-delete triggers/report
|
||||
TRIGGERS = triggers/app-create triggers/app-destroy triggers/app-exists triggers/app-maybe-create triggers/deploy-source-set triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = apps
|
||||
|
||||
|
||||
15
plugins/apps/apps.go
Normal file
15
plugins/apps/apps.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package apps
|
||||
|
||||
var (
|
||||
// DefaultProperties is a map of all valid network properties with corresponding default property values
|
||||
DefaultProperties = map[string]string{
|
||||
"deploy-source": "",
|
||||
"deploy-source-metadata": "",
|
||||
}
|
||||
|
||||
// GlobalProperties is a map of all valid global network properties
|
||||
GlobalProperties = map[string]bool{
|
||||
"deploy-source": true,
|
||||
"deploy-source-metadata": true,
|
||||
}
|
||||
)
|
||||
@@ -52,7 +52,7 @@ func destroyApp(appName string) error {
|
||||
|
||||
common.LogInfo1(fmt.Sprintf("Destroying %s (including all add-ons)", appName))
|
||||
|
||||
imageTag, _ := common.GetRunningImageTag(appName)
|
||||
imageTag, _ := common.GetRunningImageTag(appName, "")
|
||||
if err := common.PlugnTrigger("pre-delete", []string{appName, imageTag}...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.25.0"
|
||||
version = "0.26.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package apps
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
@@ -13,9 +14,11 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
}
|
||||
|
||||
flags := map[string]common.ReportFunc{
|
||||
"--app-dir": reportDir,
|
||||
"--app-deploy-source": reportDeploySource,
|
||||
"--app-locked": reportLocked,
|
||||
"--app-created-at": reportCreatedAt,
|
||||
"--app-deploy-source": reportDeploySource,
|
||||
"--app-deploy-source-metadata": reportDeploySourceMetadata,
|
||||
"--app-dir": reportDir,
|
||||
"--app-locked": reportLocked,
|
||||
}
|
||||
|
||||
flagKeys := []string{}
|
||||
@@ -29,17 +32,25 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
return common.ReportSingleApp("app", appName, infoFlag, infoFlags, flagKeys, format, trimPrefix, uppercaseFirstCharacter)
|
||||
}
|
||||
|
||||
func reportDir(appName string) string {
|
||||
return common.AppRoot(appName)
|
||||
func reportCreatedAt(appName string) string {
|
||||
fi, err := os.Stat(common.AppRoot(appName))
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return fmt.Sprint(fi.ModTime().Unix())
|
||||
}
|
||||
|
||||
func reportDeploySource(appName string) string {
|
||||
deploySource := ""
|
||||
if b, err := common.PlugnTriggerSetup("deploy-source", []string{appName}...).SetInput("").Output(); err != nil {
|
||||
deploySource = strings.TrimSpace(string(b[:]))
|
||||
}
|
||||
return common.PropertyGet("apps", appName, "deploy-source")
|
||||
}
|
||||
|
||||
return deploySource
|
||||
func reportDeploySourceMetadata(appName string) string {
|
||||
return common.PropertyGet("apps", appName, "deploy-source-metadata")
|
||||
}
|
||||
|
||||
func reportDir(appName string) string {
|
||||
return common.AppRoot(appName)
|
||||
}
|
||||
|
||||
func reportLocked(appName string) string {
|
||||
|
||||
@@ -30,6 +30,21 @@ func main() {
|
||||
case "app-maybe-create":
|
||||
appName := flag.Arg(0)
|
||||
err = apps.TriggerAppMaybeCreate(appName)
|
||||
case "deploy-source-set":
|
||||
appName := flag.Arg(0)
|
||||
sourceType := flag.Arg(0)
|
||||
sourceMetadata := flag.Arg(0)
|
||||
err = apps.TriggerDeploySourceSet(appName, sourceType, sourceMetadata)
|
||||
case "install":
|
||||
err = apps.TriggerInstall()
|
||||
case "post-app-clone-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = apps.TriggerPostAppCloneSetup(oldAppName, newAppName)
|
||||
case "post-app-rename-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = apps.TriggerPostAppRenameSetup(oldAppName, newAppName)
|
||||
case "post-delete":
|
||||
appName := flag.Arg(0)
|
||||
err = apps.TriggerPostDelete(appName)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package apps
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
@@ -24,15 +26,59 @@ func TriggerAppMaybeCreate(appName string) error {
|
||||
return maybeCreateApp(appName)
|
||||
}
|
||||
|
||||
// TriggerDeploySourceSet sets the current deploy source
|
||||
func TriggerDeploySourceSet(appName string, sourceType string, sourceMetadata string) error {
|
||||
if err := common.PropertyWrite("apps", appName, "deploy-source", sourceType); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return common.PropertyWrite("apps", appName, "deploy-source-metadata", sourceMetadata)
|
||||
}
|
||||
|
||||
// TriggerInstall runs the install step for the apps plugin
|
||||
func TriggerInstall() error {
|
||||
if err := common.PropertySetup("apps"); err != nil {
|
||||
return fmt.Errorf("Unable to install the apps plugin: %s", err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppCloneSetup creates new apps files
|
||||
func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
|
||||
err := common.PropertyClone("apps", oldAppName, newAppName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppRenameSetup renames apps files
|
||||
func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
|
||||
if err := common.PropertyClone("apps", oldAppName, newAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := common.PropertyDestroy("apps", oldAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostDelete is the apps post-delete plugin trigger
|
||||
func TriggerPostDelete(appName string) error {
|
||||
imageRepo := common.GetAppImageRepo(appName)
|
||||
if err := common.PropertyDestroy("apps", appName); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
imagesByAppLabel, err := listImagesByAppLabel(appName)
|
||||
if err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
imageRepo := common.GetAppImageRepo(appName)
|
||||
imagesByRepo, err := listImagesByImageRepo(imageRepo)
|
||||
if err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
|
||||
@@ -21,17 +21,6 @@ trigger-builder-dockerfile-builder-build() {
|
||||
|
||||
pushd "$SOURCECODE_WORK_DIR" &>/dev/null
|
||||
|
||||
local NEW_DOCKERFILE="$(fn-builder-dockerfile-computed-dockerfile-path "$APP")"
|
||||
if [[ -n "$NEW_DOCKERFILE" ]]; then
|
||||
if [[ ! -f "$NEW_DOCKERFILE" ]]; then
|
||||
dokku_log_fail "Invalid dockerfile-path specified: $NEW_DOCKERFILE"
|
||||
fi
|
||||
|
||||
if [[ "$NEW_DOCKERFILE" != "Dockerfile" ]]; then
|
||||
mv "$NEW_DOCKERFILE" Dockerfile
|
||||
fi
|
||||
fi
|
||||
|
||||
# extract first port from Dockerfile
|
||||
suppress_output dos2unix Dockerfile
|
||||
local DOCKERFILE_PORTS=$(get_dockerfile_exposed_ports Dockerfile)
|
||||
@@ -42,12 +31,12 @@ trigger-builder-dockerfile-builder-build() {
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
|
||||
|
||||
# strip --volume and -v args from DOCKER_ARGS
|
||||
local DOCKER_ARGS=$(sed -e "s/^--volume=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^-v[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS")
|
||||
# strip --link, --volume and -v args from DOCKER_ARGS
|
||||
local DOCKER_ARGS=$(sed -e "s/^--link=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--link[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--volume=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--volume[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" -e "s/^-v[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS")
|
||||
declare -a ARG_ARRAY
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" "${DOKKU_DOCKER_BUILD_OPTS[@]}" -t $IMAGE .
|
||||
"$DOCKER_BIN" image build $DOCKER_BUILD_LABEL_ARGS $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" "${DOKKU_DOCKER_BUILD_OPTS[@]}" -t $IMAGE .
|
||||
|
||||
plugn trigger post-build-dockerfile "$APP"
|
||||
}
|
||||
|
||||
@@ -12,10 +12,19 @@ trigger-builder-dockerfile-builder-release() {
|
||||
return
|
||||
fi
|
||||
|
||||
local DOCKER_BUILD_LABEL_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.app-name=$APP --label=com.dokku.image-stage=release --label=dokku"
|
||||
|
||||
plugn trigger pre-release-dockerfile "$APP" "$IMAGE_TAG"
|
||||
|
||||
TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")"
|
||||
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
docker-image-labeler --label=com.dokku.image-stage=release --label=com.dokku.app-name=$APP --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku "$IMAGE"
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-dockerfile/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t $IMAGE "$TMP_WORK_DIR"; then
|
||||
dokku_log_warn "Failure injecting docker labels on image"
|
||||
return 1
|
||||
fi
|
||||
|
||||
plugn trigger post-release-dockerfile "$APP" "$IMAGE_TAG"
|
||||
plugn trigger post-release-builder "$BUILDER_TYPE" "$APP" "$IMAGE"
|
||||
}
|
||||
|
||||
32
plugins/builder-dockerfile/core-post-extract
Executable file
32
plugins/builder-dockerfile/core-post-extract
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/builder-dockerfile/internal-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-dockerfile-core-post-extract() {
|
||||
declare desc="builder-dockerfile post-extract plugin trigger"
|
||||
declare trigger="post-extract"
|
||||
declare APP="$1" SOURCECODE_WORK_DIR="$2"
|
||||
local NEW_DOCKERFILE="$(fn-builder-dockerfile-computed-dockerfile-path "$APP")"
|
||||
|
||||
pushd "$TMP_WORK_DIR" >/dev/null
|
||||
|
||||
if [[ -z "$NEW_DOCKERFILE" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "$NEW_DOCKERFILE" == "Dockerfile" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -f "$NEW_DOCKERFILE" ]]; then
|
||||
dokku_log_fail "Invalid dockerfile-path specified: $NEW_DOCKERFILE"
|
||||
return
|
||||
fi
|
||||
|
||||
mv "$NEW_DOCKERFILE" Dockerfile
|
||||
popd &>/dev/null
|
||||
}
|
||||
|
||||
trigger-builder-dockerfile-core-post-extract "$@"
|
||||
@@ -0,0 +1,2 @@
|
||||
ARG APP_IMAGE
|
||||
FROM $APP_IMAGE
|
||||
13
plugins/builder-dockerfile/install
Executable file
13
plugins/builder-dockerfile/install
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-dockerfile-install() {
|
||||
declare desc="installs the builder-dockerfile plugin"
|
||||
declare trigger="install"
|
||||
|
||||
fn-plugin-property-setup "builder-dockerfile"
|
||||
}
|
||||
|
||||
trigger-builder-dockerfile-install "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-dockerfile plugin"
|
||||
version = "0.25.0"
|
||||
version = "0.26.2"
|
||||
[plugin.config]
|
||||
|
||||
14
plugins/builder-dockerfile/post-app-clone-setup
Executable file
14
plugins/builder-dockerfile/post-app-clone-setup
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-dockerfile-post-app-clone-setup() {
|
||||
declare desc="sets up properties for new app"
|
||||
declare trigger="post-app-clone-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "builder-dockerfile" "$OLD_APP" "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-builder-dockerfile-post-app-clone-setup "$@"
|
||||
15
plugins/builder-dockerfile/post-app-rename-setup
Executable file
15
plugins/builder-dockerfile/post-app-rename-setup
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-dockerfile-post-app-rename-setup() {
|
||||
declare desc="updates settings for new app"
|
||||
declare trigger="post-app-rename-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "builder-dockerfile" "$OLD_APP" "$NEW_APP"
|
||||
fn-plugin-property-destroy "builder-dockerfile" "$OLD_APP"
|
||||
}
|
||||
|
||||
trigger-builder-dockerfile-post-app-rename-setup "$@"
|
||||
14
plugins/builder-dockerfile/post-delete
Executable file
14
plugins/builder-dockerfile/post-delete
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-dockerfile-post-delete() {
|
||||
declare desc="destroys the builder-dockerfile properties for a given app"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-destroy "builder-dockerfile" "$APP"
|
||||
}
|
||||
|
||||
trigger-builder-dockerfile-post-delete "$@"
|
||||
@@ -15,32 +15,21 @@ trigger-builder-herokuish-builder-release() {
|
||||
|
||||
local CID
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
|
||||
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$APP"
|
||||
local DOCKER_BUILD_LABEL_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.app-name=$APP --label=com.dokku.image-stage=release --label=dokku"
|
||||
|
||||
plugn trigger pre-release-buildpack "$APP" "$IMAGE_TAG"
|
||||
if [[ -n $(config_export global) ]]; then
|
||||
CID=$(config_export global | "$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
|
||||
if test "$("$DOCKER_BIN" container wait "$CID")" -ne 0; then
|
||||
dokku_log_warn "Failure injecting global environment variables"
|
||||
return 1
|
||||
fi
|
||||
|
||||
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
|
||||
plugn trigger scheduler-register-retired "$APP" "$CID"
|
||||
fi
|
||||
if [[ -n $(config_export app "$APP") ]]; then
|
||||
CID=$(config_export app "$APP" | "$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
|
||||
if test "$("$DOCKER_BIN" container wait "$CID")" -ne 0; then
|
||||
dokku_log_warn "Failure injecting app environment variables"
|
||||
return 1
|
||||
fi
|
||||
TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")"
|
||||
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||
|
||||
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
|
||||
plugn trigger scheduler-register-retired "$APP" "$CID"
|
||||
config_export global >"$TMP_WORK_DIR/00-global-env.sh"
|
||||
config_export app "$APP" >"$TMP_WORK_DIR/01-app-env.sh"
|
||||
|
||||
if ! suppress_output "$DOCKER_BIN" image build $DOCKER_BUILD_LABEL_ARGS $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t $IMAGE "$TMP_WORK_DIR"; then
|
||||
dokku_log_warn "Failure injecting environment variables"
|
||||
return 1
|
||||
fi
|
||||
|
||||
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-buildpack "$APP" "$IMAGE_TAG"
|
||||
plugn trigger post-release-builder "$BUILDER_TYPE" "$APP" "$IMAGE"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
ARG APP_IMAGE
|
||||
FROM $APP_IMAGE
|
||||
|
||||
COPY 00-global-env.sh 01-app-env.sh /app/.profile.d/
|
||||
@@ -0,0 +1,5 @@
|
||||
ARG APP_IMAGE
|
||||
FROM $APP_IMAGE
|
||||
|
||||
COPY .env.d /tmp/env
|
||||
COPY .env /app/.env
|
||||
13
plugins/builder-herokuish/install
Executable file
13
plugins/builder-herokuish/install
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-herokuish-install() {
|
||||
declare desc="installs the builder-herokuish plugin"
|
||||
declare trigger="install"
|
||||
|
||||
fn-plugin-property-setup "builder-herokuish"
|
||||
}
|
||||
|
||||
trigger-builder-herokuish-install "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-herokuish plugin"
|
||||
version = "0.25.0"
|
||||
version = "0.26.2"
|
||||
[plugin.config]
|
||||
|
||||
14
plugins/builder-herokuish/post-delete
Executable file
14
plugins/builder-herokuish/post-delete
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-herokuish-post-delete() {
|
||||
declare desc="destroys the builder-herokuish properties for a given app"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-destroy "builder-herokuish" "$APP"
|
||||
}
|
||||
|
||||
trigger-builder-herokuish-post-delete "$@"
|
||||
@@ -8,10 +8,9 @@ trigger-builder-herokuish-pre-build-buildpack() {
|
||||
declare desc="builder-herokuish pre-build-buildpack plugin trigger"
|
||||
declare trigger="pre-build-buildpack"
|
||||
declare APP="$1"
|
||||
local IMAGE CID
|
||||
local IMAGE TMP_WORK_DIR
|
||||
|
||||
local DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
|
||||
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$APP"
|
||||
local DOCKER_BUILD_LABEL_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.app-name=$APP"
|
||||
|
||||
IMAGE=$(get_app_image_name "$APP")
|
||||
|
||||
@@ -19,26 +18,23 @@ trigger-builder-herokuish-pre-build-buildpack() {
|
||||
[[ -z $(config_get --global CURL_TIMEOUT) ]] && config_set --global CURL_TIMEOUT=600
|
||||
|
||||
dokku_log_info1 "Adding BUILD_ENV to build environment..."
|
||||
TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")"
|
||||
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||
mkdir -p "$TMP_WORK_DIR/.env.d"
|
||||
|
||||
# create build env files for use in buildpacks like this:
|
||||
# https://github.com/niteoweb/heroku-buildpack-buildout/blob/5879fa3418f7d8e079f1aa5816ba1adde73f4948/bin/compile#L34
|
||||
CID=$(config_bundle --merged "$APP" | "$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /tmp/env; cat | tar -x -C /tmp/env")
|
||||
if test "$("$DOCKER_BIN" container wait "$CID")" -ne 0; then
|
||||
config_bundle --merged "$APP" | tar -x -C "$TMP_WORK_DIR/.env.d"
|
||||
|
||||
# create build env for 'old style' buildpacks and dokku plugins
|
||||
config_export app "$APP" --format envfile --merged >"$TMP_WORK_DIR/.env"
|
||||
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/pre-build.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t $IMAGE "$TMP_WORK_DIR"; then
|
||||
dokku_log_warn "Failure injecting BUILD_ENV into build environment"
|
||||
return 1
|
||||
fi
|
||||
|
||||
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
|
||||
plugn trigger scheduler-register-retired "$APP" "$CID"
|
||||
|
||||
# create build env for 'old style' buildpacks and dokku plugins
|
||||
CID=$(config_export app "$APP" --format envfile --merged | "$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "cat >> /app/.env")
|
||||
if test "$("$DOCKER_BIN" container wait "$CID")" -ne 0; then
|
||||
dokku_log_warn "Failure injecting old-style BUILD_ENV"
|
||||
return 1
|
||||
fi
|
||||
|
||||
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
|
||||
plugn trigger scheduler-register-retired "$APP" "$CID"
|
||||
dokku_log_verbose_quiet "BUILD_ENV added successfully"
|
||||
}
|
||||
|
||||
trigger-builder-herokuish-pre-build-buildpack "$@"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-null plugin"
|
||||
version = "0.25.0"
|
||||
version = "0.26.2"
|
||||
[plugin.config]
|
||||
|
||||
13
plugins/builder-pack/install
Executable file
13
plugins/builder-pack/install
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-pack-install() {
|
||||
declare desc="installs the builder-pack plugin"
|
||||
declare trigger="install"
|
||||
|
||||
fn-plugin-property-setup "builder-pack"
|
||||
}
|
||||
|
||||
trigger-builder-pack-install "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-pack plugin"
|
||||
version = "0.25.0"
|
||||
version = "0.26.2"
|
||||
[plugin.config]
|
||||
|
||||
14
plugins/builder-pack/post-app-clone-setup
Executable file
14
plugins/builder-pack/post-app-clone-setup
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-pack-post-app-clone-setup() {
|
||||
declare desc="sets up properties for new app"
|
||||
declare trigger="post-app-clone-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "builder-pack" "$OLD_APP" "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-builder-pack-post-app-clone-setup "$@"
|
||||
15
plugins/builder-pack/post-app-rename-setup
Executable file
15
plugins/builder-pack/post-app-rename-setup
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-pack-post-app-rename-setup() {
|
||||
declare desc="updates settings for new app"
|
||||
declare trigger="post-app-rename-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "builder-pack" "$OLD_APP" "$NEW_APP"
|
||||
fn-plugin-property-destroy "builder-pack" "$OLD_APP"
|
||||
}
|
||||
|
||||
trigger-builder-pack-post-app-rename-setup "$@"
|
||||
14
plugins/builder-pack/post-delete
Executable file
14
plugins/builder-pack/post-delete
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-pack-post-delete() {
|
||||
declare desc="destroys the builder-pack properties for a given app"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-destroy "builder-pack" "$APP"
|
||||
}
|
||||
|
||||
trigger-builder-pack-post-delete "$@"
|
||||
@@ -1,5 +1,5 @@
|
||||
SUBCOMMANDS = subcommands/report subcommands/set
|
||||
TRIGGERS = triggers/builder-detect triggers/core-post-extract triggers/install triggers/post-delete triggers/report
|
||||
TRIGGERS = triggers/builder-detect triggers/core-post-extract triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = builder
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder plugin"
|
||||
version = "0.25.0"
|
||||
version = "0.26.2"
|
||||
[plugin.config]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user