Compare commits

...

81 Commits

Author SHA1 Message Date
Dokku Bot
a5c4543282 Release 0.26.4
# History

## 0.26.4

Install/update via the bootstrap script:

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

### Bug Fixes

- #4899: @josegonzalez Ensure we respect quotes and dollar signs in config vars
- #4890: @josegonzalez Drop which in favor of command -v

### Other

- #4897: @josegonzalez Silence errors when verifying the ssl certificate
- #4891: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 199 to 200 in /tests/apps/php
2021-11-03 22:44:31 +00:00
Jose Diaz-Gonzalez
0b34544125 Merge pull request #4899 from dokku/4895-fix-env-vars
Ensure we respect quotes and dollar signs in config vars
2021-11-03 16:15:49 -04:00
Jose Diaz-Gonzalez
cd33ec2f02 fix: remove trace mode 2021-11-03 14:40:21 -04:00
Jose Diaz-Gonzalez
57fc5ec333 Merge pull request #4897 from dokku/josegonzalez-patch-1
Silence errors when verifying the ssl certificate
2021-11-03 12:17:28 -04:00
Jose Diaz-Gonzalez
a756786f93 fix: ensure we respect quotes and dollar signs in config vars
Due to various changes in how containers are started, these keys were set incorrectly for apps. Since we can use the short-hand --env=ENV format for setting env vars on docker containers, lets do so.

Closes #4895
Closes #4896
2021-11-03 12:13:52 -04:00
Jose Diaz-Gonzalez
daddabc7b1 feat: silence errors when verifying the ssl certificate 2021-11-03 10:49:34 -04:00
Jose Diaz-Gonzalez
6014b7208f Merge pull request #4891 from dokku/dependabot/composer/tests/apps/php/heroku/heroku-buildpack-php-200
chore(deps-dev): bump heroku/heroku-buildpack-php from 199 to 200 in /tests/apps/php
2021-10-29 10:06:03 -04:00
dependabot[bot]
527b076732 chore(deps-dev): bump heroku/heroku-buildpack-php in /tests/apps/php
Bumps [heroku/heroku-buildpack-php](https://github.com/heroku/heroku-buildpack-php) from 199 to 200.
- [Release notes](https://github.com/heroku/heroku-buildpack-php/releases)
- [Changelog](https://github.com/heroku/heroku-buildpack-php/blob/main/CHANGELOG.md)
- [Commits](https://github.com/heroku/heroku-buildpack-php/compare/v199...v200)

---
updated-dependencies:
- dependency-name: heroku/heroku-buildpack-php
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-29 13:08:29 +00:00
Jose Diaz-Gonzalez
de67bd19b2 Merge pull request #4890 from dokku/drop-which
Drop which in favor of command -v
2021-10-28 19:10:34 -04:00
Jose Diaz-Gonzalez
6c709f2386 fix: drop which in favor of command -v 2021-10-28 18:22:20 -04:00
Dokku Bot
d26c12e6eb Release 0.26.3
# History

## 0.26.3

Install/update via the bootstrap script:

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

### Bug Fixes

- #4889: @josegonzalez Skip herokuish version in report output and disable the herokuish builder on armhf architectures
2021-10-28 14:49:09 +00:00
Jose Diaz-Gonzalez
74d230c11c Merge pull request #4889 from dokku/arm-detect
Skip herokuish version in report output and disable the herokuish builder on armhf architectures
2021-10-28 10:35:18 -04:00
Jose Diaz-Gonzalez
b146483940 fix: skip herokuish version in report output and disable the herokuish builder on armhf architectures
We don't skip pack as in theory they may be able to support arm in the future. Dockerfile builds should work fine, as long as all images in the FROM directives have arm versions.
Finally, the null builder _should_ always work, but of course YMMV :D
2021-10-28 10:07:18 -04:00
Dokku Bot
9e2c79c5ed Release 0.26.2
# 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
2021-10-28 07:41:04 +00:00
Jose Diaz-Gonzalez
a0cece197f Merge pull request #4888 from dokku/proper-raspbian-install
Ensure installations treat raspbian as similar to debian buster as possible
2021-10-28 02:42:02 -04:00
Jose Diaz-Gonzalez
57858c1788 fix: ensure installations treat raspbian as similar to debian buster as possible 2021-10-28 02:41:10 -04:00
Jose Diaz-Gonzalez
88736c1000 Merge pull request #4887 from dokku/fix-armhf-package
Ensure we do not add two debian folders in a single armhf package
2021-10-28 01:13:50 -04:00
Jose Diaz-Gonzalez
48357adac1 fix: ensure we do not add two debian folders in a single package 2021-10-28 01:13:28 -04:00
Jose Diaz-Gonzalez
3b4d101a42 Merge pull request #4886 from dokku/apps-created-at
Add created-at time to apps:report output
2021-10-27 22:25:51 -04:00
Jose Diaz-Gonzalez
c3871e7da9 feat: add created-at time to apps:report output 2021-10-27 21:03:04 -04:00
Dokku Bot
7a4ead4db4 Release 0.26.1
# History

## 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
2021-10-27 23:28:04 +00:00
Jose Diaz-Gonzalez
c32d0cc791 Merge pull request #4885 from dokku/arm-support
Add support for arm devices
2021-10-27 19:26:51 -04:00
Jose Diaz-Gonzalez
b3c732e487 debug: show the packages being installed 2021-10-27 12:39:31 -04:00
Jose Diaz-Gonzalez
ae14b02cbd fix: pull manpage from amd64 stage 2021-10-27 12:07:35 -04:00
Jose Diaz-Gonzalez
1532590b50 fix: ensure we pass the correct args to both derived builder stages 2021-10-26 11:30:58 -04:00
Jose Diaz-Gonzalez
d3cbb730ac feat: add support for arm devices
This specifically targets Raspbian Buster, though releases may work on other debian-based operating systems.

Note that this does _not_ port buildpacks - either herokuish or pack - to Raspbian, and it is likely that users will need to use pack for buildpack support (if/when it is supported on ARM) or Dockerfile for image building.
2021-10-26 00:16:00 -04:00
Jose Diaz-Gonzalez
ffd5c896ed Merge pull request #4884 from dokku/josegonzalez-patch-1
Correct recommends entry for bash-completion
2021-10-26 00:10:03 -04:00
Jose Diaz-Gonzalez
6bc960e10c fix: correct recommends entry for bash-completion 2021-10-26 00:08:56 -04:00
Dokku Bot
2e237041ec Release 0.26.0
# History

## 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
2021-10-26 00:39:53 +00:00
Jose Diaz-Gonzalez
23798b575b Merge pull request #4874 from dokku/josegonzalez-patch-1
Upgrade vector log integration to 0.17.x
2021-10-24 21:29:37 -04:00
Jose Diaz-Gonzalez
b690d9d18d Merge pull request #4883 from dokku/scroll-versions
Enable vertical scrolling on the version selector
2021-10-24 20:37:49 -04:00
Jose Diaz-Gonzalez
cd030f4fa0 docs: enable vertical scrolling on the version selector
We now have too many versions for it to show up on a modern-ish laptop screen, so enabling scrolling will allow folks to choose older versions more easily.
2021-10-24 20:37:24 -04:00
Jose Diaz-Gonzalez
6db82861e6 Merge pull request #4882 from dokku/setup-config
Add missing setup/teardown of builder plugin properties
2021-10-24 20:21:33 -04:00
Jose Diaz-Gonzalez
a637ffc848 tests: skip test when in remote vscode container and also ensure the docker daemon config is valid 2021-10-24 20:21:03 -04:00
Jose Diaz-Gonzalez
760be655e9 fix: handle both stderr and stdout when tailing container logs
Previously, stderr was ignored when tailing container log output in golang. This change ensures we capture it and also use the correct helper for that output method.
2021-10-24 20:20:35 -04:00
Jose Diaz-Gonzalez
01e317259b refactor: use default sink variable
This allows us to update the sink at the same time as updating the vector integration.
2021-10-24 15:14:37 -04:00
Jose Diaz-Gonzalez
c74c542b1f feat: upgrade vector and set default sink variable 2021-10-24 15:14:37 -04:00
Jose Diaz-Gonzalez
c4ad455aad Merge pull request #4880 from dokku/null-app-status
Ensure the null scheduler reports the app as running when in use
2021-10-24 15:13:27 -04:00
Jose Diaz-Gonzalez
8c43542f2e Merge pull request #4881 from dokku/4852-bindutils-dep-removal
Drop bindutils as alternative dependency to bind-utils
2021-10-24 15:13:09 -04:00
Jose Diaz-Gonzalez
61f8590553 fix: add missing setup/teardown of builder plugin properties 2021-10-24 15:12:16 -04:00
Jose Diaz-Gonzalez
d84c17d9e2 fix: drop bindutils as alternative dependency to bind-utils
Unfortunately, this breaks CentOS compatibility as they use an older version of yum in CentOS 7. Rather than inconvenience the larger user base, Photon users may wish to provide their own `bind-utils` metapackage that depends on `bindutils`.

Closes #4852
2021-10-23 13:50:28 -04:00
Jose Diaz-Gonzalez
c9d10b8a2b fix: ensure the null scheduler reports the app as running when in use 2021-10-23 13:32:02 -04:00
Jose Diaz-Gonzalez
b43cec2d6b Merge pull request #4879 from dokku/josegonzalez-patch-2
Clarify that the docker-based dokku installation is ready when a certain message appears
2021-10-23 12:21:22 -04:00
Jose Diaz-Gonzalez
e1d5228796 docs: clarify that the docker-based dokku installation is ready when a certain message appears
Closes #4878
2021-10-23 12:20:58 -04:00
Jose Diaz-Gonzalez
fd77f9c7a0 chore: use updated github access token variable 2021-10-22 06:43:03 -04:00
Jose Diaz-Gonzalez
f6b03dd55f Merge pull request #4871 from dokku/4870-fix-procfile-remove
Do not error when default Procfile path does not exist when using a custom procfile-path
2021-10-17 15:10:49 -04:00
Jose Diaz-Gonzalez
43631e8847 fix: do not error when default Procfile path does not exist when using a custom procfile-path
Closes #4870
2021-10-16 16:34:34 -04:00
Jose Diaz-Gonzalez
afea3b54a8 Merge pull request #4869 from dokku/dependabot/npm_and_yarn/tests/apps/dot-websocket.disabled/socket.io-4.3.0
chore(deps): bump socket.io from 4.2.0 to 4.3.0 in /tests/apps/.websocket.disabled
2021-10-14 09:58:52 -04:00
dependabot[bot]
17a2b333f3 chore(deps): bump socket.io in /tests/apps/.websocket.disabled
Bumps [socket.io](https://github.com/socketio/socket.io) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/master/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.2.0...4.3.0)

---
updated-dependencies:
- dependency-name: socket.io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-14 13:09:09 +00:00
Jose Diaz-Gonzalez
06e63c8f95 Merge pull request #4868 from dokku/dependabot/maven/tests/apps/java/org.eclipse.jetty-jetty-servlet-11.0.7
chore(deps): bump jetty-servlet from 11.0.6 to 11.0.7 in /tests/apps/java
2021-10-13 10:59:56 -04:00
dependabot[bot]
1bc8bb2a24 chore(deps): bump jetty-servlet in /tests/apps/java
Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 11.0.6 to 11.0.7.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-11.0.6...jetty-11.0.7)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-servlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-13 13:10:45 +00:00
Jose Diaz-Gonzalez
1bf8493cd1 Merge pull request #4866 from dokku/dependabot/composer/tests/apps/php/heroku/heroku-buildpack-php-199
chore(deps-dev): bump heroku/heroku-buildpack-php from 198 to 199 in /tests/apps/php
2021-10-11 10:29:33 -04:00
dependabot[bot]
e705d4eed8 chore(deps-dev): bump heroku/heroku-buildpack-php in /tests/apps/php
Bumps [heroku/heroku-buildpack-php](https://github.com/heroku/heroku-buildpack-php) from 198 to 199.
- [Release notes](https://github.com/heroku/heroku-buildpack-php/releases)
- [Changelog](https://github.com/heroku/heroku-buildpack-php/blob/main/CHANGELOG.md)
- [Commits](https://github.com/heroku/heroku-buildpack-php/compare/v198...v199)

---
updated-dependencies:
- dependency-name: heroku/heroku-buildpack-php
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 13:11:16 +00:00
Jose Diaz-Gonzalez
6e46bacf92 Merge pull request #4861 from dokku/fix-clone
Add missing clone/rename code for plugins
2021-10-10 02:38:59 -04:00
Jose Diaz-Gonzalez
69bb8e3077 Merge pull request #4864 from dokku/josegonzalez-patch-1
Switch to unauthenticated tap for formula bumping
2021-10-10 02:20:03 -04:00
Jose Diaz-Gonzalez
3aa7d39358 chore: switch to unauthenticated tap for formula bumping 2021-10-10 02:19:49 -04:00
Jose Diaz-Gonzalez
867403f589 Merge pull request #4863 from dokku/scheduler-docs
Clarify what is necessary for implementing a scheduler plugin
2021-10-10 02:07:29 -04:00
Jose Diaz-Gonzalez
cce7c5cb97 Merge pull request #4862 from dokku/4464-deploy-source
Set deploy-source and metadata at deploy time
2021-10-10 02:07:16 -04:00
Jose Diaz-Gonzalez
6ad8aa7988 docs: clarify what is necessary for implementing a scheduler plugin
Also split out kubernetes and nomad scheduler docs into their own pages.
2021-10-10 02:06:36 -04:00
Jose Diaz-Gonzalez
36294e09a3 fix: add missing clone/rename setup to builder plugins 2021-10-09 23:57:48 -04:00
Jose Diaz-Gonzalez
fddf130abd fix: add missing clone/rename setup code for golang plugins 2021-10-09 23:49:46 -04:00
Jose Diaz-Gonzalez
c0b6942392 refactor: set deploy-source and metadata at deploy time
This ensures the value is correct, where previously it was computed based on a file - and therefore did not distinguish between git:from-archive and git:from-image.

Closes #4464
2021-10-09 23:37:53 -04:00
Jose Diaz-Gonzalez
f949fe2a49 Merge pull request #4860 from dokku/parallel-process-deploys
Add ability to increase the max parallelism when deploying a given process type
2021-10-09 23:35:54 -04:00
Jose Diaz-Gonzalez
55554ce9bd feat: add ability to increase the max parallelism when deploying a given process type 2021-10-09 22:44:03 -04:00
Jose Diaz-Gonzalez
904894722f fix: add missing event for scheduler-detect 2021-10-09 21:12:56 -04:00
Jose Diaz-Gonzalez
a8a167f87f chore: fix documentation in migration guide 2021-10-09 21:12:56 -04:00
Jose Diaz-Gonzalez
cd7b8afccb Merge pull request #4853 from dokku/4825-dangling-images
Remove dangling images
2021-10-09 21:12:53 -04:00
Jose Diaz-Gonzalez
6c6e72ca04 Merge pull request #4765 from dokku/2184-process-type-restarts
Allow specifying a single process type to restart
2021-10-09 21:11:01 -04:00
Jose Diaz-Gonzalez
9616473c3a fix: ensure we retire any alternate tags
Dokku currently injects an alternate tag into the image. Without this change, deploying new image tags (via push with a Dockerfile or git:from-image) would result in the old images lying around forever. This change ensures they are registered for removal.

Closes #4825
2021-10-09 18:46:48 -04:00
Jose Diaz-Gonzalez
e53e8bb59f fix: register all containers for retirement on app stop
This ensures that unused docker images are _also_ removed. While this will mean a `ps:start` requires a rebuild in the case of a force-stop, it ensures we don't have unused images when destroying apps.
2021-10-09 18:46:48 -04:00
Jose Diaz-Gonzalez
5cfe7610b2 refactor: inject labels in builder-dockerfile using dockerfile
While this is slower, it ensures we have a proper image parent and can track images for retirement correctly.
2021-10-09 18:46:47 -04:00
Jose Diaz-Gonzalez
6b50ba66a9 fix: properly set label args on dockerfile and herokuish-built images 2021-10-09 18:46:47 -04:00
Jose Diaz-Gonzalez
685ef90018 fix: use release-and-deploy to ensure env vars get re-injected after config changes 2021-10-09 18:46:19 -04:00
Jose Diaz-Gonzalez
b48b79f5ca feat: allow specifying a single process type to restart
This changes restarts to drop the 'release' part that currently gets triggered, which also helps reduce the possibility that a new image layer will be added due to predeploy deploy triggers.

Note that the old method essentially halfway-rebuilt the app (which was what added the extra layer). This refactor removes that, which is a bc-break.

Additionally, scaling processes will result in deploying _only_ restarting the processes being scaled.

Closes #2184
2021-10-09 18:46:17 -04:00
Jose Diaz-Gonzalez
8f7f03a7d8 Merge pull request #4859 from dokku/remove-tar-plugin
Remove deprecated tar plugin
2021-10-09 18:44:19 -04:00
Jose Diaz-Gonzalez
d1a16717b3 chore: remove deprecated tar plugin
This plugin was deprecated in 0.24.0 in favor of git:from-archive. Users should migrate to the new command.
2021-10-09 18:43:53 -04:00
Jose Diaz-Gonzalez
aa77638ca7 Merge pull request #4858 from dokku/remove-tags-plugin
Remove deprecated tags plugin
2021-10-09 18:40:23 -04:00
Jose Diaz-Gonzalez
e893ac2aaa chore: remove deprecated tags plugin
This plugin was deprecated in 0.24.0 in favor of git:from-image. Users should migrate to the new command.
2021-10-09 18:34:01 -04:00
Jose Diaz-Gonzalez
1f8c5509cf Merge pull request #4857 from dokku/4739-scheduler-plugin
Implement scheduler management plugin
2021-10-09 18:32:20 -04:00
Jose Diaz-Gonzalez
3c6396fbca feat: implement the scheduler plugin
This also performs a one-time migration of the DOKKU_SCHEDULER values the scheduler plugin properties.

Closes #4739
2021-10-09 18:31:59 -04:00
Jose Diaz-Gonzalez
8984b748c5 docs: document the null builder 2021-10-09 18:31:42 -04:00
192 changed files with 1701 additions and 1340 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -1,5 +1,115 @@
# History
## 0.26.4
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.4/bootstrap.sh
sudo DOKKU_TAG=v0.26.4 bash bootstrap.sh
```
### Bug Fixes
- #4899: @josegonzalez Ensure we respect quotes and dollar signs in config vars
- #4890: @josegonzalez Drop which in favor of command -v
### Other
- #4897: @josegonzalez Silence errors when verifying the ssl certificate
- #4891: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 199 to 200 in /tests/apps/php
## 0.26.3
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.3/bootstrap.sh
sudo DOKKU_TAG=v0.26.3 bash bootstrap.sh
```
### Bug Fixes
- #4889: @josegonzalez Skip herokuish version in report output and disable the herokuish builder on armhf architectures
## 0.26.2
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.2/bootstrap.sh
sudo DOKKU_TAG=v0.26.2 bash bootstrap.sh
```
### Bug Fixes
- #4888: @josegonzalez Ensure installations treat raspbian as similar to debian buster as possible
- #4887: @josegonzalez Ensure we do not add two debian folders in a single armhf package
### New Features
- #4886: @josegonzalez Add created-at time to apps:report output
## 0.26.1
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.1/bootstrap.sh
sudo DOKKU_TAG=v0.26.1 bash bootstrap.sh
```
### Bug Fixes
- #4884: @josegonzalez Correct recommends entry for bash-completion
### New Features
- #4885: @josegonzalez Add experimental support for arm devices
## 0.26.0
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.0/bootstrap.sh
sudo DOKKU_TAG=v0.26.0 bash bootstrap.sh
```
See the [0.26.0 migration guide](/docs/appendices/0.26.0-migration-guide.md) for more information on migrating to 0.26.0.
### Bug Fixes
- #4882: @josegonzalez Add missing setup/teardown of builder plugin properties
- #4880: @josegonzalez Ensure the null scheduler reports the app as running when in use
- #4871: @josegonzalez Do not error when default Procfile path does not exist when using a custom procfile-path
- #4861: @josegonzalez Add missing clone/rename code for plugins
### New Features
- #4864: @josegonzalez Switch to unauthenticated tap for formula bumping
- #4860: @josegonzalez Add ability to increase the max parallelism when deploying a given process type
### Documentation
- #4883: @josegonzalez Enable vertical scrolling on the version selector
- #4879: @josegonzalez Clarify that the docker-based dokku installation is ready when a certain message appears
- #4863: @josegonzalez Clarify what is necessary for implementing a scheduler plugin
### Other
- #4874: @josegonzalez Upgrade vector log integration to 0.17.x
- #4881: @josegonzalez Drop bindutils as alternative dependency to bind-utils
- #4869: @dependabot[bot] chore(deps): bump socket.io from 4.2.0 to 4.3.0 in /tests/apps/.websocket.disabled
- #4868: @dependabot[bot] chore(deps): bump jetty-servlet from 11.0.6 to 11.0.7 in /tests/apps/java
- #4866: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 198 to 199 in /tests/apps/php
- #4862: @josegonzalez Set deploy-source and metadata at deploy time
- #4853: @josegonzalez Remove dangling images
- #4765: @josegonzalez Allow specifying a single process type to restart
- #4859: @josegonzalez Remove deprecated tar plugin
- #4858: @josegonzalez Remove deprecated tags plugin
- #4857: @josegonzalez Implement scheduler management plugin
## 0.25.7
Install/update via the bootstrap script:
@@ -3370,7 +3480,6 @@ Thanks to all the contributors who helped with this release!
- #2388: @josegonzalez Add documentation for proxy ports scheme handling
- #2389: @josegonzalez Add plugin management documentation
## 0.7.0
Another great minor release! There are no known backwards incompatibilities with this release, though the following may be of interest to our users:
@@ -4756,7 +4865,6 @@ This release pegs Dokku to Docker 1.6.2. Docker 1.7.0 introduced changes in `doc
- #749: @vincentfretin Fix app certificate directory in backup-import/export
- #750: @th4t Remove unintended phrase repetition in installation.md
## 0.2.0 (2013-11-24)
* Added DOKKU_TRACE variable for verbose trace information

View File

@@ -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:

View File

@@ -98,8 +98,8 @@ Otherwise, you will need to import the keypair manually after installation using
To install the latest stable release, run the following commands as a user who has access to `sudo`:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.7/bootstrap.sh
sudo DOKKU_TAG=v0.25.7 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.4/bootstrap.sh
sudo DOKKU_TAG=v0.26.4 bash bootstrap.sh
```
You can then proceed to configure your server domain (via `dokku domains:set-global`) and user access (via `dokku ssh-keys:add`) to complete the installation.

View File

@@ -189,7 +189,7 @@ install-dokku-from-deb-package() {
fi
OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu"; then
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu" "raspbian"; then
DOKKU_DISTRO="ubuntu"
OS_ID="bionic"
fi
@@ -204,6 +204,11 @@ install-dokku-from-deb-package() {
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
OS_ID="bullseye"
fi
elif [[ "$DOKKU_DISTRO" == "raspbian" ]]; then
OS_IDS=("buster")
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
OS_ID="buster"
fi
fi
echo "--> Installing dokku"

View File

@@ -3,8 +3,9 @@ GO_PLUGIN_MAKE_TARGET ?= build
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
BUILD_IMAGE := golang:1.15.6
GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)
GOARCH ?= amd64
.PHONY: build-in-docker build clean src-clean
@@ -20,7 +21,7 @@ build-in-docker: clean
-e GO111MODULE=on \
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
$(BUILD_IMAGE) \
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
bash -c "GO_ARGS='$(GO_ARGS)' CGO_ENABLED=0 GOOS=linux GOARCH=$(GOARCH) make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
clean:
rm -rf $(BUILD)

View File

@@ -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/

View File

@@ -160,7 +160,7 @@ main() {
}
}
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(command -v dokku) ]]; then
main "$@"
exit $?
fi

View File

@@ -49,6 +49,7 @@ fn-build-dokku() {
--build-arg IS_RELEASE="$IS_RELEASE" \
--build-arg PLUGIN_MAKE_TARGET="build" \
--build-arg GOLANG_VERSION="$GOLANG_VERSION" \
--progress plain \
-f "contrib/build-dokku.Dockerfile" \
-t "$NAME" .
return "$?"
@@ -134,8 +135,19 @@ fn-publish-package() {
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
[[ "$RELEASE_TYPE" == "raspbian" ]] && DIST=raspbian
if [[ "$DIST" == "ubuntu" ]]; then
if [[ "$RELEASE_TYPE" == "raspbian" ]]; then
OS_IDS=("buster")
for OS_ID in "${OS_IDS[@]}"; do
log-info "(release-dokku) pushing deb to packagecloud.com/${REPOSITORY}/${DIST}"
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
ex="$?"
if [[ "$ex" -ne "0" ]]; then
EXIT_CODE="$ex"
fi
done
elif [[ "$DIST" == "ubuntu" ]]; then
OS_IDS=("bionic" "focal")
for OS_ID in "${OS_IDS[@]}"; do
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
@@ -379,11 +391,13 @@ main() {
fn-repo-update "$IS_RELEASE" "$CURRENT_VERSION" "$NEXT_VERSION"
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION" || log-fail "Error building package"
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_armhf.deb" || log-fail "Error extracting deb package"
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb package"
fn-extract-package "$IS_RELEASE" "dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
cp -f "build/dokku_${NEXT_VERSION}_amd64.deb" build/dokku.deb
if [[ "$RELEASE" != "build" ]]; then
fn-publish-package "$IS_RELEASE" "raspbian" "build/dokku_${NEXT_VERSION}_armhf.deb" || log-fail "Error publishing deb package"
fn-publish-package "$IS_RELEASE" "deb" "build/dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
fn-publish-package "$IS_RELEASE" "rpm" "build/dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
fn-build-docker-image "$NEXT_VERSION" || log-fail "Error building docker image"

11
deb.mk
View File

@@ -1,8 +1,7 @@
BUILD_DIRECTORY ?= /tmp
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
DOKKU_REPO_NAME ?= dokku/dokku
DOKKU_ARCHITECTURE = amd64
BUILD_DIRECTORY ?= /tmp
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
DOKKU_REPO_NAME ?= dokku/dokku
DOKKU_ARCHITECTURE ?= amd64
ifndef IS_RELEASE
IS_RELEASE = true
@@ -45,9 +44,9 @@ ifneq (,$(findstring false,$(IS_RELEASE)))
endif
cp -r debian /tmp/build-dokku/DEBIAN
sed -i.bak "s/^Architecture: .*/Architecture: $(DOKKU_ARCHITECTURE)/g" /tmp/build-dokku/DEBIAN/control && rm /tmp/build-dokku/DEBIAN/control.bak
rm -f /tmp/build-dokku/DEBIAN/lintian-overrides
cp debian/lintian-overrides /tmp/build-dokku/usr/share/lintian/overrides/dokku
sed -i.bak "s/^Version: .*/Version: `cat /tmp/build-dokku/var/lib/dokku/STABLE_VERSION`/g" /tmp/build-dokku/DEBIAN/control && rm /tmp/build-dokku/DEBIAN/control.bak
dpkg-deb --build /tmp/build-dokku "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
lintian "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"

4
debian/control vendored
View File

@@ -1,10 +1,10 @@
Package: dokku
Version: 0.25.7
Version: 0.26.4
Section: web
Priority: optional
Architecture: amd64
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), net-tools, netrc, software-properties-common, parallel, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip
Recommends: herokuish (>= 0.3.4), bash-completionl, dokku-update, dokku-event-listener
Recommends: herokuish (>= 0.3.4), bash-completion, dokku-update, dokku-event-listener
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications

View File

@@ -35,35 +35,35 @@ dokku plugin:list
```
plugn: dev
00_dokku-standard 0.25.7 enabled dokku core standard plugin
20_events 0.25.7 enabled dokku core events logging plugin
app-json 0.25.7 enabled dokku core app-json plugin
apps 0.25.7 enabled dokku core apps plugin
build-env 0.25.7 enabled dokku core build-env plugin
buildpacks 0.25.7 enabled dokku core buildpacks plugin
certs 0.25.7 enabled dokku core certificate management plugin
checks 0.25.7 enabled dokku core checks plugin
common 0.25.7 enabled dokku core common plugin
config 0.25.7 enabled dokku core config plugin
docker-options 0.25.7 enabled dokku core docker-options plugin
domains 0.25.7 enabled dokku core domains plugin
enter 0.25.7 enabled dokku core enter plugin
git 0.25.7 enabled dokku core git plugin
logs 0.25.7 enabled dokku core logs plugin
network 0.25.7 enabled dokku core network plugin
nginx-vhosts 0.25.7 enabled dokku core nginx-vhosts plugin
plugin 0.25.7 enabled dokku core plugin plugin
proxy 0.25.7 enabled dokku core proxy plugin
ps 0.25.7 enabled dokku core ps plugin
repo 0.25.7 enabled dokku core repo plugin
resource 0.25.7 enabled dokku core resource plugin
scheduler-docker-local 0.25.7 enabled dokku core scheduler-docker-local plugin
shell 0.25.7 enabled dokku core shell plugin
ssh-keys 0.25.7 enabled dokku core ssh-keys plugin
storage 0.25.7 enabled dokku core storage plugin
tags 0.25.7 enabled dokku core tags plugin
tar 0.25.7 enabled dokku core tar plugin
trace 0.25.7 enabled dokku core trace plugin
00_dokku-standard 0.26.4 enabled dokku core standard plugin
20_events 0.26.4 enabled dokku core events logging plugin
app-json 0.26.4 enabled dokku core app-json plugin
apps 0.26.4 enabled dokku core apps plugin
build-env 0.26.4 enabled dokku core build-env plugin
buildpacks 0.26.4 enabled dokku core buildpacks plugin
certs 0.26.4 enabled dokku core certificate management plugin
checks 0.26.4 enabled dokku core checks plugin
common 0.26.4 enabled dokku core common plugin
config 0.26.4 enabled dokku core config plugin
docker-options 0.26.4 enabled dokku core docker-options plugin
domains 0.26.4 enabled dokku core domains plugin
enter 0.26.4 enabled dokku core enter plugin
git 0.26.4 enabled dokku core git plugin
logs 0.26.4 enabled dokku core logs plugin
network 0.26.4 enabled dokku core network plugin
nginx-vhosts 0.26.4 enabled dokku core nginx-vhosts plugin
plugin 0.26.4 enabled dokku core plugin plugin
proxy 0.26.4 enabled dokku core proxy plugin
ps 0.26.4 enabled dokku core ps plugin
repo 0.26.4 enabled dokku core repo plugin
resource 0.26.4 enabled dokku core resource plugin
scheduler-docker-local 0.26.4 enabled dokku core scheduler-docker-local plugin
shell 0.26.4 enabled dokku core shell plugin
ssh-keys 0.26.4 enabled dokku core ssh-keys plugin
storage 0.26.4 enabled dokku core storage plugin
tags 0.26.4 enabled dokku core tags plugin
tar 0.26.4 enabled dokku core tar plugin
trace 0.26.4 enabled dokku core trace plugin
```
> Warning: All plugin commands other than `plugin:list` and `plugin:help` require sudo access and must be run directly from the Dokku server.

View File

@@ -25,7 +25,7 @@ The [dokku-registry](https://github.com/dokku/dokku-registry) plugin is now buil
- In previous versions of Dokku, the only way to specify a custom `Dockerfile` was to use the `docker-options` plugin to set the `--file` flag for a docker build. As of 0.25.0, the `builder-dockerfile:set` command should be used instead, as outlined in the [docs here](/docs/deployment/builders/dockerfiles.md#changingthe-dockerfile-location). Usage of the old method should be migrated to the new method.
- The `--rm` and `--rm-container` flags may be specified but no longer have any effect on `dokku run`.
- The `--detach` flag is deprecated in favor of the `run:detached` command.
- The `DOKKU_SCALE` file is deprecated. Please see the [process management documentation](/docs/processes/process-management.md#manually-managing-process-scaling) for more information on it's replacement with the `formations` key of the `app.json` file.
- The `DOKKU_SCALE` file is deprecated. Please see the [process management documentation](/docs/processes/process-management.md#manually-managing-process-scaling) for more information on it's replacement with the `formation` key of the `app.json` file.
- The hooks `post-release-buildpack`, `post-release-dockerfile`, and `post-release-pack` are deprecated in favor of `post-release-builder`. See the [plugin triggers documentation](https://dokku.com/docs/development/plugin-triggers/#post-release-builder) for more details.
## Removals

View 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.

View File

@@ -2,10 +2,10 @@
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/mstile-310x150.png"/>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-310x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>

View File

@@ -2,37 +2,37 @@
"name": "Dokku",
"icons": [
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-36x36.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-48x48.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-72x72.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-96x96.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-144x144.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.7\/docs\/assets\/favicons\/android-chrome-192x192.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"

View File

@@ -42,13 +42,13 @@ h1 {
font-size: 1.6em;
}
.header .navbar-brand a {
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/dokku.png);
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/dokku.png);
text-indent: 40px;
}
.blurb {
color: #424242;
background-color: #ededed;
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/gplaypattern.png);
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/gplaypattern.png);
padding: 45px 0;
text-align: center;
}
@@ -540,7 +540,9 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
bottom: 20px;
display: block;
left: auto;
max-height: 600px;
max-width: 300px;
overflow: scroll;
right: 20px;
width: auto;
}

View File

@@ -22,6 +22,7 @@
"0.22.9",
"0.23.9",
"0.24.10",
"0.25.7"
"0.25.7",
"0.26.4"
]
}

View File

@@ -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:

View File

@@ -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.

View File

@@ -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)

View File

@@ -1,38 +0,0 @@
# Tarball Deployment
> Warning: As of 0.24.0, this functionality is deprecated in favor of the [`git:from-archive`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-an-archive-file) command. It will be removed in a future release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-archive`.
>
> New as of 0.4.0
```
tar:from <app> <url> # Loads an app tarball from url
tar:in <app> # Reads an tarball containing the app from stdin
```
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tar` plugin, the following may occur:
>
> - Applications previously deployed via another method (`git`): The application may revert to a state before the latest custom image tag was deployed.
> - Applications that were only ever deployed via the `tar` plugin: The application will be properly rebuilt.
>
> Please use the appropriate `tar` command when redeploying an application deployed via tarball.
## Usage
### Deploying from a tarball
In some cases, it may be useful to deploy an application from a tarball. For instance, if you implemented a non-Git based deployment plugin, tarring the generated artifact may be an easier route to interface with the existing Dokku infrastructure.
You can place the tarball on an external webserver and deploy via the `tar:from` command.
```shell
dokku tar:from node-js-app https://dokku.me/releases/node-js-app/v1
```
### Deploying via stdin
As an alternative, a deploy can be trigged from a tarball read from stdin using the `tar:in` command:
```shell
# run from the generated artifact directory
tar c . $* | dokku tar:in node-js-app
```

View File

@@ -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).

View File

@@ -37,9 +37,9 @@ Once set, you may re-enable it by setting a blank value for `disable-chown`:
dokku scheduler-docker-local:set node-js-app disable-chown
```
### Deploying Process Types in parallel
### Deploying Process Types in Parallel
> New as of 25.5
> New as of 0.25.5
By default, Dokku deploys an app's processes one-by-one in order, with the `web` process being deployed first. Deployment parallelism may be achieved by setting the `parallel-schedule-count` property, which defaults to `1`. Increasing this number increases the number of process types that may be deployed in parallel (with the web process being the exception).
@@ -60,30 +60,50 @@ Container scheduling output is shown in the order it is received, and thus may b
Note that increasing the value of `parallel-schedule-count` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.
#### Increasing parallelism within a process deploy
> New as of 0.26.0
By default, Dokku will deploy one instance of a given process type at a time. This can be increased by customizing the `app.json` `formation` key to include a `max_parallel` key for the given process type.
An `app.json` file can be committed to the root of the pushed app repository, and must be within the built image artifact in the image's working directory as shown below.
- Buildpacks: `/app/app.json`
- Dockerfile: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
- Docker Image: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
The `formation` key should be specified as follows in the `app.json` file:
```Procfile
{
"formation": {
"web": {
"max_parallel": 1
},
"worker": {
"max_parallel": 4
}
}
}
```
Omitting or removing the entry will result in parallelism for that process type to return to 1 entry at a time. This can be combined with the `parallel-schedule-count` property to speed up deployments.
Note that increasing the value of `max_parallel` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.
## Implemented Triggers
This plugin implements various functionality through `plugn` triggers to integrate with Docker for running apps on a single server. The following functionality is supported by the `scheduler-docker-local` plugin.
- `check-deploy`
- `core-post-deploy`
- `post-app-clone-setup`
- `post-app-rename-setup`
- `post-create`
- `post-delete`
- `pre-deploy`
- `pre-restore`
- `scheduler-app-status`
- `scheduler-deploy`
- `scheduler-docker-cleanup`
- `scheduler-inspect`
- `scheduler-is-deployed`
- `scheduler-logs`
- `scheduler-logs-failed`
- `scheduler-retire`
- `scheduler-run`
- `scheduler-stop`
- `scheduler-tags-create`
- `scheduler-tags-destroy`
- `apps:clone`
- `apps:destroy`
- `apps:rename`
- `deploy`
- `enter`
- `logs`
- `ps:inspect`
- `ps:stop`
- `run`
## Supported Resource Management Properties

View 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).

View 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).

View File

@@ -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
```

View 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.

View File

@@ -74,6 +74,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `app-json-process-deploy-parallelism`
- Description: Decides the parallelism to use when deploying a given process type. The default is 1 process entry at a type.
- Invoked by: `dokku deploy`
- Arguments: `$APP $PROCESS_TYPE`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `app-maybe-create`
- Description: Creates an app (gated by whether this is globally enabled or not)
@@ -346,8 +361,8 @@ curl "http://httpstat.us/200"
> To avoid issues with community plugins, this plugin trigger should be used _only_ for core plugins. Please avoid using this trigger in your own plugins.
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git/tarball but _before_ the image source type is detected.
- Invoked by: `dokku tar:in`, `dokku tar:from` and the `receive-app` plugin trigger
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git but _before_ the image source type is detected.
- Invoked by: The `receive-app` plugin trigger
- Arguments: `$APP` `$TMP_WORK_DIR` `$REV`
- Example:
@@ -418,7 +433,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
export DEBIAN_FRONTEND=noninteractive
case "$DOKKU_DISTRO" in
debian|ubuntu)
debian|raspbian|ubuntu)
apt-get -qq -y --no-install-recommends install nginx
;;
@@ -428,31 +443,22 @@ case "$DOKKU_DISTRO" in
esac
```
### `deploy-source`
### `deploy`
- Description: Used for reporting what the current detected deployment source is. The first detected source should always win.
- Invoked by: `dokku apps:report`
- Arguments: `$APP`
- Description: Triggers a deploy for the given app. Can override the image tag to deploy, as well as specify a single process type to deploy.
- Invoked by: `dokku deploy`
- Arguments: `$APP [$IMAGE_TAG] [$PROC_TYPE]`
- Example:
```shell
#!/usr/bin/env bash
# Checks if the app should be deployed via git
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"
STDIN=$(cat)
APP="$1" IMAGE_TAG="$2" PROC_TYPE="$3"
# bail if another source is detected
if [[ -n "$STDIN" ]]; then
echo "$STDIN"
return
fi
if [[ -d "$DOKKU_ROOT/$APP/refs" ]]; then
echo "git"
fi
# TODO
```
### `deployed-app-image-repo`
@@ -944,7 +950,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
- Description: Return the port for a given app container
- Invoked by: `internally triggered by a deploy`
- Arguments: `$APP $PROC_TYPE $CONTAINER_ID $IS_HEROKUISH_CONTAINER`
- Arguments: `$APP $PROCESS_TYPE $CONTAINER_ID $IS_HEROKUISH_CONTAINER`
- Example:
```shell
@@ -1349,8 +1355,8 @@ sudo service haproxy reload
### `post-extract`
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git/tarball but _before_ the image source type is detected.
- Invoked by: `dokku tar:in`, `dokku tar:from` and the `receive-app` plugin trigger
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git but _before_ the image source type is detected.
- Invoked by: The `receive-app` plugin trigger
- Arguments: `$APP` `$TMP_WORK_DIR` `$REV`
- Example:
@@ -2058,6 +2064,25 @@ DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_TAG="$3";
# TODO
```
### `scheduler-detect`
> Warning: The scheduler plugin trigger apis are under development and may change
> between minor releases until the 1.0 release.
- Description: Allows you to check which scheduler is in use for an app
- Invoked by: `dokku deploy`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"
# TODO
```
### `scheduler-enter`
> Warning: The scheduler plugin trigger apis are under development and may change
@@ -2249,44 +2274,6 @@ DOKKU_SCHEDULER="$1"; APP="$2"; REMOVE_CONTAINERS="$3";
# TODO
```
### `scheduler-tags-create`
> Warning: The scheduler plugin trigger apis are under development and may change
> between minor releases until the 1.0 release.
- Description: Allows you to run scheduler commands when a tag is created
- Invoked by: `dokku tags:create`
- Arguments: `$DOKKU_SCHEDULER $APP $SOURCE_IMAGE $TARGET_IMAGE`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
DOKKU_SCHEDULER="$1" APP="$2" SOURCE_IMAGE="$3" TARGET_IMAGE="$4"
# TODO
```
### `scheduler-tags-destroy`
> Warning: The scheduler plugin trigger apis are under development and may change
> between minor releases until the 1.0 release.
- Description: Allows you to run scheduler commands when a tag is destroyed
- Invoked by: `dokku tags:destroy`
- Arguments: `$DOKKU_SCHEDULER $APP $IMAGE_REPO $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_REPO="$3"; IMAGE_TAG="$4";
# TODO
```
### `storage-list`
- Description: Returns a list of storage mounts
@@ -2302,41 +2289,6 @@ APP="$1"
# TODO
```
### `tags-create`
- Description: Allows you to run commands once a tag for an app image has been added
- Invoked by: `dokku tags:create`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Upload an app image to docker hub
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
IMAGE_ID=$(docker inspect --format '{{ .Id }}' $IMAGE)
docker tag -f $IMAGE_ID $DOCKER_HUB_USER/$APP:$IMAGE_TAG
docker push $DOCKER_HUB_USER/$APP:$IMAGE_TAG
```
### `tags-destroy`
- Description: Allows you to run commands once a tag for an app image has been removed
- Invoked by: `dokku tags:destroy`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Remove an image tag from docker hub
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; IMAGE_TAG="$2"
# some code to remove a docker hub tag because it's not implemented in the CLI...
```
### `uninstall`

View File

@@ -29,7 +29,7 @@ The workflow looks like this:
```shell
# having dokku-arch in ../dokku-arch
vagrant up build-arch
# wait for "==> build-arch: ==> Finished making: dokku 0.25.7-2 (Mon Feb 22 23:20:37 CET 2016)"
# wait for "==> build-arch: ==> Finished making: dokku 0.26.4-2 (Mon Feb 22 23:20:37 CET 2016)"
cd ../dokku-arch
git add PKGBUILD .SRCINFO
git commit -m 'Update to dokku 0.9.9'

View File

@@ -3,7 +3,7 @@
Pull the dokku/dokku image:
```shell
docker pull dokku/dokku:0.25.7
docker pull dokku/dokku:0.26.4
```
Next, run the image.
@@ -18,9 +18,11 @@ docker container run \
--publish 8443:443 \
--volume /var/lib/dokku:/mnt/dokku \
--volume /var/run/docker.sock:/var/run/docker.sock \
dokku/dokku:0.25.7
dokku/dokku:0.26.4
```
The above command will start a new docker container that is ready when a message similar to `Runit started as PID 12345` appears.
Dokku is run in the following configuration:
- The global hostname is set to `dokku.me` on boot.

View File

@@ -19,8 +19,8 @@ To install the latest stable version of Dokku, you can run the following shell c
```shell
# for debian systems, installs Dokku via apt-get
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.7/bootstrap.sh;
sudo DOKKU_TAG=v0.25.7 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.4/bootstrap.sh;
sudo DOKKU_TAG=v0.26.4 bash bootstrap.sh
```
The installation process takes about 5-10 minutes, depending upon internet connection speed.

View File

@@ -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:

View File

@@ -10,30 +10,30 @@
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/style.css" rel="stylesheet">
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
<style>
</style>
@@ -95,12 +95,12 @@
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.25.7/bootstrap.sh</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.26.4/bootstrap.sh</span>
</p>
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.25.7 bash bootstrap.sh</span>
<span class="command">sudo DOKKU_TAG=v0.26.4 bash bootstrap.sh</span>
</p>
<p class="line">
<span class="output">&nbsp;# Configure your server domain via `dokku domains:set-global`</span>

View File

@@ -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

View File

@@ -6,7 +6,7 @@
ps:inspect <app> # Displays a sanitized version of docker inspect for an app
ps:rebuild [--parallel count] [--all|<app>] # Rebuilds an app from source
ps:report [<app>] [<flag>] # Displays a process report for one or more apps
ps:restart [--parallel count] [--all|<app>] # Restart an app
ps:restart [--parallel count] [--all|<app>] [<process-name>] # Restart an app
ps:restore [<app>] # Start previously running apps e.g. after reboot
ps:scale [--skip-deploy] <app> <proc>=<count> [<proc>=<count>...] # Get/Set how many instances of a given process to run
ps:set <app> <key> <value> # Set or clear a ps property for an app
@@ -30,9 +30,6 @@ This command will gather all the running container IDs for your app and call `do
### Rebuilding apps
> Warning: This section applies only to git-based deploys, and only works deterministically for these apps. Please see the [images documentation](/docs/deployment/methods/images.md) and [tar documentation](/docs/deployment/methods/tar.md)
> in for more information concerning rebuilding those apps.
It may be useful to rebuild an app at will, such as for commands that do not rebuild an app or when skipping a rebuild after setting multiple config values. For these use cases, the `ps:rebuild` function can be used.
```shell
@@ -67,7 +64,13 @@ An app may be restarted using the `ps:restart` command.
dokku ps:restart node-js-app
```
All apps may be restarted by using the `--all` flag.
A single process type - such as `web` or `worker` - may also be specified. This _does not_ support specifying a given instance of a process type, and only supports restarting all instances of that process type.
```shell
dokku ps:restart node-js-app web
```
All apps may be restarted by using the `--all` flag. This flag is incompatible with specifying a process type.
```shell
dokku ps:restart --all
@@ -128,7 +131,7 @@ dokku ps:scale --skip-deploy node-js-app web=1
#### Manually managing process scaling
> Using a `formation` key in an `app.json` file disables the ability to use `ps:scale` for scaling.
> Using a `formation` key in an `app.json` file with _any_ `quantity` specified disables the ability to use `ps:scale` for scaling.
An `app.json` file can be committed to the root of the pushed app repository, and must be within the built image artifact in the image's working directory as shown below.

View File

@@ -9,26 +9,26 @@
<meta name="author" content="">
<title>Dokku - {{DOC_TITLE}}</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script>
@@ -42,7 +42,7 @@
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.7/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.4/docs/assets/style.css" rel="stylesheet">
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<style>
@@ -118,11 +118,10 @@
<a href="/{{NAME}}/deployment/builders/cloud-native-buildpacks/" class="list-group-item">Cloud Native Buildpacks</a>
<a href="/{{NAME}}/deployment/builders/herokuish-buildpacks/" class="list-group-item">Herokuish Buildpacks</a>
<a href="/{{NAME}}/deployment/builders/dockerfiles/" class="list-group-item">Dockerfile Deployment</a>
<a href="/{{NAME}}/deployment/builders/null/" class="list-group-item">Null Builder</a>
<a href="#" class="list-group-item disabled">Deployment Methods</a>
<a href="/{{NAME}}/deployment/methods/images/" class="list-group-item">Docker Image Deployment</a>
<a href="/{{NAME}}/deployment/methods/git/" class="list-group-item">Git Deployment</a>
<a href="/{{NAME}}/deployment/methods/tar/" class="list-group-item">Tarfile Deployment</a>
<a href="#" class="list-group-item disabled">Configuration</a>
@@ -159,8 +158,12 @@
<a href="#" class="list-group-item disabled">Schedulers</a>
<a href="/{{NAME}}/advanced-usage/schedulers/docker-local/" class="list-group-item">Docker Local</a>
<a href="/{{NAME}}/advanced-usage/schedulers/alternate-schedulers/" class="list-group-item">Alternate Schedulers</a>
<a href="/{{NAME}}/deployment/schedulers/scheduler-management/" class="list-group-item">Scheduler Management</a>
<a href="/{{NAME}}/deployment/schedulers/docker-local/" class="list-group-item">Docker Local</a>
<a href="/{{NAME}}/deployment/schedulers/kubernetes/" class="list-group-item">Kubernetes</a>
<a href="/{{NAME}}/deployment/schedulers/nomad/" class="list-group-item">Nomad</a>
<a href="/{{NAME}}/deployment/schedulers/null/" class="list-group-item">Null Scheduler</a>
<a href="/{{NAME}}/deployment/schedulers/alternate-schedulers/" class="list-group-item">Alternate Schedulers</a>
<a href="#" class="list-group-item disabled">Development</a>

View File

@@ -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/",

View File

@@ -6,7 +6,7 @@ if [[ ! -f "$DOKKU_ROOT/VHOST" ]]; then
[[ $(dig +short "$(hostname -f)") ]] && hostname -f >"$DOKKU_ROOT/VHOST"
fi
dokku_path="$(which dokku)"
dokku_path="$(command -v dokku)"
# temporary hack for https://github.com/dokku/dokku/issues/82
# redeploys all apps after a reboot

View File

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

View File

@@ -23,7 +23,11 @@ cmd-report() {
dokku_log_info1 "git version: $(git --version)"
dokku_log_info1 "sigil version: $(sigil -v)"
dokku_log_info1 "herokuish version: "
"$DOCKER_BIN" container run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
if [[ "$(dpkg --print-architecture 2>/dev/null || true)" == "armhf" ]]; then
dokku_log_warn "herokuish not supported on armhf architecture"
else
"$DOCKER_BIN" container run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
fi
dokku_log_info1 "dokku version: $(dokku_version)"
dokku_log_info1 "plugn version: $(plugn version)"
dokku_log_info1 "dokku plugins: "

View File

@@ -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

View File

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

View File

@@ -1 +0,0 @@
hook

View File

@@ -1 +0,0 @@
hook

View File

@@ -6,3 +6,4 @@
/subcommands/*
/triggers
/triggers/*
/app-json-process-deploy-parallelism

View File

@@ -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

View File

@@ -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

View 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,
}
}

View File

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

View File

@@ -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)

View File

@@ -8,6 +8,32 @@ import (
"github.com/dokku/dokku/plugins/common"
)
// TriggerAppJSONProcessDeployParallelism returns the max number of processes to deploy in parallel
func TriggerAppJSONProcessDeployParallelism(appName string, processType string) error {
appJSON, err := getAppJSON(appName)
if err != nil {
return err
}
parallelism := 1
for procType, formation := range appJSON.Formation {
if procType != processType {
continue
}
if formation.MaxParallel == nil {
continue
}
if *formation.MaxParallel > 0 {
parallelism = *formation.MaxParallel
}
}
fmt.Println(parallelism)
return nil
}
// TriggerInstall initializes app restart policies
func TriggerInstall() error {
if err := common.PropertySetup("app-json"); err != nil {
@@ -22,6 +48,29 @@ func TriggerInstall() error {
return common.SetPermissions(directory, 0755)
}
// TriggerPostAppCloneSetup creates new app-json files
func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
err := common.PropertyClone("app-json", oldAppName, newAppName)
if err != nil {
return err
}
return nil
}
// TriggerPostAppRenameSetup renames app-json files
func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
if err := common.PropertyClone("app-json", oldAppName, newAppName); err != nil {
return err
}
if err := common.PropertyDestroy("app-json", oldAppName); err != nil {
return err
}
return nil
}
// TriggerPostDelete destroys the app-json data for a given app container
func TriggerPostDelete(appName string) error {
directory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json", appName)

View File

@@ -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
View 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,
}
)

View File

@@ -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
}

View File

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

View File

@@ -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 {

View File

@@ -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)

View File

@@ -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())

View File

@@ -36,7 +36,7 @@ trigger-builder-dockerfile-builder-build() {
declare -a ARG_ARRAY
eval "ARG_ARRAY=($DOCKER_ARGS)"
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" "${DOKKU_DOCKER_BUILD_OPTS[@]}" -t $IMAGE .
"$DOCKER_BIN" image build $DOCKER_BUILD_LABEL_ARGS $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" "${DOKKU_DOCKER_BUILD_OPTS[@]}" -t $IMAGE .
plugn trigger post-build-dockerfile "$APP"
}

View File

@@ -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"
}

View File

@@ -0,0 +1,2 @@
ARG APP_IMAGE
FROM $APP_IMAGE

View 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 "$@"

View File

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

View 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 "$@"

View 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 "$@"

View 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 "$@"

View File

@@ -8,6 +8,10 @@ trigger-builder-herokuish-builder-detect() {
declare trigger="builder-detect"
declare APP="$1" SOURCECODE_WORK_DIR="$2"
if [[ "$(dpkg --print-architecture 2>/dev/null || true)" == "armhf" ]]; then
return
fi
if fn-has-buildpacks-file "$SOURCECODE_WORK_DIR"; then
echo "herokuish"
return

View File

@@ -25,7 +25,7 @@ trigger-builder-herokuish-builder-release() {
config_export global >"$TMP_WORK_DIR/00-global-env.sh"
config_export app "$APP" >"$TMP_WORK_DIR/01-app-env.sh"
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t $IMAGE "$TMP_WORK_DIR"; then
if ! suppress_output "$DOCKER_BIN" image build $DOCKER_BUILD_LABEL_ARGS $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t $IMAGE "$TMP_WORK_DIR"; then
dokku_log_warn "Failure injecting environment variables"
return 1
fi

View 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 "$@"

View File

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

View 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 "$@"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-null plugin"
version = "0.25.7"
version = "0.26.4"
[plugin.config]

13
plugins/builder-pack/install Executable file
View 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 "$@"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-pack plugin"
version = "0.25.7"
version = "0.26.4"
[plugin.config]

View 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 "$@"

View 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 "$@"

View 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 "$@"

View File

@@ -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

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder plugin"
version = "0.25.7"
version = "0.26.4"
[plugin.config]

View File

@@ -21,18 +21,26 @@ func main() {
case "builder-detect":
appName := flag.Arg(0)
err = builder.TriggerBuilderDetect(appName)
case "core-post-extract":
appName := flag.Arg(0)
sourceWorkDir := flag.Arg(1)
err = builder.TriggerCorePostExtract(appName, sourceWorkDir)
case "install":
err = builder.TriggerInstall()
case "post-app-clone-setup":
oldAppName := flag.Arg(0)
newAppName := flag.Arg(1)
err = builder.TriggerPostAppCloneSetup(oldAppName, newAppName)
case "post-app-rename-setup":
oldAppName := flag.Arg(0)
newAppName := flag.Arg(1)
err = builder.TriggerPostAppRenameSetup(oldAppName, newAppName)
case "post-delete":
appName := flag.Arg(0)
err = builder.TriggerPostDelete(appName)
case "report":
appName := flag.Arg(0)
err = builder.ReportSingleApp(appName, "", "")
case "core-post-extract":
appName := flag.Arg(0)
sourceWorkDir := flag.Arg(1)
err = builder.TriggerCorePostExtract(appName, sourceWorkDir)
default:
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
}

View File

@@ -71,6 +71,29 @@ func TriggerInstall() error {
return nil
}
// TriggerPostAppCloneSetup creates new builder files
func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
err := common.PropertyClone("builder", oldAppName, newAppName)
if err != nil {
return err
}
return nil
}
// TriggerPostAppRenameSetup renames builder files
func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
if err := common.PropertyClone("builder", oldAppName, newAppName); err != nil {
return err
}
if err := common.PropertyDestroy("builder", oldAppName); err != nil {
return err
}
return nil
}
// TriggerPostDelete destroys the builder property for a given app container
func TriggerPostDelete(appName string) error {
return common.PropertyDestroy("builder", appName)

View File

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

View File

@@ -136,9 +136,9 @@ fn-ssl-verified() {
fi
if [[ -f "$APP_SSL_PATH/server.letsencrypt.crt" ]]; then
SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver -CAfile "$APP_SSL_PATH/server.crt" "$APP_SSL_PATH/server.letsencrypt.crt" | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver -CAfile "$APP_SSL_PATH/server.crt" "$APP_SSL_PATH/server.letsencrypt.crt" 2>/dev/null | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
else
SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver "$APP_SSL_PATH/server.crt" | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver "$APP_SSL_PATH/server.crt" 2>/dev/null | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
fi
if [[ "$SSL_VERIFY_OUTPUT" == "OK" ]]; then

View File

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

View File

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

View File

@@ -101,7 +101,7 @@ func GetAppScheduler(appName string) string {
}
func getAppScheduler(appName string) string {
b, _ := PlugnTriggerOutput("config-get", []string{appName, "DOKKU_SCHEDULER"}...)
b, _ := PlugnTriggerOutput("scheduler-detect", []string{appName}...)
value := strings.TrimSpace(string(b[:]))
if value != "" {
return value
@@ -111,7 +111,7 @@ func getAppScheduler(appName string) string {
// GetGlobalScheduler fetchs the global scheduler
func GetGlobalScheduler() string {
b, _ := PlugnTriggerOutput("config-get-global", []string{"DOKKU_SCHEDULER"}...)
b, _ := PlugnTriggerOutput("scheduler-detect", []string{"--global"}...)
value := strings.TrimSpace(string(b[:]))
if value != "" {
return value
@@ -226,20 +226,21 @@ func GetAppRunningContainerIDs(appName string, containerType string) ([]string,
return runningContainerIDs, nil
}
// GetRunningImageTag retrieves current image tag for a given app and returns empty string if no deployed containers are found
func GetRunningImageTag(appName string) (string, error) {
containerIDs, err := GetAppContainerIDs(appName, "")
// GetRunningImageTag retrieves current deployed image tag for a given app
func GetRunningImageTag(appName string, imageTag string) (string, error) {
b, err := PlugnTriggerOutput("deployed-app-image-tag", []string{appName}...)
if err != nil {
return "", err
return imageTag, err
}
newImageTag := strings.TrimSpace(string(b[:]))
if newImageTag != "" {
imageTag = newImageTag
}
if imageTag == "" {
imageTag = "latest"
}
for _, containerID := range containerIDs {
if image, err := DockerInspect(containerID, "{{ .Config.Image }}"); err == nil {
return strings.Split(image, ":")[1], nil
}
}
return "", errors.New("No image tag found")
return imageTag, nil
}
// DokkuApps returns a list of all local apps

6
plugins/common/deploy Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
cmd-deploy "$@"

View File

@@ -286,16 +286,14 @@ get_deploying_app_image_name() {
declare desc="return deploying image identifier for a given app, tag tuple. validate if tag is presented"
local APP="$1"
local IMAGE_TAG="$2"
IMAGE_REPO="$3"
local IMAGE_REPO="$3"
IMAGE_TAG="$(get_running_image_tag "$APP" "$IMAGE_TAG")"
local IMAGE_REMOTE_REPOSITORY=$(plugn trigger deployed-app-repository "$APP")
local NEW_IMAGE_TAG=$(plugn trigger deployed-app-image-tag "$APP")
local NEW_IMAGE_REPO=$(plugn trigger deployed-app-image-repo "$APP")
[[ -n "$NEW_IMAGE_REPO" ]] && IMAGE_REPO="$NEW_IMAGE_REPO"
[[ -n "$NEW_IMAGE_TAG" ]] && IMAGE_TAG="$NEW_IMAGE_TAG"
[[ -z "$IMAGE_REPO" ]] && IMAGE_REPO=$(get_app_image_repo "$APP")
[[ -z "$IMAGE_TAG" ]] && IMAGE_TAG="latest"
local IMAGE="${IMAGE_REMOTE_REPOSITORY}${IMAGE_REPO}:${IMAGE_TAG}"
verify_image "$IMAGE" || dokku_log_fail "App image ($IMAGE) not found"
@@ -324,31 +322,19 @@ get_app_image_name() {
get_app_scheduler() {
declare desc="fetch the scheduler for a given application"
declare APP="$1"
local DOKKU_APP_SCHEDULER DOKKU_GLOBAL_SCHEDULER DOKKU_SCHEDULER
if [[ "$APP" == "--global" ]]; then
APP=""
fi
source "$PLUGIN_AVAILABLE_PATH/config/functions"
[[ -n "$APP" ]] && DOKKU_APP_SCHEDULER="$(config_get "$APP" DOKKU_SCHEDULER || true)"
DOKKU_GLOBAL_SCHEDULER="$(config_get --global DOKKU_SCHEDULER || true)"
DOKKU_SCHEDULER=${DOKKU_APP_SCHEDULER:="$DOKKU_GLOBAL_SCHEDULER"}
if [[ -z "$DOKKU_SCHEDULER" ]]; then
DOKKU_SCHEDULER="docker-local"
fi
echo "$DOKKU_SCHEDULER"
"$PLUGIN_CORE_AVAILABLE_PATH/common/common" --quiet scheduler-detect "$APP"
}
get_running_image_tag() {
declare desc="retrieve current image tag for a given app. returns empty string if no deployed containers are found"
local APP="$1"
declare desc="retrieves current deployed image tag for a given app"
local APP="$1" IMAGE_TAG="$2"
local CIDS=($(get_app_container_ids "$APP"))
local RUNNING_IMAGE_TAG=$("$DOCKER_BIN" container inspect --format '{{ .Config.Image }}' "${CIDS[0]}" 2>/dev/null | awk -F: '{ print $2 }' || echo '')
echo "$RUNNING_IMAGE_TAG"
local NEW_IMAGE_TAG=$(plugn trigger deployed-app-image-tag "$APP")
[[ -n "$NEW_IMAGE_TAG" ]] && IMAGE_TAG="$NEW_IMAGE_TAG"
[[ -z "$IMAGE_TAG" ]] && IMAGE_TAG="latest"
echo "$IMAGE_TAG"
}
is_image_cnb_based() {
@@ -652,12 +638,11 @@ dokku_release() {
cmd-deploy() {
declare desc="deploy phase"
declare APP="$1" IMAGE_TAG="$2"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
declare APP="$1" IMAGE_TAG="$2" PROCESS_TYPE="$3"
verify_app_name "$APP"
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
plugn trigger scheduler-deploy "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG"
plugn trigger scheduler-deploy "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG" "$PROCESS_TYPE"
}
release_and_deploy() {
@@ -690,7 +675,8 @@ release_and_deploy() {
dokku_release "$APP" "$IMAGE_SOURCE_TYPE" "$IMAGE_TAG"
if [[ "$DOKKU_SKIP_DEPLOY" != "true" ]]; then
dokku_log_info1 "Deploying $APP..."
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
dokku_log_info1 "Deploying $APP via the $DOKKU_SCHEDULER scheduler..."
cmd-deploy "$APP" "$IMAGE_TAG"
dokku_log_info2 "Application deployed:"
get_app_urls urls "$APP" | sed "s/^/ /"
@@ -1049,7 +1035,7 @@ merge_dedupe_list() {
}
acquire_app_deploy_lock() {
declare desc="acquire advisory lock for use in git/tar deploys"
declare desc="acquire advisory lock for use in deploys"
local APP="$1"
local LOCK_TYPE="${2:-waiting}"
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"
@@ -1060,7 +1046,7 @@ acquire_app_deploy_lock() {
}
release_app_deploy_lock() {
declare desc="release advisory lock used in git/tar deploys"
declare desc="release advisory lock used in deploys"
local APP="$1"
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"

View File

@@ -1,11 +1,11 @@
package common
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
"sync"
)
// ErrWithExitCode wraps error and exposes an ExitCode method
@@ -13,6 +13,37 @@ type ErrWithExitCode interface {
ExitCode() int
}
type writer struct {
mu *sync.Mutex
source string
}
// Write prints the data to either stdout or stderr using the log helper functions
func (w *writer) Write(bytes []byte) (int, error) {
w.mu.Lock()
defer w.mu.Unlock()
if w.source == "stdout" {
for _, line := range strings.Split(string(bytes), "\n") {
if line == "" {
continue
}
LogVerboseQuiet(line)
}
} else {
for _, line := range strings.Split(string(bytes), "\n") {
if line == "" {
continue
}
LogVerboseStderrQuiet(line)
}
}
return len(bytes), nil
}
// LogFail is the failure log formatter
// prints text to stderr and exits with status 1
func LogFail(text string) {
@@ -81,6 +112,12 @@ func LogVerbose(text string) {
fmt.Println(fmt.Sprintf(" %s", text))
}
// LogVerboseStderr is the verbose log formatter
// prints indented text to stderr
func LogVerboseStderr(text string) {
fmt.Fprintln(os.Stderr, fmt.Sprintf(" ! %s", text))
}
// LogVerboseQuiet is the verbose log formatter
// prints indented text to stdout (with quiet option)
func LogVerboseQuiet(text string) {
@@ -89,25 +126,17 @@ func LogVerboseQuiet(text string) {
}
}
// LogVerboseStderrQuiet is the verbose log formatter
// prints indented text to stderr (with quiet option)
func LogVerboseStderrQuiet(text string) {
if os.Getenv("DOKKU_QUIET_OUTPUT") == "" {
LogVerboseStderr(text)
}
}
// LogVerboseQuietContainerLogs is the verbose log formatter for container logs
func LogVerboseQuietContainerLogs(containerID string) {
sc := NewShellCmdWithArgs(DockerBin(), "container", "logs", containerID)
sc.ShowOutput = false
b, err := sc.CombinedOutput()
if err != nil {
LogExclaim(fmt.Sprintf("Failed to fetch container logs: %s", containerID))
}
output := strings.TrimSpace(string(b))
if len(output) == 0 {
return
}
for _, line := range strings.Split(output, "\n") {
if line != "" {
LogVerboseQuiet(line)
}
}
LogVerboseQuietContainerLogsTail(containerID, 0, false)
}
// LogVerboseQuietContainerLogsTail is the verbose log formatter for container logs with tail mode enabled
@@ -119,17 +148,25 @@ func LogVerboseQuietContainerLogsTail(containerID string, lines int, tail bool)
if tail {
args = append(args, "--follow")
}
sc := NewShellCmdWithArgs(DockerBin(), args...)
stdout, _ := sc.Command.StdoutPipe()
sc.Command.Start()
scanner := bufio.NewScanner(stdout)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
m := scanner.Text()
LogVerboseQuiet(m)
sc := NewShellCmdWithArgs(DockerBin(), args...)
var mu sync.Mutex
sc.Command.Stdout = &writer{
mu: &mu,
source: "stdout",
}
sc.Command.Stderr = &writer{
mu: &mu,
source: "stderr",
}
if err := sc.Command.Start(); err != nil {
LogExclaim(fmt.Sprintf("Failed to fetch container logs: %s", containerID))
}
if err := sc.Command.Wait(); err != nil {
LogExclaim(fmt.Sprintf("Failed to fetch container logs: %s", containerID))
}
sc.Command.Wait()
}
// LogWarn is the warning log formatter

View File

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

View File

@@ -32,6 +32,12 @@ func main() {
if !common.IsDeployed(appName) {
err = fmt.Errorf("App %v not deployed", appName)
}
case "scheduler-detect":
appName := flag.Arg(1)
if *global {
appName = "--global"
}
fmt.Print(common.GetAppScheduler(appName))
default:
err = fmt.Errorf("Invalid common command call: %v", cmd)
}

View File

@@ -117,7 +117,7 @@ func UnsetAll(appName string, restart bool) (err error) {
func triggerRestart(appName string) {
common.LogInfo1(fmt.Sprintf("Restarting app %s", appName))
if err := common.PlugnTrigger("app-restart", appName); err != nil {
if err := common.PlugnTrigger("release-and-deploy", appName); err != nil {
common.LogWarn(fmt.Sprintf("Failure while restarting app: %s", err))
}
}

View File

@@ -7,25 +7,13 @@ source "$PLUGIN_AVAILABLE_PATH/config/functions"
trigger-config-docker-args() {
declare desc="config docker-args plugin trigger"
declare trigger="docker-args"
declare APP="$1" IMAGE_TAG="$2"
local ENV_ARGS IMAGE STDIN trigger
declare APP="$1"
local ENV_ARGS STDIN
IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
STDIN=$(cat)
trigger="$0 config_docker_args"
if is_image_cnb_based "$IMAGE"; then
ENV_ARGS="$(config_export app "$APP" --format docker-args-keys --merged)"
echo -n "$STDIN $ENV_ARGS"
return
fi
if ! is_image_herokuish_based "$IMAGE" "$APP"; then
ENV_ARGS="$(config_export app "$APP" --format docker-args --merged)"
echo -n "$STDIN $ENV_ARGS"
else
echo -n "$STDIN"
fi
ENV_ARGS="$(config_export app "$APP" --format docker-args-keys --merged)"
echo -n "$STDIN $ENV_ARGS"
}
trigger-config-docker-args "$@"

View File

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

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core cron plugin"
version = "0.25.7"
version = "0.26.4"
[plugin.config]

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