Compare commits
128 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6404f813d | ||
|
|
8d0977f015 | ||
|
|
f9deab94f9 | ||
|
|
a54b49362d | ||
|
|
360c10d90e | ||
|
|
9201860aa8 | ||
|
|
3a5942b75d | ||
|
|
5bf4c41c1d | ||
|
|
0f1682a9b7 | ||
|
|
1222ff9c92 | ||
|
|
410c3dd103 | ||
|
|
3028dc4182 | ||
|
|
69e449788d | ||
|
|
c3d23103e2 | ||
|
|
e5d626574c | ||
|
|
cce61f52ad | ||
|
|
bfe21844ea | ||
|
|
0532cae666 | ||
|
|
a6b36ae62f | ||
|
|
8766820974 | ||
|
|
85b09e11cf | ||
|
|
5d1d466edb | ||
|
|
a9930fb167 | ||
|
|
b628b68aef | ||
|
|
a1e7f19580 | ||
|
|
f4b4752e20 | ||
|
|
b3d547db30 | ||
|
|
23a54f58b0 | ||
|
|
e16ec3ab9d | ||
|
|
9e8f6a36f5 | ||
|
|
496ea86840 | ||
|
|
b3854eb2c3 | ||
|
|
2be6c8b86d | ||
|
|
3db6dbfcb3 | ||
|
|
dfd55d0eb0 | ||
|
|
ca6ac610a2 | ||
|
|
b943edcd24 | ||
|
|
03ff6e9824 | ||
|
|
7847c8b99c | ||
|
|
8660d58eb0 | ||
|
|
9de027167d | ||
|
|
65095fa4f7 | ||
|
|
f07f489ef6 | ||
|
|
15f4e94b4f | ||
|
|
6d66590fd4 | ||
|
|
cc1e9562b0 | ||
|
|
ecad66bf22 | ||
|
|
d8ae1bd06c | ||
|
|
1679024926 | ||
|
|
690233c02b | ||
|
|
4cccaebac5 | ||
|
|
42e9164050 | ||
|
|
4af837b987 | ||
|
|
a23a7c4488 | ||
|
|
46c4a93468 | ||
|
|
84daf1ae52 | ||
|
|
be01d2f7ec | ||
|
|
9273e634ce | ||
|
|
dd9d5d67a1 | ||
|
|
f5dda60e5b | ||
|
|
578f6e7ba5 | ||
|
|
22464734da | ||
|
|
ee1f7fb6b9 | ||
|
|
fc3cdd06af | ||
|
|
1668e4bc57 | ||
|
|
f4a0dca15b | ||
|
|
45417753a2 | ||
|
|
0967dc2130 | ||
|
|
d48936eb79 | ||
|
|
f5ff9f0997 | ||
|
|
56324bc71e | ||
|
|
c5c3b3928e | ||
|
|
7f38a80bb8 | ||
|
|
ed9f1c6d6f | ||
|
|
f7f4446755 | ||
|
|
e183b95195 | ||
|
|
2bd289fa79 | ||
|
|
298bb3b3be | ||
|
|
de2f3af3df | ||
|
|
11505e0473 | ||
|
|
dfe4fde66e | ||
|
|
d849a20325 | ||
|
|
a6aec6d6a0 | ||
|
|
fd7029fe34 | ||
|
|
e67a4024a2 | ||
|
|
d7617f296b | ||
|
|
4387ae2bb3 | ||
|
|
2551c361eb | ||
|
|
78e430221f | ||
|
|
ae42f6d9f4 | ||
|
|
3880122ef7 | ||
|
|
5a0823baed | ||
|
|
8083ff6584 | ||
|
|
1599afa74f | ||
|
|
356ed6f9eb | ||
|
|
38910c7c48 | ||
|
|
97aa934343 | ||
|
|
376d7bdac6 | ||
|
|
f3934a1732 | ||
|
|
efbbded715 | ||
|
|
d49aee6dd7 | ||
|
|
38497482b5 | ||
|
|
75c049d7ea | ||
|
|
2904cc07e2 | ||
|
|
71e7e697ae | ||
|
|
89d2f9c5c9 | ||
|
|
7dd7ebbb94 | ||
|
|
6787b82ec0 | ||
|
|
3a048d515a | ||
|
|
7316b1d14c | ||
|
|
07b16a6f5f | ||
|
|
66acde1c66 | ||
|
|
11ae74fbac | ||
|
|
57386b905c | ||
|
|
49405316ff | ||
|
|
66282e7ac9 | ||
|
|
06bc6b9012 | ||
|
|
915c3e6455 | ||
|
|
260997781a | ||
|
|
8755ba31b2 | ||
|
|
75ab1f8dab | ||
|
|
e0ffebecdc | ||
|
|
8cece0f92f | ||
|
|
cf1eaae7e5 | ||
|
|
6a93ca2f9f | ||
|
|
ae6452e6e4 | ||
|
|
7cb7d2aebf | ||
|
|
affc954047 |
@@ -9,7 +9,6 @@ tests
|
||||
!build/dokku.deb
|
||||
!tests/dhparam.pem
|
||||
!contrib/dokku-installer.py
|
||||
!contrib/dokku-update
|
||||
!contrib/bash-completion
|
||||
!contrib/docker
|
||||
vendor
|
||||
|
||||
107
.github/dependabot.yml
vendored
Normal file
107
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
---
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: bundler
|
||||
directory: "/tests/apps/ruby"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: bundler
|
||||
directory: "/tests/apps/multi"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/checks-root"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/config"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-dokku-scale"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-noexpose"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-procfile-bad"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-procfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/gitsubmodules"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: gomod
|
||||
directory: "/tests/apps/gogrpc"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
ignore:
|
||||
- dependency-name: google.golang.org/grpc
|
||||
versions:
|
||||
- "> 1.29.1"
|
||||
- package-ecosystem: pip
|
||||
directory: "/tests/apps/multi"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: maven
|
||||
directory: "/tests/apps/java"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-express"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-worker"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-express-noappjson"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-express-noprocfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: composer
|
||||
directory: "/tests/apps/php"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: pip
|
||||
directory: "/tests/apps/python-flask"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/.websocket.disabled"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
||||
# 1.0.0 => d586102c117f97e63d7e3b56629d269efc9a7c60
|
||||
env:
|
||||
# keep in sync with tests/shellcheck-exclude
|
||||
SHELLCHECK_OPTS: -e SC1001 -e SC1003 -e SC1090 -e SC1091 -e SC1117 -e SC2029 -e SC2034 -e SC2046 -e SC2064 -e SC2068 -e SC2086 -e SC2119 -e SC2120 -e SC2128 -e SC2148 -e SC2153 -e SC2154 -e SC2155 -e SC2162 -e SC2174 -e SC2179 -e SC2191 -e SC2199 -e SC2207 -e SC2219 -e SC2220 -e SC2230 -e SC2231 -e SC2235
|
||||
SHELLCHECK_OPTS: -e SC1001 -e SC1003 -e SC1090 -e SC1091 -e SC1117 -e SC2029 -e SC2030 -e SC2031 -e SC2034 -e SC2046 -e SC2064 -e SC2068 -e SC2086 -e SC2119 -e SC2120 -e SC2128 -e SC2148 -e SC2153 -e SC2154 -e SC2155 -e SC2162 -e SC2174 -e SC2179 -e SC2191 -e SC2199 -e SC2207 -e SC2219 -e SC2220 -e SC2230 -e SC2231 -e SC2235 -e SC2267
|
||||
|
||||
shfmt:
|
||||
name: shfmt
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -84,4 +84,4 @@ jobs:
|
||||
git config --global user.name 'Dokku Bot'
|
||||
git config --global user.email no-reply@dokku.com
|
||||
brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
|
||||
brew bump-formula-pr -f --no-browse --no-audit --no-fork --url "https://github.com/dokku/dokku/archive/${{ needs.release.outputs.version }}.tar.gz" dokku/repo/dokku
|
||||
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
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,4 +10,3 @@ test-results/
|
||||
stack.tgz
|
||||
tmp
|
||||
coverage.out
|
||||
contrib/dokku-update-version
|
||||
|
||||
162
HISTORY.md
162
HISTORY.md
@@ -1,5 +1,167 @@
|
||||
# History
|
||||
|
||||
## 0.24.8
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.8 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4615: @josegonzalez Remove empty plugin directories during upgrade
|
||||
- #4613: @josegonzalez Correct failing repo test
|
||||
- #4612: @josegonzalez fix: always retire deployment task containers
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4607: @serixscorpio Update link to dokku on Azure deployment page
|
||||
- #4583: @josegonzalez Set correct redirect for installation
|
||||
|
||||
### Other
|
||||
|
||||
- #4610: @dependabot[bot] chore(deps): bump jinja2 from 2.11.3 to 3.0.1 in /tests/apps/python-flask
|
||||
- #4614: @dependabot[bot] chore(deps): bump flask from 2.0.0 to 2.0.1 in /tests/apps/multi
|
||||
- #4611: @dependabot[bot] chore(deps): bump thin from 1.8.0 to 1.8.1 in /tests/apps/ruby
|
||||
- #4609: @dependabot[bot] chore(deps): bump socket.io from 4.0.2 to 4.1.2 in /tests/apps/.websocket.disabled
|
||||
- #4608: @dependabot[bot] chore(deps): bump werkzeug from 1.0.1 to 2.0.1 in /tests/apps/python-flask
|
||||
- #4600: @dependabot[bot] chore(deps): bump flask from 1.1.2 to 2.0.0 in /tests/apps/multi
|
||||
- #4598: @dependabot[bot] chore(deps): bump flask from 1.1.2 to 2.0.0 in /tests/apps/python-flask
|
||||
- #4592: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 191 to 192 in /tests/apps/php
|
||||
- #4581: @dependabot-preview[bot] Upgrade to GitHub-native Dependabot
|
||||
|
||||
## 0.24.7
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.7 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4574: @Cellane Fix alternate-tags content & escaping
|
||||
|
||||
### Other
|
||||
|
||||
- #4575: @Cellane Exclude additional ShellCheck tests
|
||||
|
||||
## 0.24.6
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.6/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.6 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4493: @Cellane Ensure alternate-tags is properly injected for git:from-image deploys
|
||||
- #4563: @Akirtovskis Tough netrc file when setting git:auth entries
|
||||
- #4566: @jasiek Normalize Dockerfile line terminators to handle issues in port extraction
|
||||
- #4567: @josegonzalez Ensure plugin:update updates all plugins when no plugin is specified
|
||||
- #4568: @josegonzalez Do not insert log max-size when log-driver is set at daemon-level
|
||||
- #4554: @josegonzalez Ensure deployment task containers get associated to internal networks
|
||||
|
||||
### New Features
|
||||
|
||||
- #4557: @josegonzalez Add bash-completion to debian package recommends
|
||||
- #4484: @lunswor Bumps vector image version to 0.12.x
|
||||
|
||||
### Other
|
||||
|
||||
- #4569: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 190 to 191 in /tests/apps/php
|
||||
|
||||
## 0.24.5
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4552: @josegonzalez Scope return 301 in nginx config to allow proper letsencrypt usage
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4546: @benwinding Add bad proxy ports to troubleshooting doc
|
||||
|
||||
### Other
|
||||
|
||||
- #4547: @dependabot[bot] chore(deps): bump django from 3.1.6 to 3.1.8 in /tests/apps/dockerfile-release
|
||||
|
||||
## 0.24.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4526: @josegonzalez Do not cut off builder arguments that have a 'v-' substring
|
||||
- #4523: @josegonzalez Ignore set pipefail errors when DOKKU_SHELL is set to sh
|
||||
- #4516: @josegonzalez Properly handle letsencrypt certs in certs:report output
|
||||
- #4510: @josegonzalez Reformat existing buildpacks files
|
||||
|
||||
### New Features
|
||||
|
||||
- #4525: @josegonzalez Update error for git:from- commands when the artifact is already synced
|
||||
- #4524: @josegonzalez Allow skipping entrypoint detection if entrypoint is tini
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4531: @elamje Update config command to config:show
|
||||
- #4528: @grantjenks Fix typo in persistent storage docs
|
||||
- #4530: @Tobbe deployment docs: fix letsencrypt plugin name
|
||||
- #4517: @illgitthat Update README with correct link to docs
|
||||
- #4513: @josegonzalez Add a note on ssl and letsencrypt usage to the setup docs
|
||||
- #4511: @josegonzalez Document removal of nginx site-enabled files for first time installers
|
||||
- #4506: @josegonzalez Add full example for custom nginx log format
|
||||
- #4504: @josegonzalez Clarify permissions on persistent storage paths
|
||||
- #4503: @josegonzalez Drop dead newsletter link
|
||||
|
||||
### Other
|
||||
|
||||
- #4540: @dependabot-preview[bot] chore(deps): bump github.com/golang/protobuf from 1.5.1 to 1.5.2 in /tests/apps/gogrpc
|
||||
- #4535: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.4 to 20.1.0 in /tests/apps/multi
|
||||
- #4536: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 11.0.1 to 11.0.2 in /tests/apps/java
|
||||
- #4537: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.4 to 20.1.0 in /tests/apps/python-flask
|
||||
- #4527: @Cellane Remove all traces of dokku-update
|
||||
|
||||
## 0.24.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4496: @josegonzalez Ensure existing apps are initialized before modifying with code
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4492: @josegonzalez Set better header colors for dark mode
|
||||
- #4481: @bfontaine docs: fix a broken link
|
||||
|
||||
### Other
|
||||
|
||||
- #4495: @dependabot[bot] chore(deps): bump djangorestframework from 3.11.0 to 3.11.2 in /tests/apps/dockerfile-release
|
||||
- #4494: @dependabot[bot] chore(deps): bump django from 3.0.7 to 3.1.6 in /tests/apps/dockerfile-release
|
||||
- #4491: @dependabot-preview[bot] chore(deps): bump github.com/golang/protobuf from 1.4.3 to 1.5.1 in /tests/apps/gogrpc
|
||||
|
||||
## 0.24.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[](https://aur.archlinux.org/packages/dokku/)
|
||||
[](https://webchat.freenode.net/?channels=dokku)
|
||||
[](https://glider-slackin.herokuapp.com/)
|
||||
[](https://dokku.com/docs/)
|
||||
[](https://dokku.com/docs/getting-started/installation/)
|
||||
[](#sponsors)
|
||||
[](#backers)
|
||||
[](https://www.patreon.com/dokku/)
|
||||
@@ -99,8 +99,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.24.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.2 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.8 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
@@ -113,7 +113,7 @@ If you wish for a more unattended installation method, see [these](https://dokku
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation - including advanced installation docs - are available online at [https://dokku.com/docs/](https://dokku.com/docs/).
|
||||
Full documentation - including advanced installation docs - are available online at [https://dokku.com/docs/getting-started/installation/](https://dokku.com/docs/getting-started/installation/).
|
||||
|
||||
## Support
|
||||
|
||||
|
||||
11
bootstrap.sh
11
bootstrap.sh
@@ -62,6 +62,16 @@ install-requirements() {
|
||||
}
|
||||
|
||||
install-dokku() {
|
||||
if ! command -v dokku &>/dev/null; then
|
||||
echo "--> Note: Installing dokku for the first time will result in removal of"
|
||||
echo " files in the nginx 'sites-enabled' directory. Please manually"
|
||||
echo " restore any files that may be removed after the installation and"
|
||||
echo " web setup is complete."
|
||||
echo ""
|
||||
echo " Installation will continue in 10 seconds."
|
||||
sleep 10
|
||||
fi
|
||||
|
||||
if [[ -n $DOKKU_BRANCH ]]; then
|
||||
install-dokku-from-source "origin/$DOKKU_BRANCH"
|
||||
elif [[ -n $DOKKU_TAG ]]; then
|
||||
@@ -162,6 +172,7 @@ install-dokku-from-deb-package() {
|
||||
if uname -r | grep -q linode; then
|
||||
echo "--> NOTE: Using Linode? Docker may complain about missing AUFS support."
|
||||
echo " You can safely ignore this warning."
|
||||
echo ""
|
||||
echo " Installation will continue in 10 seconds."
|
||||
sleep 10
|
||||
fi
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
FROM dokku/build-base:0.0.1
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update -qq && apt-get -qq -y --no-install-recommends install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
|
||||
ARG WORKDIR=/go/src/github.com/dokku/dokku
|
||||
|
||||
WORKDIR ${WORKDIR}
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
||||
RUN make deb-dokku-update rpm-dokku-update
|
||||
|
||||
RUN ls -lha /tmp/
|
||||
@@ -15,7 +15,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.24.2'
|
||||
VERSION = 'v0.24.8'
|
||||
|
||||
def bytes_to_string(b):
|
||||
if type(b) == bytes:
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
if [[ -r /etc/default/dokku ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/default/dokku
|
||||
fi
|
||||
|
||||
export DOKKU_ROOT=${DOKKU_ROOT:=~dokku}
|
||||
if [[ -f "$DOKKU_ROOT/dokkurc" ]]; then
|
||||
if [[ -r $DOKKU_ROOT/dokkurc ]]; then
|
||||
source "$DOKKU_ROOT/dokkurc"
|
||||
else
|
||||
echo "Unable to read $DOKKU_ROOT/dokkurc for sourcing" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [[ -d $DOKKU_ROOT/.dokkurc ]]; then
|
||||
for f in $DOKKU_ROOT/.dokkurc/*; do
|
||||
if [[ -r "$f" ]]; then
|
||||
source "$f"
|
||||
else
|
||||
echo "Unable to read $f for sourcing" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
|
||||
export PLUGIN_PATH=${PLUGIN_PATH:="$DOKKU_LIB_ROOT/plugins"}
|
||||
export PLUGIN_ENABLED_PATH=${PLUGIN_ENABLED_PATH:="$PLUGIN_PATH/enabled"}
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
dokku-log-info() {
|
||||
declare desc="log info formatter"
|
||||
echo "-----> $*"
|
||||
}
|
||||
|
||||
dokku-log-verbose() {
|
||||
declare desc="log verbose formatter"
|
||||
echo " $*"
|
||||
}
|
||||
|
||||
dokku-log-warn() {
|
||||
declare desc="log warning formatter"
|
||||
echo " ! $*" 1>&2
|
||||
}
|
||||
|
||||
dokku-update-plugin() {
|
||||
declare PLUGIN_NAME="$1"
|
||||
if [[ -d "$PLUGIN_ENABLED_PATH/$PLUGIN_NAME/.git" ]]; then
|
||||
dokku-log-verbose "Updating $PLUGIN_NAME"
|
||||
dokku plugin:update "$PLUGIN_NAME"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
declare COMMAND="$1"
|
||||
local DOKKU_DISTRO PLUGIN_NAME VERSION
|
||||
|
||||
if [[ -f "/etc/os-release" ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
DOKKU_DISTRO=$(. /etc/os-release && echo "$ID")
|
||||
fi
|
||||
|
||||
if [[ "$COMMAND" == "version" ]] || [[ "$COMMAND" == "-v" ]]; then
|
||||
VERSION=UNRELEASED
|
||||
if [[ -f "/var/lib/dokku-update/VERSION" ]]; then
|
||||
VERSION="$(cat /var/lib/dokku-update/VERSION)"
|
||||
fi
|
||||
echo "dokku-update ${VERSION}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
dokku-log-info "Running system updates"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch)
|
||||
yay -Syyua
|
||||
;;
|
||||
debian | ubuntu)
|
||||
apt-get update -qq >/dev/null
|
||||
apt-get -qq -y dist-upgrade
|
||||
;;
|
||||
centos | opensuse | rhel)
|
||||
dokku-log-warn "Updating this operating system is not supported"
|
||||
;;
|
||||
*)
|
||||
dokku-log-warn "Updating this operating system is not supported"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# update all plugins
|
||||
dokku-log-info "Updating all plugins"
|
||||
for PLUGIN_NAME in $(dokku plugin:list | grep enabled | awk '$1=$1' | cut -d' ' -f1); do
|
||||
dokku-update-plugin "$PLUGIN_NAME"
|
||||
done
|
||||
dokku plugin:install
|
||||
|
||||
# rebuild all applications
|
||||
dokku-log-info "Rebuilding all applications"
|
||||
dokku ps:rebuild --all
|
||||
|
||||
dokku-log-info "Waiting for old containers to stop"
|
||||
sleep 120
|
||||
dokku-log-info "Cleaning up"
|
||||
dokku cleanup --global
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,160 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXXXX")"
|
||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
||||
|
||||
log-info() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log info formatter"
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
log-error() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log error formatter"
|
||||
echo "! $*" 1>&2
|
||||
}
|
||||
|
||||
log-fail() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log fail formatter"
|
||||
log-error "$*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
fn-build-dokku() {
|
||||
declare desc="Builds dokku packages within a docker container"
|
||||
|
||||
pushd "$ROOT_DIR" >/dev/null
|
||||
docker build \
|
||||
-f "contrib/build-dokku-update.Dockerfile" \
|
||||
-t dokku-update:build .
|
||||
return "$?"
|
||||
}
|
||||
|
||||
fn-extract-package() {
|
||||
declare desc="Extract packages from a docker container to the root directory"
|
||||
declare PACKAGE_NAME="$1"
|
||||
|
||||
if [[ -z "$PACKAGE_NAME" ]]; then
|
||||
log-error "Invalid deb file specified"
|
||||
return 1
|
||||
fi
|
||||
|
||||
log-info "(extract-package) writing ${PACKAGE_NAME} to correct path"
|
||||
docker run --rm --entrypoint cat dokku-update:build "/tmp/${PACKAGE_NAME}" >"${ROOT_DIR}/build/${PACKAGE_NAME}"
|
||||
return "$?"
|
||||
}
|
||||
|
||||
fn-publish-package() {
|
||||
declare desc="Publishes a package to packagecloud"
|
||||
declare IS_RELEASE="$1" RELEASE_TYPE="$2" PACKAGE_NAME="$3"
|
||||
local REPOSITORY=dokku/dokku-betafish DIST=ubuntu
|
||||
local OS_ID ex EXIT_CODE=0
|
||||
|
||||
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
|
||||
if [[ "$DIST" == "ubuntu" ]]; then
|
||||
OS_IDS=("xenial" "bionic" "focal")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku-update) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
ex="$?"
|
||||
if [[ "$ex" -ne "0" ]]; then
|
||||
EXIT_CODE="$ex"
|
||||
fi
|
||||
done
|
||||
|
||||
DIST=debian
|
||||
OS_IDS=("stretch" "buster")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku-update) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
ex="$?"
|
||||
if [[ "$ex" -ne "0" ]]; then
|
||||
EXIT_CODE="$ex"
|
||||
fi
|
||||
done
|
||||
else
|
||||
log-info "(release-dokku-update) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}" "$PACKAGE_NAME"
|
||||
EXIT_CODE="$?"
|
||||
fi
|
||||
return "$EXIT_CODE"
|
||||
}
|
||||
|
||||
fn-in-array() {
|
||||
declare desc="return true if value ($1) is in list (all other arguments)"
|
||||
|
||||
local e
|
||||
for e in "${@:2}"; do
|
||||
[[ "$e" == "$1" ]] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
fn-is-release() {
|
||||
declare desc="Checks if a given run is a release run"
|
||||
declare RELEASE="$1"
|
||||
local IS_RELEASE=false
|
||||
if [[ "$RELEASE" == "major" ]] || [[ "$RELEASE" == "minor" ]] || [[ "$RELEASE" == "patch" ]]; then
|
||||
IS_RELEASE=true
|
||||
fi
|
||||
|
||||
echo "$IS_RELEASE"
|
||||
}
|
||||
|
||||
fn-require-bin() {
|
||||
declare desc="Checks that a binary exists"
|
||||
declare BINARY="$1"
|
||||
if ! command -v "$BINARY" &>/dev/null; then
|
||||
log-fail "Missing ${BINARY}, please install it"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
declare RELEASE="$1"
|
||||
local NEXT_VERSION
|
||||
local VALID_RELEASE_LEVELS=("major" "minor" "patch" "betafish" "build")
|
||||
|
||||
if [[ "$RELEASE" == '--trace' ]]; then
|
||||
shift 1
|
||||
RELEASE="$1"
|
||||
TRACE=1 && set -x
|
||||
fi
|
||||
|
||||
if [[ -z "$RELEASE" ]]; then
|
||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish, build], none given"
|
||||
fi
|
||||
|
||||
if ! fn-in-array "$RELEASE" "${VALID_RELEASE_LEVELS[@]}"; then
|
||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish, build], '${RELEASE}' given"
|
||||
fi
|
||||
|
||||
mkdir -p "build"
|
||||
fn-require-bin "docker"
|
||||
if [[ "$RELEASE" != "build" ]]; then
|
||||
fn-require-bin "package_cloud"
|
||||
[[ -n "$PACKAGECLOUD_TOKEN" ]] || log-fail "Missing PACKAGECLOUD_TOKEN environment variable"
|
||||
fi
|
||||
|
||||
NEXT_VERSION="$(grep DOKKU_UPDATE_VERSION deb.mk | head -n1 | cut -d'=' -f2 | xargs)"
|
||||
IS_RELEASE="$(fn-is-release "$RELEASE")"
|
||||
|
||||
fn-build-dokku || log-fail "Error building package"
|
||||
fn-extract-package "dokku-update_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb package"
|
||||
fn-extract-package "dokku-update-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
|
||||
|
||||
if [[ "$RELEASE" != "build" ]]; then
|
||||
fn-publish-package "$IS_RELEASE" "deb" "build/dokku-update_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
|
||||
fn-publish-package "$IS_RELEASE" "rpm" "build/dokku-update-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
23
deb.mk
23
deb.mk
@@ -4,18 +4,12 @@ DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lif
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE = amd64
|
||||
|
||||
DOKKU_UPDATE_DESCRIPTION = 'Binary that handles updating Dokku and related systems'
|
||||
DOKKU_UPDATE_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_UPDATE_VERSION ?= 0.2.0
|
||||
DOKKU_UPDATE_ARCHITECTURE = amd64
|
||||
DOKKU_UPDATE_PACKAGE_NAME = dokku-update_$(DOKKU_UPDATE_VERSION)_$(DOKKU_UPDATE_ARCHITECTURE).deb
|
||||
|
||||
ifndef IS_RELEASE
|
||||
IS_RELEASE = true
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: install-from-deb deb-all deb-dokku deb-dokku-update deb-setup
|
||||
.PHONY: install-from-deb deb-all deb-dokku deb-setup
|
||||
|
||||
install-from-deb:
|
||||
@echo "--> Initial apt-get update"
|
||||
@@ -31,7 +25,7 @@ install-from-deb:
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -qq -y --no-install-recommends install dokku
|
||||
|
||||
deb-all: deb-setup deb-dokku deb-dokku-update
|
||||
deb-all: deb-setup deb-dokku
|
||||
mv $(BUILD_DIRECTORY)/*.deb .
|
||||
@echo "Done"
|
||||
|
||||
@@ -57,16 +51,3 @@ endif
|
||||
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"
|
||||
|
||||
deb-dokku-update:
|
||||
rm -rf /tmp/dokku-update*.deb dokku-update*.deb
|
||||
echo "${DOKKU_UPDATE_VERSION}" > contrib/dokku-update-version
|
||||
sudo fpm -t deb -s dir -n dokku-update \
|
||||
--version $(DOKKU_UPDATE_VERSION) \
|
||||
--architecture $(DOKKU_UPDATE_ARCHITECTURE) \
|
||||
--package $(BUILD_DIRECTORY)/$(DOKKU_UPDATE_PACKAGE_NAME) \
|
||||
--depends 'dokku' \
|
||||
--url "https://github.com/$(DOKKU_UPDATE_REPO_NAME)" \
|
||||
--description $(DOKKU_UPDATE_DESCRIPTION) \
|
||||
--license 'MIT License' \
|
||||
contrib/dokku-update=/usr/local/bin/dokku-update \
|
||||
contrib/dokku-update-version=/var/lib/dokku-update/VERSION
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -1,10 +1,10 @@
|
||||
Package: dokku
|
||||
Version: 0.24.2
|
||||
Version: 0.24.8
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), net-tools, netrc, software-properties-common, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsyslog, dos2unix, jq, unzip
|
||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update, dokku-event-listener
|
||||
Recommends: herokuish (>= 0.3.4), bash-completion, parallel, dokku-update, dokku-event-listener
|
||||
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||
|
||||
14
debian/postinst
vendored
14
debian/postinst
vendored
@@ -43,6 +43,20 @@ setup-storage() {
|
||||
}
|
||||
|
||||
setup-plugins() {
|
||||
echo "Deleting invalid plugins"
|
||||
if [ -f "${DOKKU_LIB_ROOT}/core-plugins/available/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/core-plugins/available/" -type d -empty -delete
|
||||
fi
|
||||
if [ -f "${DOKKU_LIB_ROOT}/core-plugins/enabled/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/core-plugins/enabled/" -type d -empty -delete
|
||||
fi
|
||||
if [ -f "${DOKKU_LIB_ROOT}/plugins/available/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/plugins/available/" -type d -empty -delete
|
||||
fi
|
||||
if [ -f "${DOKKU_LIB_ROOT}/plugins/enabled/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/plugins/enabled/" -type d -empty -delete
|
||||
fi
|
||||
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/core-plugins/available" "${DOKKU_LIB_ROOT}/plugins/available"
|
||||
|
||||
@@ -38,7 +38,12 @@ Each "phase" has different expectations and limitations:
|
||||
- Priming or invalidating cache stores
|
||||
- Running database migrations
|
||||
|
||||
Additionally, if using a Dockerfile with an `ENTRYPOINT`, the deployment task is passed to that entrypoint as is.
|
||||
Additionally, if using a Dockerfile with an `ENTRYPOINT`, the deployment task is passed to that entrypoint as is. The exceptions are if the entrypoint is one of the following:
|
||||
|
||||
- `["/tini", "--"]`
|
||||
- `["/bin/tini", "--"]`
|
||||
- `["/usr/bin/tini", "--"]`
|
||||
- `["/usr/local/bin/tini", "--"]`
|
||||
|
||||
Please keep the above in mind when utilizing deployment tasks.
|
||||
|
||||
|
||||
@@ -19,25 +19,18 @@ The storage plugin supports the following mount points:
|
||||
- explicit paths that exist on the host
|
||||
- docker volumes
|
||||
|
||||
There are a few caveats to using the persistent storage plugin:
|
||||
|
||||
- Using implicit paths that do not exist are no longer supported, and actually deprecated in [Docker 1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0). When you specify a persistent storage mount, the host directory is **not** autocreated by either Dokku or Docker.
|
||||
- We recommend using the directory `/var/lib/dokku/data/storage` directory as the root host path for mounts, and we create this on Dokku installation.
|
||||
- Mounts are only available at run and deploy times, and you **must** redeploy (restart) an app to mount or unmount to an existing app's container.
|
||||
- When a directory is mounted, any existing files within the container will be overwritten. If you are writing assets during the build process and then replace the directory with a mount, those files will no longer exist. This is a Docker limitation.
|
||||
- Paths are mounted within the container at the root of the disk - `/` - and are **not** relative to `/app` (for buildpacks deploys) or the `WORKDIR` (for Dockerfile/Docker images).
|
||||
- For applications using buildpack deploys, the host directory should be owned by the user and group id `32767`. This is due to how permissions within Herokuish - which builds the Docker images - works. For Dockerfile or Docker image deployments, please use the user and group id which corresponds to the one running the process within the container.
|
||||
|
||||
## Usage
|
||||
|
||||
This example demonstrates how to mount the recommended directory to `/storage` inside an application called `node-js-app`:
|
||||
This example demonstrates how to mount the recommended directory to `/storage` inside an application called `node-js-app`. For simplicity, the Dokku project recommends using the directory `/var/lib/dokku/data/storage` directory as the root host path for mounts. This directory is created on Dokku installation.
|
||||
|
||||
```shell
|
||||
# we use a subdirectory inside of the host directory to scope it to just the app
|
||||
dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage
|
||||
```
|
||||
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage/node-js-app` to `/storage` inside the container.
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage/node-js-app` to `/storage` inside the container. Mounts are only available for containers crated via `run` and by the deploy process, and not during the build process. In addition, the host path is never auto-created by either Dokku or Docker, and should be an explicit path, not one relative to the current working directory.
|
||||
|
||||
> If the `/storage` path within the container had pre-existing content, the container files will be overrwritten. This may be an issue for users that create assets at build time but then mount a directory at the same place during runtime. Files are not merged.
|
||||
|
||||
Once you have mounted persistent storage, you will also need to restart the application. See the
|
||||
[process scaling documentation](/docs/processes/process-management.md) for more information.
|
||||
@@ -46,17 +39,14 @@ Once you have mounted persistent storage, you will also need to restart the appl
|
||||
dokku ps:restart app-name
|
||||
```
|
||||
|
||||
A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root of the container.
|
||||
A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root (`/`) of the container.
|
||||
|
||||
```shell
|
||||
# creating storage for the app 'node-js-app'
|
||||
mkdir -p /var/lib/dokku/data/storage/node-js-app
|
||||
|
||||
# ensure the proper user has access to this directory
|
||||
chown -R dokku:dokku /var/lib/dokku/data/storage/node-js-app
|
||||
|
||||
# as of 0.7.x, you should chown using the `32767` user and group id for buildpack deploys
|
||||
# For dockerfile deploys, substitute the user and group id in use within the image
|
||||
# set the directory ownership. Below is an example for herokuish
|
||||
# but see the `Directory Permissions` section for more details
|
||||
chown -R 32767:32767 /var/lib/dokku/data/storage/node-js-app
|
||||
|
||||
# mount the directory into your container's /app/storage directory, relative to root
|
||||
@@ -65,6 +55,17 @@ dokku storage:mount app-name /var/lib/dokku/data/storage/node-js-app:/app/storag
|
||||
|
||||
You can mount one or more directories as desired by following the above pattern.
|
||||
|
||||
### Directory Permissions
|
||||
|
||||
The host directory should always be owned by the container user and group id. If this is not the case, files may not persist when written to mounted storage.
|
||||
|
||||
- Buildpacks via Herokuish: Use `32767:32767` as the file permissions
|
||||
- For Cloud Native Buildpacks: This will depend on the builder in question, but can be retrieved via the `CNB_USER_ID` and `CNB_GROUP_ID` environment variables on the builder image. Common builders are as follows:
|
||||
- heroku/buildpacks: `1000:1000`
|
||||
- cloudfoundry/cnb: `2000:2000`
|
||||
- packeto: `2000:2000`
|
||||
- Dockerfile and Docker Image: Use the user and group id which corresponds to the one running the process within the container.
|
||||
|
||||
### Displaying storage reports for an app
|
||||
|
||||
> New as of 0.8.1
|
||||
|
||||
@@ -35,35 +35,35 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.24.2 enabled dokku core standard plugin
|
||||
20_events 0.24.2 enabled dokku core events logging plugin
|
||||
app-json 0.24.2 enabled dokku core app-json plugin
|
||||
apps 0.24.2 enabled dokku core apps plugin
|
||||
build-env 0.24.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.24.2 enabled dokku core buildpacks plugin
|
||||
certs 0.24.2 enabled dokku core certificate management plugin
|
||||
checks 0.24.2 enabled dokku core checks plugin
|
||||
common 0.24.2 enabled dokku core common plugin
|
||||
config 0.24.2 enabled dokku core config plugin
|
||||
docker-options 0.24.2 enabled dokku core docker-options plugin
|
||||
domains 0.24.2 enabled dokku core domains plugin
|
||||
enter 0.24.2 enabled dokku core enter plugin
|
||||
git 0.24.2 enabled dokku core git plugin
|
||||
logs 0.24.2 enabled dokku core logs plugin
|
||||
network 0.24.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.24.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.24.2 enabled dokku core plugin plugin
|
||||
proxy 0.24.2 enabled dokku core proxy plugin
|
||||
ps 0.24.2 enabled dokku core ps plugin
|
||||
repo 0.24.2 enabled dokku core repo plugin
|
||||
resource 0.24.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.24.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.24.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.24.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.24.2 enabled dokku core storage plugin
|
||||
tags 0.24.2 enabled dokku core tags plugin
|
||||
tar 0.24.2 enabled dokku core tar plugin
|
||||
trace 0.24.2 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.24.8 enabled dokku core standard plugin
|
||||
20_events 0.24.8 enabled dokku core events logging plugin
|
||||
app-json 0.24.8 enabled dokku core app-json plugin
|
||||
apps 0.24.8 enabled dokku core apps plugin
|
||||
build-env 0.24.8 enabled dokku core build-env plugin
|
||||
buildpacks 0.24.8 enabled dokku core buildpacks plugin
|
||||
certs 0.24.8 enabled dokku core certificate management plugin
|
||||
checks 0.24.8 enabled dokku core checks plugin
|
||||
common 0.24.8 enabled dokku core common plugin
|
||||
config 0.24.8 enabled dokku core config plugin
|
||||
docker-options 0.24.8 enabled dokku core docker-options plugin
|
||||
domains 0.24.8 enabled dokku core domains plugin
|
||||
enter 0.24.8 enabled dokku core enter plugin
|
||||
git 0.24.8 enabled dokku core git plugin
|
||||
logs 0.24.8 enabled dokku core logs plugin
|
||||
network 0.24.8 enabled dokku core network plugin
|
||||
nginx-vhosts 0.24.8 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.24.8 enabled dokku core plugin plugin
|
||||
proxy 0.24.8 enabled dokku core proxy plugin
|
||||
ps 0.24.8 enabled dokku core ps plugin
|
||||
repo 0.24.8 enabled dokku core repo plugin
|
||||
resource 0.24.8 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.24.8 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.24.8 enabled dokku core shell plugin
|
||||
ssh-keys 0.24.8 enabled dokku core ssh-keys plugin
|
||||
storage 0.24.8 enabled dokku core storage plugin
|
||||
tags 0.24.8 enabled dokku core tags plugin
|
||||
tar 0.24.8 enabled dokku core tar plugin
|
||||
trace 0.24.8 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.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.8\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.8\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.8\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.8\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.8\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.8\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -42,13 +42,13 @@ h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -662,7 +662,7 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
background-color: rgb(13, 17, 23);
|
||||
}
|
||||
.header {
|
||||
background-color: #075c9b;
|
||||
background-color: #0b1f4c;
|
||||
}
|
||||
.blurb {
|
||||
filter: invert(1);
|
||||
@@ -703,7 +703,8 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
color: rgb(11, 216, 73);
|
||||
}
|
||||
.dev-warning, .outdated-warning {
|
||||
background-color: #ccb430
|
||||
background-color: #4e440d;
|
||||
color: #fff;
|
||||
}
|
||||
.table-striped tbody tr:nth-of-type(odd) {
|
||||
background-color: #080808
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
"0.21.4",
|
||||
"0.22.9",
|
||||
"0.23.9",
|
||||
"0.24.2"
|
||||
"0.24.8"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Typically an application will require some configuration to run properly. Dokku
|
||||
The `config` plugin provides the following commands to manage your variables:
|
||||
|
||||
```
|
||||
config (<app>|--global) Pretty-print an app or global environment
|
||||
config:show (<app>|--global) Pretty-print an app or global environment
|
||||
config:bundle (<app>|--global) [--merged] Bundle environment into tarfile
|
||||
config:clear (<app>|--global) Clears environment variables
|
||||
config:export (<app>|--global) [--envfile] Export a global or app environment
|
||||
|
||||
@@ -135,7 +135,38 @@ In all cases, the nginx config must be regenerated after setting the above value
|
||||
The format of the access log can be changed by calling the `nginx:set` command as follows:
|
||||
|
||||
```shell
|
||||
dokku nginx:set node-js-app access-log-format custom
|
||||
dokku nginx:set node-js-app access-log-format custom-format
|
||||
```
|
||||
|
||||
Prior to changing the log-format, log formats should be specified at a file such as `/etc/nginx/conf.d/00-log-formats.conf`. This will ensure they are available within your app's nginx context. For instance, the following may be added to the above file. It only needs to be specified once to be used for all apps.
|
||||
|
||||
```nginx
|
||||
# /etc/nginx/conf.d/00-log-formats.conf
|
||||
# escape=json was added in nginx 1.11.8
|
||||
log_format json_combined escape=json
|
||||
'{'
|
||||
'"time_local":"$time_local",'
|
||||
'"remote_addr":"$remote_addr",'
|
||||
'"remote_user":"$remote_user",'
|
||||
'"request":"$request",'
|
||||
'"status": "$status",'
|
||||
'"body_bytes_sent":"$body_bytes_sent",'
|
||||
'"request_time":"$request_time",'
|
||||
'"http_referrer":"$http_referer",'
|
||||
'"http_user_agent":"$http_user_agent"'
|
||||
'}';
|
||||
```
|
||||
|
||||
Next, the format should be set for the given app.
|
||||
|
||||
```shell
|
||||
dokku nginx:set node-js-app access-log-format json_combined
|
||||
```
|
||||
|
||||
Finally, a proxy rebuild will change the format as desired.
|
||||
|
||||
```shell
|
||||
dokku proxy:build-config node-js-app
|
||||
```
|
||||
|
||||
### Specifying a read timeout
|
||||
|
||||
@@ -107,6 +107,37 @@ Dokku supports deploying applications in a few ways:
|
||||
- [Dockerfile](https://docs.docker.com/reference/builder/): See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
|
||||
- [Docker Image](https://docs.docker.com/get-started/overview/#docker-objects): See the [docker image documentation](/docs/deployment/methods/images.md) to learn about how to deploy a Docker Image.
|
||||
|
||||
### Setting up SSL
|
||||
|
||||
> While SSL certificates can be imported, automated SSL via Letsencrypt requires that all domains on an app correctly point at your server's public ip address. Please keep this in mind when using Letsencrypt.
|
||||
|
||||
For many users, responding to requests via `https` will be desirable. Dokku has a complete [ssl plugin](/docs/configuration/ssl.md) built in that can be used to import SSL certificates (below is a short example, please refer to the [ssl documentation](/docs/configuration/ssl.md) for more information):
|
||||
|
||||
```shell
|
||||
dokku certs:add ruby-getting-started server.crt server.key
|
||||
```
|
||||
|
||||
As an alternative, the Dokku project offers an optional letsencrypt plugin that can be used to automate SSL certificate retrieval and renewal.
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
# install the letsencrypt plugin
|
||||
# plugin installation requires root, hence the user change
|
||||
sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
|
||||
|
||||
# configure the plugin
|
||||
dokku config:set --global DOKKU_LETSENCRYPT_EMAIL=your-email@your.domain.com
|
||||
|
||||
# set a custom domain that you own for your application
|
||||
dokku domains:set ruby-getting-started ruby-getting-started.your.domain.com
|
||||
|
||||
# enable letsencrypt
|
||||
dokku letsencrypt:enable ruby-getting-started
|
||||
|
||||
# enable auto-renewal
|
||||
dokku letsencrypt:cron-job --add
|
||||
```
|
||||
|
||||
### Skipping deployment
|
||||
|
||||
If you only want to rebuild and tag a container, you can skip the deployment phase by setting `$DOKKU_SKIP_DEPLOY` to `true` by running:
|
||||
|
||||
@@ -698,6 +698,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-from-directory`
|
||||
|
||||
- Description: Updates an app's git repository from a source directory and then triggers a build
|
||||
- Invoked by: `git:from-image` and `git:from-archive`
|
||||
- Arguments: `$APP $SOURCECODE_WORK_DIR $USER_NAME $USER_EMAIL`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-post-pull`
|
||||
|
||||
- Description:
|
||||
|
||||
@@ -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.24.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.24.8-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'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
1. If you don't already have one [generate an SSH key pair](https://help.github.com/articles/generating-ssh-keys/).
|
||||
|
||||
2. Go to the [Dokku on Azure deployment page](https://github.com/azure/azure-quickstart-templates/tree/master/dokku-vm) and click **Deploy to Azure**.
|
||||
2. Go to the [Dokku on Azure deployment page](https://github.com/Azure/azure-quickstart-templates/tree/master/application-workloads/dokku/dokku-vm) and click **Deploy to Azure**.
|
||||
|
||||
3. You'll be prompted to enter a few parameters, including a unique storage account name and a unique name for the subdomain used for your public IP address. For the `sshKeyData` parameter, copy and paste the contents of the *public* key file you just created. After a few minutes the Dokku instance will be deployed.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.24.2
|
||||
docker pull dokku/dokku:0.24.8
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
@@ -17,7 +17,7 @@ docker container run \
|
||||
--publish 8443:443 \
|
||||
--volume /var/lib/dokku:/mnt/dokku \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
dokku/dokku:0.24.2
|
||||
dokku/dokku:0.24.8
|
||||
```
|
||||
|
||||
Dokku is run in the following configuration:
|
||||
|
||||
@@ -21,8 +21,8 @@ To install the latest stable version of Dokku, you can run the following shell c
|
||||
|
||||
```shell
|
||||
# for debian systems, installs Dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.2/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.24.2 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.8/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.24.8 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
@@ -33,7 +33,7 @@ If you're using Debian 9+ or Ubuntu 18.04, make sure your package manager is con
|
||||
|
||||
Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings. Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure Dokku via the web admin.
|
||||
|
||||
Alternatively, instructions to skip the web installer with an unattended installation are available in the [advanced install guide](/docs/getting-started/advanced-installation/#configuring).
|
||||
Alternatively, instructions to skip the web installer with an unattended installation are available in the [advanced install guide](/docs/getting-started/advanced-installation.md#configuring).
|
||||
|
||||
> **Warning:** If you don't complete setup via the web installer (even if you set up SSH keys and virtual hosts otherwise) your Dokku installation will remain vulnerable to anyone finding the setup page and inserting their key. You can check if it is still running via `ps auxf | grep dokku-installer`, and it may be stopped via your server's init system - usually either `service dokku-installer stop` or `stop dokku-installer`.
|
||||
|
||||
|
||||
@@ -236,3 +236,20 @@ This isn't usually an issue with Dokku, but rather an app config problem. This c
|
||||
In Rails at least, if your `application.rb` or `environmnents/production.rb` include the line `configure.force_ssl = true` which includes HSTS, try commenting that out and redeploying.
|
||||
|
||||
If this solves the issue temporarily, longer term you should consider [configuring SSL](/docs/configuration/ssl.md).
|
||||
|
||||
***
|
||||
|
||||
__Symptom:__ My application deploys properly, but won't load in browser "connection refused"
|
||||
|
||||
__Solution:__
|
||||
|
||||
This could be a result of a bad proxy configuration (`http:5000:5000` may be incorrect). Run `dokku proxy:report myapp` to check if your app has the correct proxy configuration. It should show something like the following.
|
||||
|
||||
```
|
||||
=====> myapp proxy information
|
||||
Proxy enabled: true
|
||||
Proxy port map: http:80:5000 https:443:5000
|
||||
Proxy type: nginx
|
||||
```
|
||||
|
||||
Set `dokku proxy:ports-set front http:80:5000` to get proxy correctly configured for http endpoint.
|
||||
|
||||
@@ -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.24.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/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.24.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/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.24.2/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
</style>
|
||||
@@ -65,9 +65,6 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/dokku/dokku/discussions">Forums</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://gliderlabs.us10.list-manage.com/subscribe?u=49c4b06ffd30bcf49ec53c277&id=f526006fd5">Newsletter</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,12 +98,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.24.2/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.24.8/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.24.2 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.24.8 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - {{DOC_TITLE}}</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/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.24.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/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.24.2/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.8/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>
|
||||
@@ -78,9 +78,6 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/dokku/dokku/discussions">Forums</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://gliderlabs.us10.list-manage.com/subscribe?u=49c4b06ffd30bcf49ec53c277&id=f526006fd5">Newsletter</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"redirects": {
|
||||
"installation": "getting-started/advanced-installation/",
|
||||
"installation": "getting-started/installation/",
|
||||
"advanced-installation": "getting-started/advanced-installation/",
|
||||
"troubleshooting": "getting-started/troubleshooting/",
|
||||
"upgrading": "getting-started/upgrading/",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -16,8 +16,16 @@ import (
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
func constructScript(command string, shell string, isHerokuishImage bool, isCnbImage bool, hasEntrypoint bool) []string {
|
||||
if hasEntrypoint {
|
||||
func constructScript(command string, shell string, isHerokuishImage bool, isCnbImage bool, dockerfileEntrypoint string) []string {
|
||||
nonSkippableEntrypoints := map[string]bool{
|
||||
"ENTRYPOINT [\"/tini\",\"--\"]": true,
|
||||
"ENTRYPOINT [\"/bin/tini\",\"--\"]": true,
|
||||
"ENTRYPOINT [\"/usr/bin/tini\",\"--\"]": true,
|
||||
"ENTRYPOINT [\"/usr/local/bin/tini\",\"--\"]": true,
|
||||
}
|
||||
|
||||
cannotSkip := nonSkippableEntrypoints[dockerfileEntrypoint]
|
||||
if dockerfileEntrypoint != "" && !cannotSkip {
|
||||
words, err := shellquote.Split(strings.TrimSpace(command))
|
||||
if err != nil {
|
||||
common.LogWarn(fmt.Sprintf("Skipping command construction for app with ENTRYPOINT: %v", err.Error()))
|
||||
@@ -26,7 +34,7 @@ func constructScript(command string, shell string, isHerokuishImage bool, isCnbI
|
||||
return words
|
||||
}
|
||||
|
||||
script := []string{"set -eo pipefail;"}
|
||||
script := []string{"set -e;", "set -o pipefail || true;"}
|
||||
if os.Getenv("DOKKU_TRACE") == "1" {
|
||||
script = append(script, "set -x;")
|
||||
}
|
||||
@@ -146,6 +154,13 @@ func getDokkuAppShell(appName string) string {
|
||||
return shell
|
||||
}
|
||||
|
||||
func cleanupDeploymentContainer(appName string, containerID string, phase string) error {
|
||||
if phase != "predeploy" {
|
||||
os.Setenv("DOKKU_SKIP_IMAGE_RETIRE", "true")
|
||||
}
|
||||
return common.PlugnTrigger("scheduler-register-retired", []string{appName, containerID}...)
|
||||
}
|
||||
|
||||
func executeScript(appName string, image string, imageTag string, phase string) error {
|
||||
phaseName := phase
|
||||
if phase == "heroku.postdeploy" {
|
||||
@@ -180,9 +195,8 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
dockerfileCommand, _ = getCommandFromImage(image)
|
||||
}
|
||||
|
||||
hasEntrypoint := dockerfileEntrypoint != ""
|
||||
dokkuAppShell := getDokkuAppShell(appName)
|
||||
script := constructScript(command, dokkuAppShell, isHerokuishImage, isCnbImage, hasEntrypoint)
|
||||
script := constructScript(command, dokkuAppShell, isHerokuishImage, isCnbImage, dockerfileEntrypoint)
|
||||
|
||||
imageSourceType := "dockerfile"
|
||||
if isHerokuishImage {
|
||||
@@ -248,6 +262,8 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
return fmt.Errorf("Failed to create %s execution container: %s", phase, err.Error())
|
||||
}
|
||||
|
||||
defer cleanupDeploymentContainer(appName, containerID, phase)
|
||||
|
||||
if !waitForExecution(containerID) {
|
||||
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
|
||||
common.LogVerboseQuietContainerLogs(containerID)
|
||||
@@ -295,7 +311,7 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
return fmt.Errorf("Commiting of '%s' to image failed: %s", phase, command)
|
||||
}
|
||||
|
||||
return common.PlugnTrigger("scheduler-register-retired", []string{appName, containerID}...)
|
||||
return nil
|
||||
}
|
||||
|
||||
func getEntrypointFromImage(image string) (string, error) {
|
||||
@@ -408,7 +424,7 @@ func createdContainerID(appName string, dockerArgs []string, image string, comma
|
||||
}
|
||||
|
||||
containerID := strings.TrimSpace(string(b))
|
||||
err = common.PlugnTrigger("post-container-create", []string{"app", appName, containerID, phase}...)
|
||||
err = common.PlugnTrigger("post-container-create", []string{"app", containerID, appName, phase}...)
|
||||
return containerID, err
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -20,6 +20,7 @@ trigger-builder-dockerfile-builder-build() {
|
||||
pushd "$SOURCECODE_WORK_DIR" &>/dev/null
|
||||
|
||||
# extract first port from Dockerfile
|
||||
dos2unix Dockerfile
|
||||
local DOCKERFILE_PORTS=$(get_dockerfile_exposed_ports Dockerfile)
|
||||
[[ -n "$DOCKERFILE_PORTS" ]] && config_set --no-restart "$APP" DOKKU_DOCKERFILE_PORTS="$DOCKERFILE_PORTS"
|
||||
plugn trigger pre-build-dockerfile "$APP"
|
||||
@@ -29,7 +30,7 @@ trigger-builder-dockerfile-builder-build() {
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
|
||||
|
||||
# strip --volume and -v args from DOCKER_ARGS
|
||||
local DOCKER_ARGS=$(sed -e "s/--volume=[[:graph:]]\+[[:blank:]]\?//g" -e "s/-v[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS")
|
||||
local DOCKER_ARGS=$(sed -e "s/^--volume=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^-v[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS")
|
||||
declare -a ARG_ARRAY
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-dockerfile plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-herokuish plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-pack plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -3,18 +3,51 @@ package buildpacks
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
func rewriteBuildpacksFile(sourceWorkDir string) error {
|
||||
buildpacksPath := filepath.Join(sourceWorkDir, ".buildpacks")
|
||||
if !common.FileExists(buildpacksPath) {
|
||||
return nil
|
||||
}
|
||||
|
||||
buildpacks, err := common.FileToSlice(buildpacksPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for i, buildpack := range buildpacks {
|
||||
if buildpack == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
buildpack, err = validBuildpackURL(buildpack)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Unable to parse .buildpacks file, line %d: %s", i, err)
|
||||
}
|
||||
|
||||
buildpacks[i] = buildpack
|
||||
}
|
||||
|
||||
return common.WriteSliceToFile(buildpacksPath, buildpacks)
|
||||
}
|
||||
|
||||
func validBuildpackURL(buildpack string) (string, error) {
|
||||
if buildpack == "" {
|
||||
return buildpack, errors.New("Must specify a buildpack to add")
|
||||
}
|
||||
|
||||
reHerokuValue := regexp.MustCompile(`(?m)^([\w]+\/[\w]+)$`)
|
||||
reHerokuValue := regexp.MustCompile(`(?m)^([\w-]+\/[\w-]+)$`)
|
||||
if found := reHerokuValue.Find([]byte(buildpack)); found != nil {
|
||||
parts := strings.SplitN(buildpack, "/", 2)
|
||||
if parts[0] == "heroku-community" {
|
||||
parts[0] = "heroku"
|
||||
}
|
||||
return fmt.Sprintf("https://github.com/%s/heroku-buildpack-%s.git", parts[0], parts[1]), nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core buildpacks plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -78,7 +78,7 @@ func TriggerPostExtract(appName string, sourceWorkDir string) error {
|
||||
}
|
||||
|
||||
if len(buildpacks) == 0 {
|
||||
return nil
|
||||
return rewriteBuildpacksFile(sourceWorkDir)
|
||||
}
|
||||
|
||||
buildpacksPath := filepath.Join(sourceWorkDir, ".buildpacks")
|
||||
|
||||
@@ -104,7 +104,7 @@ fn-ssl-issuer() {
|
||||
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
|
||||
|
||||
if is_ssl_enabled "$APP"; then
|
||||
openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Issuer:" | xargs | sed -e "s/Issuer: //g"
|
||||
openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Issuer:" | head -n1 | sed -e 's/Issuer: //g' -e 's/^[[:space:]]*//'
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -135,7 +135,12 @@ fn-ssl-verified() {
|
||||
return
|
||||
fi
|
||||
|
||||
SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver "$APP_SSL_PATH/server.crt" | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
|
||||
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)"
|
||||
else
|
||||
SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver "$APP_SSL_PATH/server.crt" | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
|
||||
fi
|
||||
|
||||
if [[ "$SSL_VERIFY_OUTPUT" == "OK" ]]; then
|
||||
SSL_SELF_SIGNED="verified by a certificate authority"
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -10,7 +10,7 @@ fn-plugin-property-get() {
|
||||
}
|
||||
|
||||
fn-plugin-property-clone() {
|
||||
declare desc="destroy the properties for an app"
|
||||
declare desc="clone the properties for an app"
|
||||
declare PLUGIN="$1" OLD_APP="$2" NEW_APP="$3"
|
||||
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "clone" "$PLUGIN" "$OLD_APP" "$NEW_APP"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core config plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core cron plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core docker-options plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core domains plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core enter plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -19,7 +19,8 @@ trigger-git-git-from-directory() {
|
||||
trap "rm -rf '$TMP_WORK_DIR' '$TMP_WORK_DIR_2' >/dev/null" RETURN INT TERM EXIT
|
||||
|
||||
dokku_log_info1 "Updating git repository with specified build context"
|
||||
if [[ "$(fn-git-cmd "$APP_ROOT" count-objects)" == "0 objects, 0 kilobytes" ]]; then
|
||||
local git_objects="$(fn-git-cmd "$APP_ROOT" count-objects 2>/dev/null || true)"
|
||||
if [[ -z "$git_objects" ]] || [[ "$git_objects" == "0 objects, 0 kilobytes" ]]; then
|
||||
# setup new repo
|
||||
cp -rT "$SOURCECODE_WORK_DIR" "$TMP_WORK_DIR"
|
||||
suppress_output fn-git-cmd "$TMP_WORK_DIR" init
|
||||
@@ -41,7 +42,8 @@ trigger-git-git-from-directory() {
|
||||
suppress_output fn-git-cmd "$TMP_WORK_DIR" add --all
|
||||
suppress_output fn-git-cmd "$TMP_WORK_DIR" update-index --refresh
|
||||
if suppress_output fn-git-cmd "$TMP_WORK_DIR" diff-index --quiet HEAD --; then
|
||||
dokku_log_warn "No changes detected, aborting git update"
|
||||
dokku_log_warn "No changes detected, skipping git commit"
|
||||
dokku_log_warn "Call 'ps:rebuild' on app to rebuild the app from existing source"
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
@@ -116,6 +116,7 @@ cmd-git-auth() {
|
||||
fi
|
||||
|
||||
dokku_log_info1 "Setting netrc auth entry for host $HOST"
|
||||
touch "${DOKKU_ROOT}/.netrc"
|
||||
netrc set "$HOST" "$USERNAME" "$PASSWORD"
|
||||
}
|
||||
|
||||
@@ -166,7 +167,8 @@ cmd-git-from-image() {
|
||||
|
||||
dokku_log_verbose "Setting Dockerfile"
|
||||
touch "$TMP_WORK_DIR/Dockerfile"
|
||||
echo "FROM $DOCKER_IMAGE" >"$TMP_WORK_DIR/Dockerfile"
|
||||
echo "FROM $DOCKER_IMAGE" >>"$TMP_WORK_DIR/Dockerfile"
|
||||
echo "LABEL com.dokku.docker-image-labeler/alternate-tags=[\\\"$DOCKER_IMAGE\\\"]" >>"$TMP_WORK_DIR/Dockerfile"
|
||||
|
||||
plugn trigger git-from-directory "$APP" "$TMP_WORK_DIR" "$USER_NAME" "$USER_EMAIL"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core git plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -24,7 +24,7 @@ var (
|
||||
)
|
||||
|
||||
// VectorImage contains the default vector image to run
|
||||
const VectorImage = "timberio/vector:0.11.X-debian"
|
||||
const VectorImage = "timberio/vector:0.12.X-debian"
|
||||
|
||||
// GetFailedLogs outputs failed deploy logs for a given app
|
||||
func GetFailedLogs(appName string) error {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core logs plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -10,6 +10,8 @@ import (
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
dockeroptions "github.com/dokku/dokku/plugins/docker-options"
|
||||
|
||||
sh "github.com/codeskyblue/go-sh"
|
||||
)
|
||||
|
||||
// TriggerDockerArgsProcessDeploy outputs the logs plugin docker options for an app
|
||||
@@ -30,11 +32,13 @@ func TriggerDockerArgsProcessDeploy(appName string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
hasDriverOpt := false
|
||||
for _, option := range options {
|
||||
if !strings.HasPrefix(option, "--log-driver=") {
|
||||
continue
|
||||
}
|
||||
|
||||
hasDriverOpt = true
|
||||
logDriver := strings.TrimPrefix(option, "--log-driver=")
|
||||
if !allowedDrivers[logDriver] {
|
||||
ignoreMaxSize = true
|
||||
@@ -42,6 +46,14 @@ func TriggerDockerArgsProcessDeploy(appName string) error {
|
||||
break
|
||||
}
|
||||
|
||||
if !hasDriverOpt {
|
||||
b, _ := sh.Command(common.DockerBin(), "system", "info", "--format", "{{ .LoggingDriver }}").Output()
|
||||
output := strings.TrimSpace(string(b[:]))
|
||||
if !allowedDrivers[output] {
|
||||
ignoreMaxSize = true
|
||||
}
|
||||
}
|
||||
|
||||
if !ignoreMaxSize {
|
||||
maxSize := common.PropertyGet("logs", appName, "max-size")
|
||||
if maxSize == "" {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core network plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core nginx-vhosts plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -12,7 +12,10 @@ server {
|
||||
access_log {{ $.NGINX_ACCESS_LOG_PATH }}{{ if and ($.NGINX_ACCESS_LOG_FORMAT) (ne $.NGINX_ACCESS_LOG_PATH "off") }} {{ $.NGINX_ACCESS_LOG_FORMAT }}{{ end }};
|
||||
error_log {{ $.NGINX_ERROR_LOG_PATH }};
|
||||
{{ if (and (eq $listen_port "80") ($.SSL_INUSE)) }}
|
||||
return 301 https://$host:{{ $.PROXY_SSL_PORT }}$request_uri;
|
||||
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
|
||||
location / {
|
||||
return 301 https://$host:{{ $.PROXY_SSL_PORT }}$request_uri;
|
||||
}
|
||||
{{ else }}
|
||||
location / {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core plugin plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -23,6 +23,18 @@ cmd-plugin-update() {
|
||||
fi
|
||||
|
||||
plugn update "$PLUGIN" "$PLUGIN_COMMITTISH"
|
||||
else
|
||||
pushd "$PLUGIN_ENABLED_PATH" >/dev/null
|
||||
for PLUGIN in *; do
|
||||
if [[ -d "${PLUGIN}" ]]; then
|
||||
if fn-is-core-plugin "${PLUGIN}"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
plugn update "$PLUGIN"
|
||||
fi
|
||||
done
|
||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||
fi
|
||||
|
||||
plugn trigger update
|
||||
|
||||
@@ -8,7 +8,7 @@ is_app_proxy_enabled() {
|
||||
declare desc="return true if proxy is enabled; otherwise return false"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
dokku_log_warn "Deprecated: plugn#proxy-is-enabled"
|
||||
dokku_log_warn "Deprecated: Use plugn#proxy-is-enabled"
|
||||
|
||||
plugn trigger proxy-is-enabled "$APP"
|
||||
}
|
||||
@@ -17,7 +17,7 @@ get_app_proxy_type() {
|
||||
declare desc="return app proxy type"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
dokku_log_warn "Deprecated: plugn#proxy-type"
|
||||
dokku_log_warn "Deprecated: Use plugn#proxy-type"
|
||||
|
||||
plugn trigger proxy-type "$APP"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core proxy plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ps plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core repo plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core resource plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core scheduler-docker-local plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -9,7 +9,13 @@ trigger-scheduler-docker-local-scheduler-register-retired() {
|
||||
declare APP="$1" CONTAINER_ID="$2" WAIT="${3:-60}"
|
||||
local IMAGE_ID
|
||||
|
||||
IMAGE_ID="$("$DOCKER_BIN" container inspect "$CONTAINER_ID" --format "{{.Image}}" 2>/dev/null | cut -d: -f2 || true)"
|
||||
if [[ -z "$CONTAINER_ID" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "$DOKKU_SKIP_IMAGE_RETIRE" != "true" ]]; then
|
||||
IMAGE_ID="$("$DOCKER_BIN" container inspect "$CONTAINER_ID" --format "{{.Image}}" 2>/dev/null | cut -d: -f2 || true)"
|
||||
fi
|
||||
fn-scheduler-docker-local-register-retired "container" "$APP" "$CONTAINER_ID" "$WAIT"
|
||||
|
||||
if [[ -n "$IMAGE_ID" ]]; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core shell plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ssh-keys plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -7,7 +7,7 @@ source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
||||
verify_paths() {
|
||||
declare desc="verifies storage paths"
|
||||
local -r passed_path=$1
|
||||
if [[ "$passed_path" = /* ]]; then
|
||||
if [[ "$passed_path" == /* ]]; then
|
||||
echo "$passed_path" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon."
|
||||
else
|
||||
echo "$passed_path" | grep -qe '^[a-zA-Z0-9]\{1\}[a-zA-Z0-9_.-]\+\:\/' || dokku_log_fail "Volume name must be two characters or more. Volume name must not contain invalid characters. Storage path must be two valid paths divided by colon."
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core storage plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tags plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tar plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core trace plugin"
|
||||
version = "0.24.2"
|
||||
version = "0.24.8"
|
||||
[plugin.config]
|
||||
|
||||
16
rpm.mk
16
rpm.mk
@@ -1,10 +1,9 @@
|
||||
RPM_ARCHITECTURE = x86_64
|
||||
DOKKU_RPM_PACKAGE_NAME = dokku-$(DOKKU_VERSION)-1.$(RPM_ARCHITECTURE).rpm
|
||||
DOKKU_UPDATE_RPM_PACKAGE_NAME = dokku-update-$(DOKKU_UPDATE_VERSION)-1.$(RPM_ARCHITECTURE).rpm
|
||||
|
||||
.PHONY: rpm-all
|
||||
|
||||
rpm-all: rpm-setup rpm-dokku rpm-dokku-update
|
||||
rpm-all: rpm-setup rpm-dokku
|
||||
mv /tmp/*.rpm .
|
||||
@echo "Done"
|
||||
|
||||
@@ -54,16 +53,3 @@ endif
|
||||
--license 'MIT License' \
|
||||
.
|
||||
|
||||
rpm-dokku-update:
|
||||
rm -rf $(BUILD_DIRECTORY)/$(DOKKU_UPDATE_RPM_PACKAGE_NAME)
|
||||
echo "${DOKKU_UPDATE_VERSION}" > contrib/dokku-update-version
|
||||
sudo fpm -t rpm -s dir -n dokku-update \
|
||||
--version $(DOKKU_UPDATE_VERSION) \
|
||||
--architecture $(RPM_ARCHITECTURE) \
|
||||
--package $(BUILD_DIRECTORY)/$(DOKKU_UPDATE_RPM_PACKAGE_NAME) \
|
||||
--depends 'dokku' \
|
||||
--url "https://github.com/$(DOKKU_UPDATE_REPO_NAME)" \
|
||||
--description $(DOKKU_UPDATE_DESCRIPTION) \
|
||||
--license 'MIT License' \
|
||||
contrib/dokku-update=/usr/local/bin/dokku-update \
|
||||
contrib/dokku-update-version=/var/lib/dokku-update/VERSION
|
||||
|
||||
@@ -18,6 +18,20 @@ setup-storage() {
|
||||
}
|
||||
|
||||
setup-plugins() {
|
||||
echo "Deleting invalid plugins"
|
||||
if [ -f "${DOKKU_LIB_ROOT}/core-plugins/available/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/core-plugins/available/" -type d -empty -delete
|
||||
fi
|
||||
if [ -f "${DOKKU_LIB_ROOT}/core-plugins/enabled/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/core-plugins/enabled/" -type d -empty -delete
|
||||
fi
|
||||
if [ -f "${DOKKU_LIB_ROOT}/plugins/available/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/plugins/available/" -type d -empty -delete
|
||||
fi
|
||||
if [ -f "${DOKKU_LIB_ROOT}/plugins/enabled/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/plugins/enabled/" -type d -empty -delete
|
||||
fi
|
||||
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/core-plugins/available" "${DOKKU_LIB_ROOT}/plugins/available"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"express": "4.17.x",
|
||||
"connect": "*",
|
||||
"handlebars": "~4.7.1",
|
||||
"socket.io": "~4.0.0",
|
||||
"socket.io": "~4.1.2",
|
||||
"express3-handlebars": "~0.5.2"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
30
tests/apps/dockerfile-release/Pipfile.lock
generated
30
tests/apps/dockerfile-release/Pipfile.lock
generated
@@ -18,10 +18,10 @@
|
||||
"default": {
|
||||
"asgiref": {
|
||||
"hashes": [
|
||||
"sha256:7e51911ee147dd685c3c8b805c0ad0cb58d360987b56953878f8c06d2d1c6f1a",
|
||||
"sha256:9fc6fb5d39b8af147ba40765234fa822b39818b12cc80b35ad9b0cef3a476aed"
|
||||
"sha256:92906c611ce6c967347bbfea733f13d6313901d54dcca88195eaeb52b2a8e8ee",
|
||||
"sha256:d1216dfbdfb63826470995d31caed36225dcaf34f182e0fa257a4dd9e86f1b78"
|
||||
],
|
||||
"version": "==3.2.10"
|
||||
"version": "==3.3.4"
|
||||
},
|
||||
"dj-database-url": {
|
||||
"hashes": [
|
||||
@@ -33,19 +33,19 @@
|
||||
},
|
||||
"django": {
|
||||
"hashes": [
|
||||
"sha256:5052b34b34b3425233c682e0e11d658fd6efd587d11335a0203d827224ada8f2",
|
||||
"sha256:e1630333248c9b3d4e38f02093a26f1e07b271ca896d73097457996e0fae12e8"
|
||||
"sha256:c348b3ddc452bf4b62361f0752f71a339140c777ebea3cdaaaa8fdb7f417a862",
|
||||
"sha256:f8393103e15ec2d2d313ccbb95a3f1da092f9f58d74ac1c61ca2ac0436ae1eac"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==3.0.7"
|
||||
"version": "==3.1.8"
|
||||
},
|
||||
"djangorestframework": {
|
||||
"hashes": [
|
||||
"sha256:05809fc66e1c997fd9a32ea5730d9f4ba28b109b9da71fccfa5ff241201fd0a4",
|
||||
"sha256:e782087823c47a26826ee5b6fa0c542968219263fb3976ec3c31edab23a4001f"
|
||||
"sha256:5cc724dc4b076463497837269107e1995b1fbc917468d1b92d188fd1af9ea789",
|
||||
"sha256:a5967b68a04e0d97d10f4df228e30f5a2d82ba63b9d03e1759f84993b7bf1b53"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==3.11.0"
|
||||
"version": "==3.11.2"
|
||||
},
|
||||
"gunicorn": {
|
||||
"hashes": [
|
||||
@@ -95,17 +95,17 @@
|
||||
},
|
||||
"pytz": {
|
||||
"hashes": [
|
||||
"sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed",
|
||||
"sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048"
|
||||
"sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da",
|
||||
"sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"
|
||||
],
|
||||
"version": "==2020.1"
|
||||
"version": "==2021.1"
|
||||
},
|
||||
"sqlparse": {
|
||||
"hashes": [
|
||||
"sha256:022fb9c87b524d1f7862b3037e541f68597a730a8843245c349fc93e1643dc4e",
|
||||
"sha256:e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548"
|
||||
"sha256:017cde379adbd6a1f15a61873f43e8274179378e95ef3fede90b5aa64d304ed0",
|
||||
"sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8"
|
||||
],
|
||||
"version": "==0.3.1"
|
||||
"version": "==0.4.1"
|
||||
},
|
||||
"whitenoise": {
|
||||
"hashes": [
|
||||
|
||||
@@ -4,7 +4,7 @@ go 1.12
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.44.3 // indirect
|
||||
github.com/golang/protobuf v1.4.3
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.3 // indirect
|
||||
github.com/kr/pty v1.1.8 // indirect
|
||||
|
||||
@@ -39,12 +39,16 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
|
||||
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
@@ -187,6 +191,8 @@ google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zim
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
<version>11.0.1</version>
|
||||
<version>11.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Flask==1.1.2
|
||||
gunicorn==20.0.4
|
||||
Flask==2.0.1
|
||||
gunicorn==20.1.0
|
||||
|
||||
10
tests/apps/php/composer.lock
generated
10
tests/apps/php/composer.lock
generated
@@ -1000,16 +1000,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "heroku/heroku-buildpack-php",
|
||||
"version": "v190",
|
||||
"version": "v192",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/heroku/heroku-buildpack-php.git",
|
||||
"reference": "3e49045a63ed480378c9d3d3e364acbfcc06eb3f"
|
||||
"reference": "360fa3ee3caad234760048da8bc8fefd35609ea9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/heroku/heroku-buildpack-php/zipball/3e49045a63ed480378c9d3d3e364acbfcc06eb3f",
|
||||
"reference": "3e49045a63ed480378c9d3d3e364acbfcc06eb3f",
|
||||
"url": "https://api.github.com/repos/heroku/heroku-buildpack-php/zipball/360fa3ee3caad234760048da8bc8fefd35609ea9",
|
||||
"reference": "360fa3ee3caad234760048da8bc8fefd35609ea9",
|
||||
"shasum": ""
|
||||
},
|
||||
"bin": [
|
||||
@@ -1037,7 +1037,7 @@
|
||||
"nginx",
|
||||
"php"
|
||||
],
|
||||
"time": "2021-03-04T23:15:04+00:00"
|
||||
"time": "2021-05-06T16:53:55+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Flask==1.1.2
|
||||
Jinja2==2.11.3
|
||||
Werkzeug==1.0.1
|
||||
gunicorn==20.0.4
|
||||
Flask==2.0.0
|
||||
Jinja2==3.0.1
|
||||
Werkzeug==2.0.1
|
||||
gunicorn==20.1.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
daemons (1.3.1)
|
||||
daemons (1.4.0)
|
||||
eventmachine (1.2.7)
|
||||
mustermann (1.1.1)
|
||||
ruby2_keywords (~> 0.0.1)
|
||||
@@ -14,7 +14,7 @@ GEM
|
||||
rack (~> 2.2)
|
||||
rack-protection (= 2.1.0)
|
||||
tilt (~> 2.0)
|
||||
thin (1.8.0)
|
||||
thin (1.8.1)
|
||||
daemons (~> 1.0, >= 1.0.9)
|
||||
eventmachine (~> 1.0, >= 1.0.4)
|
||||
rack (>= 1, < 3)
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
# SC1091 - Not following: FILE: does not exist (No such file or directory) - https://github.com/koalaman/shellcheck/wiki/SC1091
|
||||
# SC1117 - Backslash is literal in "\n". Prefer explicit escaping: "\\n" - https://github.com/koalaman/shellcheck/wiki/SC1117
|
||||
# SC2029 - Note that, unescaped, this expands on the client side - https://github.com/koalaman/shellcheck/wiki/SC2029
|
||||
# SC2030 - Modification of var is local (to subshell caused by pipeline). - https://github.com/koalaman/shellcheck/wiki/SC2030
|
||||
# SC2031 - var was modified in a subshell. That change might be lost. - https://github.com/koalaman/shellcheck/wiki/SC2031
|
||||
# SC2034 - VAR appears unused - https://github.com/koalaman/shellcheck/wiki/SC2034
|
||||
# SC2046 - Quote this to prevent word splitting - https://github.com/koalaman/shellcheck/wiki/SC2046
|
||||
# SC2064 - Use single quotes, otherwise this expands now rather than when signalled.
|
||||
# SC2064 - Use single quotes, otherwise this expands now rather than when signalled. - https://github.com/koalaman/shellcheck/wiki/SC2064
|
||||
# SC2068 - Double quote array expansions to avoid re-splitting elements - https://github.com/koalaman/shellcheck/wiki/SC2068
|
||||
# SC2086 - Double quote to prevent globbing and word splitting - https://github.com/koalaman/shellcheck/wiki/SC2086
|
||||
# SC2119 - Use 'function "$@"' if function's $1 should mean script's $1 - https://github.com/koalaman/shellcheck/wiki/SC2119
|
||||
@@ -27,3 +29,4 @@
|
||||
# SC2230 - which is non-standard. Use builtin 'command -v' instead - https://github.com/koalaman/shellcheck/wiki/SC2230
|
||||
# SC2231 - Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt - https://github.com/koalaman/shellcheck/wiki/SC2231
|
||||
# SC2235 - Use { ..; } instead of (..) to avoid subshell overhead - https://github.com/koalaman/shellcheck/wiki/SC2235
|
||||
# SC2267 - GNU xargs -i is deprecated in favor of -I{} - https://github.com/koalaman/shellcheck/wiki/SC2267
|
||||
|
||||
68
tests/unit/app-json-2.bats
Normal file
68
tests/unit/app-json-2.bats
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bats
|
||||
load test_helper
|
||||
|
||||
setup() {
|
||||
global_setup
|
||||
create_app
|
||||
}
|
||||
|
||||
teardown() {
|
||||
destroy_app
|
||||
global_teardown
|
||||
}
|
||||
|
||||
@test "(app-json) app.json dockerfile cmd" {
|
||||
run deploy_app dockerfile-procfile
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run docker inspect "dokku/${TEST_APP}:latest" --format "{{json .Config.Cmd}}"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output '["/bin/sh","-c","npm start"]'
|
||||
|
||||
run docker inspect "dokku/${TEST_APP}:latest" --format "{{json .Config.Entrypoint}}"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output 'null'
|
||||
}
|
||||
|
||||
@test "(app-json) app.json dockerfile release" {
|
||||
run /bin/bash -c "dokku config:set --no-restart $TEST_APP SECRET_KEY=fjdkslafjdk ENVIRONMENT=dev DATABASE_URL=sqlite:///db.sqlite3"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run deploy_app dockerfile-release
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output_contains "Executing release task from Procfile"
|
||||
assert_output_contains "SECRET_KEY: fjdkslafjdk"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(app-json) app.json dockerfile entrypoint release" {
|
||||
run deploy_app dockerfile-entrypoint dokku@dokku.me:$TEST_APP add_release_command
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "touch /app/release.test" 2
|
||||
}
|
||||
|
||||
@test "(app-json) app.json dockerfile entrypoint predeploy" {
|
||||
run deploy_app dockerfile-entrypoint
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output_contains "Executing predeploy task from app.json"
|
||||
assert_output_contains "entrypoint script started with arguments touch /app/predeploy.test"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --rm run $TEST_APP ls /app/predeploy.test"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
load test_helper
|
||||
|
||||
setup_file() {
|
||||
add-apt-repository --yes ppa:cncf-buildpacks/pack-cli
|
||||
apt-get update
|
||||
apt-get --yes install pack-cli
|
||||
if ! command -v "pack" &>/dev/null; then
|
||||
add-apt-repository --yes ppa:cncf-buildpacks/pack-cli
|
||||
apt-get update
|
||||
apt-get --yes install pack-cli
|
||||
fi
|
||||
}
|
||||
|
||||
setup() {
|
||||
@@ -48,7 +50,6 @@ teardown() {
|
||||
assert_success
|
||||
}
|
||||
|
||||
|
||||
@test "(app-json) app.json scripts postdeploy" {
|
||||
run deploy_app python dokku@dokku.me:$TEST_APP add_postdeploy_command
|
||||
echo "output: $output"
|
||||
@@ -65,61 +66,6 @@ teardown() {
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(app-json) app.json dockerfile cmd" {
|
||||
run deploy_app dockerfile-procfile
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run docker inspect "dokku/${TEST_APP}:latest" --format "{{json .Config.Cmd}}"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output '["/bin/sh","-c","npm start"]'
|
||||
|
||||
run docker inspect "dokku/${TEST_APP}:latest" --format "{{json .Config.Entrypoint}}"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output 'null'
|
||||
}
|
||||
|
||||
@test "(app-json) app.json dockerfile release" {
|
||||
run /bin/bash -c "dokku config:set --no-restart $TEST_APP SECRET_KEY=fjdkslafjdk ENVIRONMENT=dev DATABASE_URL=sqlite:///db.sqlite3"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run deploy_app dockerfile-release
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output_contains "Executing release task from Procfile"
|
||||
assert_output_contains "SECRET_KEY: fjdkslafjdk"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(app-json) app.json dockerfile entrypoint release" {
|
||||
run deploy_app dockerfile-entrypoint dokku@dokku.me:$TEST_APP add_release_command
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "touch /app/release.test" 2
|
||||
}
|
||||
|
||||
@test "(app-json) app.json dockerfile entrypoint predeploy" {
|
||||
run deploy_app dockerfile-entrypoint
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output_contains "Executing predeploy task from app.json"
|
||||
assert_output_contains "entrypoint script started with arguments touch /app/predeploy.test"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --rm run $TEST_APP ls /app/predeploy.test"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(app-json) app.json cnb release" {
|
||||
run /bin/bash -c "dokku config:set --no-restart $TEST_APP DOKKU_CNB_EXPERIMENTAL=1 SECRET_KEY=fjdkslafjdk"
|
||||
echo "output: $output"
|
||||
@@ -139,3 +85,69 @@ teardown() {
|
||||
assert_success
|
||||
assert_output_contains '"SECRET_KEY": "fjdkslafjdk"'
|
||||
}
|
||||
|
||||
@test "(app-json) tini test" {
|
||||
if ! dokku plugin:installed postgres; then
|
||||
run /bin/bash -c "dokku plugin:install https://github.com/dokku/dokku-postgres.git"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
fi
|
||||
|
||||
if ! dokku plugin:installed redis; then
|
||||
run /bin/bash -c "dokku plugin:install https://github.com/dokku/dokku-redis.git"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
fi
|
||||
|
||||
run /bin/bash -c "dokku config:set $TEST_APP SECRET_KEY_BASE=derp OTP_SECRET=1234"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku postgres:create $TEST_APP $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku postgres:link $TEST_APP $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku redis:create $TEST_APP $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku redis:link $TEST_APP $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku git:from-image $TEST_APP tootsuite/mastodon:v3.3.0"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku postgres:unlink $TEST_APP $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku redis:unlink $TEST_APP $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --force postgres:destroy $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku --force redis:destroy $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@@ -290,3 +290,28 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(buildpacks) cleanup existing .buildpacks file" {
|
||||
run deploy_app python dokku@dokku.me:$TEST_APP template_buildpacks_cleanup
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "heroku-buildpack-apt"
|
||||
assert_output_contains "heroku-buildpack-python"
|
||||
}
|
||||
|
||||
template_buildpacks_cleanup() {
|
||||
local APP="$1"
|
||||
local APP_REPO_DIR="$2"
|
||||
[[ -z "$APP" ]] && local APP="$TEST_APP"
|
||||
echo "injecting .buildpacks with shorthand -> $APP_REPO_DIR/.buildpacks"
|
||||
cat <<EOF >"$APP_REPO_DIR/.buildpacks"
|
||||
heroku-community/apt
|
||||
heroku/python
|
||||
EOF
|
||||
|
||||
echo "injecting Aptfile -> $APP_REPO_DIR/Aptfile"
|
||||
cat <<EOF >"$APP_REPO_DIR/Aptfile"
|
||||
hello
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ teardown() {
|
||||
assert_output_contains "-v /tmp" 2
|
||||
}
|
||||
|
||||
@test "(docker-options) deploy with options" {
|
||||
@test "(docker-options) deploy with options [buildpacks]" {
|
||||
run /bin/bash -c "dokku docker-options:add $TEST_APP deploy \"-v /var/tmp\""
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
@@ -277,7 +277,53 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "-v /tmp" 1
|
||||
deploy_app
|
||||
|
||||
run deploy_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
CID=$(< $DOKKU_ROOT/$TEST_APP/CONTAINER.web.1)
|
||||
run /bin/bash -c "docker inspect -f '{{ .Config.Volumes }}' $CID | sed -e 's:map::g' | tr -d '[]' | tr ' ' $'\n' | sort | xargs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output "/tmp:{} /var/tmp:{}"
|
||||
}
|
||||
|
||||
@test "(docker-options) deploy with options [dockerfile]" {
|
||||
run /bin/bash -c "dokku docker-options:add $TEST_APP deploy \"-v /var/tmp\""
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
run /bin/bash -c "echo '-v /tmp' >> $DOKKU_ROOT/$TEST_APP/DOCKER_OPTIONS_DEPLOY"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
run /bin/bash -c "echo '# comment' >> $DOKKU_ROOT/$TEST_APP/DOCKER_OPTIONS_DEPLOY"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
run /bin/bash -c "dokku docker-options:report $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "-v /tmp" 1
|
||||
|
||||
run /bin/bash -c "dokku docker-options:add $TEST_APP build --build-arg PAYPAL_CLIENT_ID=abc-v123"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku docker-options:add $TEST_APP build --build-arg PAYPAL_CLIENT_MODE=sandbox"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run deploy_app dockerfile
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "One or more build-args \[PAYPAL_CLIENT_ID PAYPAL_CLIENT_MODE\] were not consumed"
|
||||
|
||||
CID=$(< $DOKKU_ROOT/$TEST_APP/CONTAINER.web.1)
|
||||
run /bin/bash -c "docker inspect -f '{{ .Config.Volumes }}' $CID | sed -e 's:map::g' | tr -d '[]' | tr ' ' $'\n' | sort | xargs"
|
||||
|
||||
@@ -29,6 +29,28 @@ teardown() {
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(git) git:from-image [normal-git-init]" {
|
||||
run rm -rf "/home/dokku/$TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run mkdir "/home/dokku/$TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run chown -R dokku:dokku "/home/dokku/$TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku git:from-image $TEST_APP linuxserver/foldingathome:7.5.1-ls1"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(git) git:from-image [normal-cnb]" {
|
||||
run /bin/bash -c "dokku git:from-image $TEST_APP dokku/node-js-getting-started:latest"
|
||||
echo "output: $output"
|
||||
@@ -94,3 +116,16 @@ EOF
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
}
|
||||
|
||||
@test "(git) git:from-image labels correctly" {
|
||||
run /bin/bash -c "dokku git:from-image $TEST_APP linuxserver/foldingathome:7.5.1-ls1"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "docker image inspect dokku/$TEST_APP:latest --format '{{ index .Config.Labels \"com.dokku.docker-image-labeler/alternate-tags\" }}'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "linuxserver/foldingathome:7.5.1-ls1"
|
||||
}
|
||||
|
||||
@@ -369,6 +369,66 @@ teardown() {
|
||||
assert_output "10m"
|
||||
}
|
||||
|
||||
@test "(logs) logs:set max-size with alternate log-driver daemon " {
|
||||
driver="$(jq -r '."log-driver"' /etc/docker/daemon.json)"
|
||||
local TMP_FILE=$(mktemp "/tmp/dokku.me.XXXX")
|
||||
|
||||
run create_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku logs:set $TEST_APP max-size 20m 2>&1"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "Setting max-size"
|
||||
|
||||
run /bin/bash -c "echo '' | dokku plugin:trigger docker-args-process-deploy $TEST_APP 2>&1 | xargs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "--log-opt=max-size=20m"
|
||||
|
||||
DRIVER="journald" jq '."log-driver" = env.DRIVER' <"/etc/docker/daemon.json" >"$TMP_FILE"
|
||||
mv "$TMP_FILE" /etc/docker/daemon.json
|
||||
|
||||
sudo service docker restart
|
||||
|
||||
run /bin/bash -c "dokku logs:set $TEST_APP max-size 20m 2>&1"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "Setting max-size"
|
||||
|
||||
run /bin/bash -c "echo '' | dokku plugin:trigger docker-args-process-deploy $TEST_APP 2>&1 | xargs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_not_exists
|
||||
|
||||
if [[ "$driver" = "null" ]]; then
|
||||
DRIVER="$driver" jq 'del(."log-driver")' <"/etc/docker/daemon.json" >"$TMP_FILE"
|
||||
else
|
||||
DRIVER="$driver" jq '."log-driver" = env.DRIVER' <"/etc/docker/daemon.json" >"$TMP_FILE"
|
||||
fi
|
||||
|
||||
mv "$TMP_FILE" /etc/docker/daemon.json
|
||||
sudo service docker restart
|
||||
|
||||
run /bin/bash -c "dokku logs:set $TEST_APP max-size 20m 2>&1"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output_contains "Setting max-size"
|
||||
|
||||
run /bin/bash -c "echo '' | dokku plugin:trigger docker-args-process-deploy $TEST_APP 2>&1 | xargs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output "--log-opt=max-size=20m"
|
||||
}
|
||||
|
||||
@test "(logs) logs:set max-size with alternate log-driver" {
|
||||
run create_app
|
||||
echo "output: $output"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user