Merge branch 'master' into cn

* master: (427 commits)
  chore(deps): bump gunicorn from 25.0.2 to 25.1.0 in /tests/apps/multi
  chore(deps): bump flask from 3.1.2 to 3.1.3 in /tests/apps/multi
  chore(deps): bump python in /docs/_build
  chore(deps): bump google.golang.org/grpc in /tests/apps/gogrpc
  chore(deps): bump qs from 6.14.1 to 6.14.2 in /tests/apps/checks-root
  chore(deps): bump rack from 3.2.4 to 3.2.5 in /tests/apps/ruby
  fix: call correct function for limiting letsencrypt to certain domains
  chore(deps): bump gunicorn in /tests/apps/python-flask
  chore(deps): bump whitenoise in /tests/apps/dockerfile-release
  chore(deps): bump phusion/baseimage from noble-1.0.2 to noble-1.0.3
  chore(deps): bump actions/upload-artifact from 6 to 7
  chore(deps): bump actions/download-artifact from 7 to 8
  chore(deps): bump github.com/traefik/traefik/v2
  chore(deps): bump gunicorn in /tests/apps/dockerfile-release
  chore(deps): bump flask from 3.1.2 to 3.1.3 in /tests/apps/python-flask
  chore(deps): bump traefik from 3.6.7 to 3.6.9 in /plugins/traefik-vhosts
  chore(deps): bump mkdocs-material from 9.7.1 to 9.7.3 in /docs/_build
  chore(deps): bump byjg/easy-haproxy in /plugins/haproxy-vhosts
  chore(deps): bump dj-database-url in /tests/apps/dockerfile-release
  chore(deps): bump werkzeug in /tests/apps/python-flask
  ...

# Conflicts:
#	common.mk
#	contrib/dependencies.json
This commit is contained in:
apple
2026-03-02 16:41:58 +08:00
416 changed files with 10609 additions and 2298 deletions

View File

@@ -393,6 +393,13 @@ updates:
open-pull-requests-limit: 10
labels:
- "type: dependencies"
- package-ecosystem: pip
directory: "/tests/apps/dockerfile-release"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "type: dependencies"
- package-ecosystem: "docker"
directory: "/tests/apps/dockerfile-app-json-formations"
schedule:

View File

@@ -24,7 +24,7 @@ jobs:
skip: ${{ steps.check-commit.outputs.skip }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
@@ -53,7 +53,7 @@ jobs:
timeout-minutes: 45
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: set up qemu
uses: docker/setup-qemu-action@v3
@@ -75,7 +75,7 @@ jobs:
echo "matrix=$json" >> $GITHUB_OUTPUT
- name: upload packages
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: build
path: build
@@ -87,7 +87,7 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: build-image
uses: ./.github/actions/build-image
@@ -101,7 +101,7 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: build-image
uses: ./.github/actions/build-image
@@ -117,10 +117,10 @@ jobs:
matrix: ${{fromJson(needs.build.outputs.matrix)}}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: download packages
uses: actions/download-artifact@v5
uses: actions/download-artifact@v8
with:
name: build
path: build
@@ -143,7 +143,7 @@ jobs:
SYNC_GITHUB_PASSWORD: ${{ secrets.SYNC_GITHUB_PASSWORD }}
SYNC_GITHUB_USERNAME: ${{ secrets.SYNC_GITHUB_USERNAME }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.index }}
path: test-results
@@ -156,10 +156,10 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: download packages
uses: actions/download-artifact@v5
uses: actions/download-artifact@v8
with:
name: build
path: build
@@ -190,10 +190,10 @@ jobs:
GITHUB_NODE_INDEX: ${{ matrix.index }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: download packages
uses: actions/download-artifact@v5
uses: actions/download-artifact@v8
with:
name: build
path: build
@@ -214,7 +214,7 @@ jobs:
2) sudo -E make -e deploy-test-multi ;;
3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
esac
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: coverage.${{ matrix.index }}
path: test-results/coverage
@@ -230,7 +230,7 @@ jobs:
steps:
- name: download test-results
uses: actions/download-artifact@v5
uses: actions/download-artifact@v8
with:
path: test-results

View File

@@ -42,7 +42,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
# workaround for https://github.com/github/codeql/issues/14235
- name: Remove go.work file

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Cloning repo
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

View File

@@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Run hadolint
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5
# v3.0.0 => 4b5806eb9c6bee4954fc0e0cc3ad6175fc9782c1
@@ -30,9 +30,9 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
@@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Setup packer
uses: hashicorp/setup-packer@main
with:
@@ -66,7 +66,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Run shellcheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
# 1.1.0 => 94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
@@ -76,9 +76,9 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Run shfmt
uses: luizm/action-sh-checker@17bd25a6ee188d2b91f677060038f4ba37ba14b2
uses: luizm/action-sh-checker@883217215b11c1fabbf00eb1a9a041f62d74c744
# v0.5.0 => edd0e45ecff35b05f162052b50df50976c1b74fc
env:
SHFMT_OPTS: -l -bn -ci -i 2 -d
@@ -90,7 +90,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Run yamllint
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c
# v3.1.1 => 2576378a8e339169678f9939646ee3ee325e845c

View File

@@ -25,7 +25,7 @@ jobs:
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
@@ -73,7 +73,7 @@ jobs:
run: echo "version=$(cat build/next-version)" >> $GITHUB_OUTPUT
- name: upload packages
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: build
path: build
@@ -84,7 +84,7 @@ jobs:
needs: release
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Setup packer
uses: hashicorp/setup-packer@main
@@ -109,7 +109,7 @@ jobs:
PKR_VAR_dokku_version="${VERSION:1}" make image/build/digitalocean
- name: upload packages
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: digitalocean-manifest.json
path: digitalocean-manifest.json
@@ -120,7 +120,7 @@ jobs:
needs: release
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Bump Azure Template
env:
BOT_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}

View File

@@ -1,4 +1,4 @@
FROM phusion/baseimage:noble-1.0.2
FROM phusion/baseimage:noble-1.0.3
CMD ["/sbin/my_init"]
@@ -33,6 +33,11 @@ RUN mkdir -p /etc/apt/keyrings \
&& NIXPACKS_BIN_DIR=/usr/bin BIN_DIR=/usr/bin /tmp/nixpacks.bash \
&& test -x /usr/bin/nixpacks \
&& rm -rf /tmp/nixpacks.bash \
&& curl -o /tmp/railpack.bash -sSL https://railpack.com/install.sh \
&& chmod +x /tmp/railpack.bash \
&& RAILPACK_BIN_DIR=/usr/bin BIN_DIR=/usr/bin /tmp/railpack.bash \
&& test -x /usr/bin/railpack \
&& rm -rf /tmp/railpack.bash \
&& echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections \
&& echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | debconf-set-selections \
&& echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | debconf-set-selections \

View File

@@ -1,5 +1,418 @@
# History
## 0.37.6
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.37.6/bootstrap.sh
sudo DOKKU_TAG=v0.37.6 bash bootstrap.sh
```
### Bug Fixes
- #8306: @josegonzalez Ensure we can call storage:report properly
### Documentation
- #8289: @josegonzalez Add an architecture document for dokku
- #8288: @josegonzalez Add a readme for the docs folder
### Dependencies
- #8312: @dependabot[bot] chore(deps): bump timberio/vector from 0.52.0-debian to 0.53.0-debian in /plugins/logs
- #8311: @dependabot[bot] chore(deps): bump gunicorn from 24.0.0 to 24.1.1 in /tests/apps/dockerfile-release
- #8308: @dependabot[bot] chore(deps): bump gunicorn from 24.0.0 to 24.1.1 in /tests/apps/multi
- #8309: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.20 to 10.20.1 in /docs/_build
- #8307: @dependabot[bot] chore(deps): bump gunicorn from 24.0.0 to 24.1.1 in /tests/apps/python-flask
- #8301: @dependabot[bot] chore(deps): bump helm.sh/helm/v3 from 3.19.5 to 3.20.0 in /plugins/scheduler-k3s
- #8299: @dependabot[bot] chore(deps): bump ruby from 4.0.0 to 4.0.1 in /tests/apps/dockerfile-entrypoint
- #8293: @dependabot[bot] chore(deps): bump golang from 1.25.5 to 1.25.6 in /tests/apps/zombies-dockerfile-no-tini
- #8296: @dependabot[bot] chore(deps): bump soupsieve from 2.8.1 to 2.8.3 in /docs/_build
- #8295: @dependabot[bot] chore(deps): bump golang from 1.25.5 to 1.25.6 in /tests/apps/go-fail-postdeploy
- #8294: @dependabot[bot] chore(deps): bump golang from 1.25.5 to 1.25.6 in /tests/apps/gogrpc
- #8291: @dependabot[bot] chore(deps): bump golang from 1.25.5 to 1.25.6 in /tests/apps/zombies-dockerfile-tini
- #8292: @dependabot[bot] chore(deps): bump golang from 1.25.5 to 1.25.6 in /tests/apps/go-fail-predeploy
- #8277: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.34 to 2.11.35 in /plugins/scheduler-k3s
- #8297: @dependabot[bot] chore(deps): bump pyparsing from 3.3.1 to 3.3.2 in /docs/_build
- #8298: @dependabot[bot] chore(deps): bump lodash from 4.17.21 to 4.17.23 in /tests/apps/multi
- #8300: @dependabot[bot] chore(deps): bump packaging from 25.0 to 26.0 in /docs/_build
- #8303: @dependabot[bot] chore(deps): bump gunicorn from 23.0.0 to 24.0.0 in /tests/apps/python-flask
- #8305: @dependabot[bot] chore(deps): bump gunicorn from 23.0.0 to 24.0.0 in /tests/apps/dockerfile-release
- #8304: @dependabot[bot] chore(deps): bump gunicorn from 23.0.0 to 24.0.0 in /tests/apps/multi
- #8280: @dependabot[bot] chore(deps): bump helm.sh/helm/v3 from 3.19.4 to 3.19.5 in /plugins/scheduler-k3s
- #8279: @dependabot[bot] chore(deps): bump traefik from 3.6.6 to 3.6.7 in /plugins/traefik-vhosts
## 0.37.5
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.37.5/bootstrap.sh
sudo DOKKU_TAG=v0.37.5 bash bootstrap.sh
```
### Bug Fixes
- #8274: @josegonzalez Delete the tls app chart when the app is deleted
- #8273: @josegonzalez Ensure the destination directory exists when extracting files from a repository
- #8263: @josegonzalez Set correct version for builder-railpack plugin
### New Features
- #8268: @josegonzalez Add the ability to log into a registry on a per-app basis
- #8258: @josegonzalez Add support for dns-01 challenge mode when using traefik
- #8262: @josegonzalez Use certificates imported by certs plugin when deploying via scheduler-k3s
- #8266: @josegonzalez Add a method to force build when re-using an image with git:from-image
- #8265: @josegonzalez Add the ability to skip setting the deploy-branch when running git:sync
### Refactors
- #8264: @josegonzalez Rewrite the storage plugin in golang
### Dependencies
- #8270: @dependabot[bot] chore(deps): bump github.com/onsi/gomega from 1.38.3 to 1.39.0 in /plugins/common
- #8267: @dependabot[bot] chore(deps): bump werkzeug from 3.1.4 to 3.1.5 in /tests/apps/python-flask
- #8260: @dependabot[bot] chore(deps): bump django from 5.2.9 to 5.2.10 in /tests/apps/dockerfile-release
- #8256: @dependabot[bot] chore(deps): bump luizm/action-sh-checker from 0.9.0 to 0.10.0
- #8257: @dependabot[bot] chore(deps): bump dj-database-url from 3.0.1 to 3.1.0 in /tests/apps/dockerfile-release
## 0.37.4
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.37.4/bootstrap.sh
sudo DOKKU_TAG=v0.37.4 bash bootstrap.sh
```
### Bug Fixes
- #8168: @josegonzalez Install logrotate in the container
### Tests
- #8254: @josegonzalez Add a test to prove cron:run commands work as expected
- #8255: @josegonzalez Update test ruby app
### Dependencies
- #8252: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.19.1 to 10.20 in /docs/_build
- #8253: @dependabot[bot] chore(deps): bump qs from 6.14.0 to 6.14.1 in /tests/apps/checks-root
- #8249: @dependabot[bot] chore(deps): bump traefik from 3.6.5 to 3.6.6 in /plugins/traefik-vhosts
- #8250: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.33 to 2.11.34 in /plugins/scheduler-k3s
- #8247: @dependabot[bot] chore(deps): bump ruby from 3.4.8 to 4.0.0 in /tests/apps/dockerfile-entrypoint
### Other
- #8248: @osbre Add `proxy-keepalive` to Nginx properties
## 0.37.3
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.37.3/bootstrap.sh
sudo DOKKU_TAG=v0.37.3 bash bootstrap.sh
```
### Bug Fixes
- #8199: @josegonzalez Pass global build args as array when building nixpacks apps
- #8236: @josegonzalez Ensure the /etc/docker exists when interacting with it via postinst
### Documentation
- #8229: @kleutzinger Fix command syntax for removing docker options
- #8219: @deanmarano Add deanmarano to community plugins list
- #8205: @deanmarano Add DNS plugin to community plugins list
### Tests
- #8246: @josegonzalez Add tests to prove that Procfile tasks all work for every builder
### Dependencies
- #8243: @dependabot[bot] chore(deps): bump k8s.io/kubectl from 0.34.2 to 0.35.0 in /plugins/scheduler-k3s
- #8245: @dependabot[bot] chore(deps): bump github.com/go-resty/resty/v2 from 2.17.0 to 2.17.1 in /plugins/scheduler-k3s
- #8244: @dependabot[bot] chore(deps): bump k8s.io/kubernetes from 1.34.2 to 1.35.0 in /plugins/scheduler-k3s
- #8233: @dependabot[bot] chore(deps): bump github.com/onsi/gomega from 1.38.2 to 1.38.3 in /plugins/common
- #8241: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.32 to 2.11.33 in /plugins/scheduler-k3s
- #8240: @dependabot[bot] chore(deps): bump github.com/cert-manager/cert-manager from 1.19.1 to 1.19.2 in /plugins/scheduler-k3s
- #8239: @dependabot[bot] chore(deps): bump pyparsing from 3.2.5 to 3.3.1 in /docs/_build
- #8238: @dependabot[bot] chore(deps): bump google.golang.org/grpc from 1.77.0 to 1.78.0 in /tests/apps/gogrpc
- #8237: @dependabot[bot] chore(deps): bump github.com/kedacore/keda/v2 from 2.18.2 to 2.18.3 in /plugins/scheduler-k3s
- #8235: @dependabot[bot] chore(deps): bump helm.sh/helm/v3 from 3.19.2 to 3.19.4 in /plugins/scheduler-k3s
- #8232: @dependabot[bot] chore(deps): bump importlib-metadata from 8.7.0 to 8.7.1 in /docs/_build
- #8234: @dependabot[bot] chore(deps): bump k8s.io/client-go from 0.34.2 to 0.35.0 in /plugins/scheduler-k3s
- #8231: @dependabot[bot] chore(deps): bump github.com/expr-lang/expr from 1.17.6 to 1.17.7 in /plugins/scheduler-k3s
- #8208: @dependabot[bot] chore(deps): bump golang.org/x/crypto from 0.45.0 to 0.46.0 in /plugins/common
- #8201: @dependabot[bot] chore(deps): bump golang.org/x/sync from 0.18.0 to 0.19.0 in /plugins/common
- #8214: @dependabot[bot] chore(deps): bump google.golang.org/protobuf from 1.36.10 to 1.36.11 in /tests/apps/gogrpc
- #8216: @dependabot[bot] chore(deps): bump actions/download-artifact from 6 to 7
- #8217: @dependabot[bot] chore(deps): bump actions/upload-artifact from 5 to 6
- #8228: @dependabot[bot] chore(deps): bump soupsieve from 2.8 to 2.8.1 in /docs/_build
- #8226: @dependabot[bot] chore(deps): bump ruby from 3.4.7 to 3.4.8 in /tests/apps/dockerfile-entrypoint
- #8227: @dependabot[bot] chore(deps): bump mkdocs-material from 9.7.0 to 9.7.1 in /docs/_build
- #8224: @dependabot[bot] chore(deps): bump traefik from 3.6.4 to 3.6.5 in /plugins/traefik-vhosts
- #8225: @dependabot[bot] chore(deps): bump timberio/vector from 0.51.1-debian to 0.52.0-debian in /plugins/logs
- #8220: @dependabot[bot] chore(deps): bump python from 3.14.1-bookworm to 3.14.2-bookworm in /tests/apps/dockerfile-release
- #8221: @dependabot[bot] chore(deps): bump python from 3.14.1-alpine to 3.14.2-alpine in /docs/_build
- #8218: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.19 to 10.19.1 in /docs/_build
- #8215: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.18 to 10.19 in /docs/_build
- #8209: @dependabot[bot] chore(deps): bump github.com/onsi/gomega from 1.38.2 to 1.38.3 in /plugins/config
- #8210: @dependabot[bot] chore(deps): bump github.com/kedacore/keda/v2 from 2.18.1 to 2.18.2 in /plugins/scheduler-k3s
- #8211: @dependabot[bot] chore(deps): bump github.com/go-openapi/jsonpointer from 0.22.3 to 0.22.4 in /plugins/scheduler-k3s
- #8200: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.17.2 to 10.18 in /docs/_build
- #8202: @dependabot[bot] chore(deps): bump golang.org/x/sync from 0.18.0 to 0.19.0 in /plugins/scheduler-docker-local
- #8203: @dependabot[bot] chore(deps): bump traefik from 3.6.2 to 3.6.4 in /plugins/traefik-vhosts
- #8204: @dependabot[bot] chore(deps): bump golang.org/x/sync from 0.18.0 to 0.19.0 in /plugins/scheduler-k3s
## 0.37.2
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.37.2/bootstrap.sh
sudo DOKKU_TAG=v0.37.2 bash bootstrap.sh
```
### Bug Fixes
- #8198: @josegonzalez Ensure we continue on with logic if the error returned from fetching all apps is NoAppsExist
### Dependencies
- #8196: @dependabot[bot] chore(deps): bump byjg/easy-haproxy from 4.6.0 to 5.0.0 in /plugins/haproxy-vhosts
- #8197: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.31 to 2.11.32 in /plugins/scheduler-k3s
## 0.37.1
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.37.1/bootstrap.sh
sudo DOKKU_TAG=v0.37.1 bash bootstrap.sh
```
### Bug Fixes
- #8186: @josegonzalez Update url to download golang
- #8155: @josegonzalez Sanitize vector sink values in report output
- #8156: @josegonzalez Do not start nginx if there are no apps with nginx as a proxy
- #8152: @josegonzalez Ensure keda usage does not cause jank in scaling deployments
### New Features
- #8154: @josegonzalez Enable live-restore by default when installing Dokku
- #8151: @josegonzalez Allow exposing non-web processes as kubernetes services
### Refactors
- #8149: @josegonzalez Remove nginx checks for functionality that always exists
### Documentation
- #8170: @znz Fix version in migration docs
- #8169: @josegonzalez Update logging in doc generation to enhance doc generation debugging
- #8153: @josegonzalez Fix reference to letsencrypt-server property
- #8150: @josegonzalez Clarify system requirements for k3s usage
- #8148: @josegonzalez Clarify plugin installation documentation
### Dependencies
- #8192: @dependabot[bot] chore(deps): bump golang from 1.25.4 to 1.25.5 in /tests/apps/go-fail-predeploy
- #8191: @dependabot[bot] chore(deps): bump golang from 1.25.4 to 1.25.5 in /tests/apps/go-fail-postdeploy
- #8189: @dependabot[bot] chore(deps): bump golang from 1.25.4 to 1.25.5 in /tests/apps/gogrpc
- #8193: @dependabot[bot] chore(deps): bump python from 3.14.0-alpine to 3.14.1-alpine in /docs/_build
- #8190: @dependabot[bot] chore(deps): bump golang from 1.25.4 to 1.25.5 in /tests/apps/zombies-dockerfile-no-tini
- #8188: @dependabot[bot] chore(deps): bump golang from 1.25.4 to 1.25.5 in /tests/apps/zombies-dockerfile-tini
- #8194: @dependabot[bot] chore(deps): bump python from 3.14.0-bookworm to 3.14.1-bookworm in /tests/apps/dockerfile-release
- #8195: @dependabot[bot] chore(deps): bump django from 5.2.8 to 5.2.9 in /tests/apps/dockerfile-release
- #8177: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/nodejs-express-noprocfile
- #8178: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/dockerfile-procfile-bad
- #8179: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/nodejs-express
- #8180: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/dockerfile-procfile
- #8181: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/gitsubmodules
- #8183: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/checks-root
- #8182: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/nodejs-express-noappjson
- #8184: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/dockerfile-app-json-formations
- #8172: @dependabot[bot] chore(deps): bump beautifulsoup4 from 4.14.2 to 4.14.3 in /docs/_build
- #8173: @dependabot[bot] chore(deps): bump werkzeug from 3.1.3 to 3.1.4 in /tests/apps/python-flask
- #8164: @dependabot[bot] chore(deps): bump body-parser from 2.2.0 to 2.2.1 in /tests/apps/checks-root
- #8165: @dependabot[bot] chore(deps): bump github.com/go-resty/resty/v2 from 2.16.5 to 2.17.0 in /plugins/scheduler-k3s
- #8167: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.17.1 to 10.17.2 in /docs/_build
- #8162: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.30 to 2.11.31 in /plugins/scheduler-k3s
- #8161: @dependabot[bot] chore(deps): bump github.com/fluxcd/pkg/kustomize from 1.23.0 to 1.24.0 in /plugins/scheduler-k3s
- #8159: @dependabot[bot] chore(deps): bump helm.sh/helm/v3 from 3.19.0 to 3.19.2 in /plugins/scheduler-k3s
- #8158: @dependabot[bot] chore(deps): bump k8s.io/kubernetes from 1.34.1 to 1.34.2 in /plugins/scheduler-k3s
- #8143: @dependabot[bot] chore(deps): bump actions/checkout from 5 to 6
- #8145: @dependabot[bot] chore(deps): bump github.com/go-openapi/jsonpointer from 0.22.1 to 0.22.3 in /plugins/scheduler-k3s
- #8146: @dependabot[bot] chore(deps): bump k8s.io/kubectl from 0.34.1 to 0.34.2 in /plugins/scheduler-k3s
- #8144: @dependabot[bot] chore(deps): bump traefik from 3.6.1 to 3.6.2 in /plugins/traefik-vhosts
## 0.37.0
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.37.0/bootstrap.sh
sudo DOKKU_TAG=v0.37.0 bash bootstrap.sh
```
See the [0.37.0 migration guide](/docs/appendices/0.37.0-migration-guide.md) for more information on migrating to 0.37.0.
### Backwards Compatibility Breaks
- #8140: @josegonzalez Rename the scheduler-k3s:cluster-* commands to use a : instead of - for a delimiter
- #7982: @josegonzalez Remove references to pack being experimental
### Bug Fixes
- #8136: @josegonzalez Do not reset manually set port mappings when upgrading dokku
- #8114: @josegonzalez Ensure we can execute run commands when exec is executed as part of an entrypoint
- #8109: @josegonzalez Allow skipping the install trigger when installing a plugin
- #8104: @josegonzalez Drop deprecated aufs check
- #8100: @othercorey Add process-type label for run with procfile cmd
### New Features
- #8139: @josegonzalez Add aliases for select builder and scheduler plugins
- #8138: @josegonzalez Turn on buildpack trace mode when dokku trace is on
- #8137: @josegonzalez Add the ability to create k3s node profiles
- #8135: @josegonzalez Add support for git remotes with port specified inline
- #8112: @josegonzalez Implement cron and one-off run task TTLs
- #8106: @josegonzalez Support inline comments for app.json
- #8105: @josegonzalez Allow specifying kubelet-args when adding a new node to the cluster
- #8085: @josegonzalez Implement config:import command
- #8004: @Tashows Add buildpacks:detect subcommand
- #7991: @josegonzalez Add ability to pause/restart cron jobs
- #7989: @josegonzalez Add support to prevent overlapping execution of cron tasks
- #7986: @josegonzalez Add support for specifying CNB buildpacks via buildpacks command
- #7956: @josegonzalez Add a Railpack builder to Dokku
- #7608: @dragonhunt02 Add commands to proxy implementations for managing labels
### Refactors
- #8101: @josegonzalez Filter build docker-options correctly for each builder
### Documentation
- #8103: @josegonzalez Correct the release version for railpacks support
### Dependencies
- #8130: @dependabot[bot] chore(deps): bump golang.org/x/crypto from 0.43.0 to 0.45.0 in /plugins/common
- #8110: @dependabot[bot] chore(deps): bump google.golang.org/grpc from 1.76.0 to 1.77.0 in /tests/apps/gogrpc
- #8108: @dependabot[bot] chore(deps): bump js-yaml from 3.14.1 to 3.14.2 in /tests/apps/multi
- #8107: @dependabot[bot] chore(deps): bump click from 8.3.0 to 8.3.1 in /docs/_build
- #8098: @dependabot[bot] chore(deps): bump traefik from 3.5.4 to 3.6.1 in /plugins/traefik-vhosts
- #8097: @dependabot[bot] chore(deps): bump timberio/vector from 0.51.0-debian to 0.51.1-debian in /plugins/logs
- #8094: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.16.1 to 10.17.1 in /docs/_build
- #8092: @dependabot[bot] chore(deps): bump mkdocs-material from 9.6.23 to 9.7.0 in /docs/_build
- #8090: @dependabot[bot] chore(deps): bump sigs.k8s.io/kustomize/api from 0.20.1 to 0.21.0 in /plugins/scheduler-k3s
## 0.36.11
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.36.11/bootstrap.sh
sudo DOKKU_TAG=v0.36.11 bash bootstrap.sh
```
### Bug Fixes
- #8084: @josegonzalez Use the correct case for AS in Dockerfile
- #8083: @josegonzalez Use correct variable for tasks
- #8081: @josegonzalez Error out if the appname or app.json is missing when retrieving cron entries
### Refactors
- #8082: @josegonzalez Standardize naming in cron code
### Dependencies
- #8073: @dependabot[bot] chore(deps): bump timberio/vector from 0.50.0-debian to 0.51.0-debian in /plugins/logs
- #8080: @dependabot[bot] chore(deps): bump github.com/containerd/containerd from 1.7.28 to 1.7.29 in /plugins/scheduler-k3s
- #8079: @dependabot[bot] chore(deps): bump golang from 1.25.3 to 1.25.4 in /tests/apps/zombies-dockerfile-tini
- #8075: @dependabot[bot] chore(deps): bump golang from 1.25.3 to 1.25.4 in /tests/apps/go-fail-postdeploy
- #8078: @dependabot[bot] chore(deps): bump golang from 1.25.3 to 1.25.4 in /tests/apps/go-fail-predeploy
- #8077: @dependabot[bot] chore(deps): bump golang from 1.25.3 to 1.25.4 in /tests/apps/zombies-dockerfile-no-tini
- #8076: @dependabot[bot] chore(deps): bump golang from 1.25.3 to 1.25.4 in /tests/apps/gogrpc
- #8072: @dependabot[bot] chore(deps): update markdown requirement from <3.10,>=3.2.1 to >=3.2.1,<3.11 in /docs/_build
- #8074: @dependabot[bot] chore(deps): bump django from 5.2.7 to 5.2.8 in /tests/apps/dockerfile-release
- #8071: @dependabot[bot] chore(deps): bump mkdocs-material from 9.6.22 to 9.6.23 in /docs/_build
- #8068: @dependabot[bot] chore(deps): bump traefik from 3.5.3 to 3.5.4 in /plugins/traefik-vhosts
- #8069: @dependabot[bot] chore(deps): bump github.com/kedacore/keda/v2 from 2.18.0 to 2.18.1 in /plugins/scheduler-k3s
- #8066: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.29 to 2.11.30 in /plugins/scheduler-k3s
## 0.36.10
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.36.10/bootstrap.sh
sudo DOKKU_TAG=v0.36.10 bash bootstrap.sh
```
### Bug Fixes
- #8063: @othercorey Use -t instead of deprecated --time in stop commands
- #8058: @josegonzalez Ensure the pre-receive hook and URLS files are correct when cloning or renaming apps
- #8059: @josegonzalez Expand variables for release tasks
- #8060: @josegonzalez Use updated http2 directive for setting http2 support
### Documentation
- #8051: @othercorey Fix "its" in Caddy SSL configuration documentation
### Dependencies
- #8065: @dependabot[bot] chore(deps): bump actions/upload-artifact from 4 to 5
- #8064: @dependabot[bot] chore(deps): bump actions/download-artifact from 5 to 6
- #8057: @dependabot[bot] chore(deps): bump node from 24-alpine to 25-alpine in /tests/apps/dockerfile-procfile-bad
- #8056: @dependabot[bot] chore(deps): bump node from 24-alpine to 25-alpine in /tests/apps/dockerfile-app-json-formations
- #8055: @dependabot[bot] chore(deps): bump node from 24-alpine to 25-alpine in /tests/apps/dockerfile-procfile
- #8054: @dependabot[bot] chore(deps): bump node from 24-alpine to 25-alpine in /tests/apps/dockerfile
- #8053: @dependabot[bot] chore(deps): bump node from 24-alpine to 25-alpine in /tests/apps/dockerfile-noexpose
## 0.36.9
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.36.9/bootstrap.sh
sudo DOKKU_TAG=v0.36.9 bash bootstrap.sh
```
### Bug Fixes
- #8032: @josegonzalez Set correct labels for tests/apps/dockerfile-release pip updates
### New Features
- #8047: @josegonzalez Add ability to disable letsencrypt for a given application or globally
### Dependencies
- #8049: @dependabot[bot] chore(deps): bump github.com/cert-manager/cert-manager from 1.19.0 to 1.19.1 in /plugins/scheduler-k3s
- #8048: @dependabot[bot] chore(deps): bump mkdocs-material from 9.6.21 to 9.6.22 in /docs/_build
- #8042: @dependabot[bot] chore(deps): bump django from 5.1.13 to 5.2.7 in /tests/apps/dockerfile-release
- #8043: @dependabot[bot] chore(deps): bump whitenoise from 6.2.0 to 6.11.0 in /tests/apps/dockerfile-release
- #8044: @dependabot[bot] chore(deps): bump djangorestframework from 3.15.2 to 3.16.1 in /tests/apps/dockerfile-release
- #8045: @dependabot[bot] chore(deps): bump psycopg2-binary from 2.9.5 to 2.9.11 in /tests/apps/dockerfile-release
- #8046: @dependabot[bot] chore(deps): bump dj-database-url from 1.0.0 to 3.0.1 in /tests/apps/dockerfile-release
- #8041: @dependabot[bot] chore(deps): bump golang from 1.25.2 to 1.25.3 in /tests/apps/gogrpc
- #8040: @dependabot[bot] chore(deps): bump golang from 1.25.2 to 1.25.3 in /tests/apps/go-fail-predeploy
- #8039: @dependabot[bot] chore(deps): bump golang from 1.25.2 to 1.25.3 in /tests/apps/zombies-dockerfile-no-tini
- #8037: @dependabot[bot] chore(deps): bump golang from 1.25.2 to 1.25.3 in /tests/apps/go-fail-postdeploy
- #8038: @dependabot[bot] chore(deps): bump golang from 1.25.2 to 1.25.3 in /tests/apps/zombies-dockerfile-tini
- #8036: @dependabot[bot] chore(deps): bump actions/setup-node from 5 to 6
- #8033: @dependabot[bot] chore(deps): bump github.com/gofrs/flock from 0.12.1 to 0.13.0 in /plugins/scheduler-k3s
- #8034: @dependabot[bot] chore(deps): bump github.com/kedacore/keda/v2 from 2.17.1-0.20250708210620-a239d2459a35 to 2.18.0 in /plugins/scheduler-k3s
## 0.36.8
Install/update via the bootstrap script:

View File

@@ -85,8 +85,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 -NP . https://dokku.com/install/v0.36.8/bootstrap.sh
sudo DOKKU_TAG=v0.36.8 bash bootstrap.sh
wget -NP . https://dokku.com/install/v0.37.6/bootstrap.sh
sudo DOKKU_TAG=v0.37.6 bash bootstrap.sh
```
You can then proceed to configure your server domain (via `dokku domains:set-global`) and user access (via `dokku ssh-keys:add`) to complete the installation.

View File

@@ -1,7 +1,7 @@
GO_ARGS ?=
GO_PLUGIN_MAKE_TARGET ?= build
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
BUILD_IMAGE := ccr.ccs.tencentyun.com/miaogai/golang:1.25.1
BUILD_IMAGE := hub.diyla.com/golang:1.25.5
GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)

View File

@@ -135,20 +135,33 @@ main() {
mv docs-main docs
git checkout -- mkdocs.yml docs
if [[ "$(git -C tmp/docs-build ls-files -dmo)" == "docs/sitemap.xml.gz" ]]; then
echo "====> Checking for file changes"
changes=$(git -C tmp/docs-build ls-files -dmo)
if [[ -z "$changes" ]]; then
echo " ! No doc changes found"
exit 0
fi
if [[ "$changes" == "docs/sitemap.xml.gz" ]]; then
echo " ! No doc changes found"
git -C tmp/docs-build checkout -- docs/sitemap.xml.gz
else
echo "====> Pushing docs"
git -C tmp/docs-build add .
git -C tmp/docs-build commit -m "chore: regenerate docs"
if [[ -n "$BOT_GITHUB_USERNAME" ]] && [[ -n "$BOT_GITHUB_API_TOKEN" ]]; then
git -C tmp/docs-build remote set-url origin "https://$BOT_GITHUB_USERNAME:$BOT_GITHUB_API_TOKEN@github.com/dokku/docs.git"
fi
git -C tmp/docs-build push origin master
exit 0
fi
echo "====> Changes found"
echo "$changes"
echo "====> Committing changes"
git -C tmp/docs-build add .
git -C tmp/docs-build commit -m "chore: regenerate docs"
echo "====> Pushing changes"
if [[ -n "$BOT_GITHUB_USERNAME" ]] && [[ -n "$BOT_GITHUB_API_TOKEN" ]]; then
git -C tmp/docs-build remote set-url origin "https://$BOT_GITHUB_USERNAME:$BOT_GITHUB_API_TOKEN@github.com/dokku/docs.git"
fi
git -C tmp/docs-build push origin master
}
main "$@"

View File

@@ -7,7 +7,7 @@ ARG WORKDIR=/go/src/github.com/dokku/dokku
WORKDIR ${WORKDIR}
RUN wget -qO /tmp/go${GOLANG_VERSION}.linux.tar.gz "https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \
RUN wget -qO /tmp/go${GOLANG_VERSION}.linux.tar.gz "https://go.dev/dl/go${GOLANG_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux.tar.gz \
&& cp /usr/local/go/bin/* /usr/local/bin \
&& mkdir -p ${WORKDIR}/contrib
@@ -23,7 +23,7 @@ COPY . ${WORKDIR}
ENV GOPATH=/go
ENV GOROOT=/usr/local/go
FROM builder as amd64
FROM builder AS amd64
ARG PLUGIN_MAKE_TARGET
ARG DOKKU_VERSION=master
@@ -38,7 +38,7 @@ RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
make version copyfiles \
&& make deb-dokku
FROM builder as arm64
FROM builder AS arm64
COPY --from=amd64 /tmp /tmp
COPY --from=amd64 /usr/local/share/man/man1/dokku.1 /usr/local/share/man/man1/dokku.1-generated

View File

@@ -4,48 +4,48 @@
"name": "docker-container-healthchecker",
"version": "0.14.0",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/dokku/docker-container-healthchecker/releases/download/v0.14.0/docker-container-healthchecker-linux-amd64",
"arm64": "https://gh-proxy.com/https://github.com/dokku/docker-container-healthchecker/releases/download/v0.14.0/docker-container-healthchecker-linux-arm64"
"amd64": "https://hub.diyla.com/https://github.com/dokku/docker-container-healthchecker/releases/download/v0.14.0/docker-container-healthchecker-linux-amd64",
"arm64": "https://hub.diyla.com/https://github.com/dokku/docker-container-healthchecker/releases/download/v0.14.0/docker-container-healthchecker-linux-arm64"
}
},
{
"name": "docker-image-labeler",
"version": "0.8.1",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/dokku/docker-image-labeler/releases/download/v0.8.1/docker-image-labeler-linux-amd64",
"arm64": "https://gh-proxy.com/https://github.com/dokku/docker-image-labeler/releases/download/v0.8.1/docker-image-labeler-linux-arm64"
"amd64": "https://hub.diyla.com/https://github.com/dokku/docker-image-labeler/releases/download/v0.8.1/docker-image-labeler-linux-amd64",
"arm64": "https://hub.diyla.com/https://github.com/dokku/docker-image-labeler/releases/download/v0.8.1/docker-image-labeler-linux-arm64"
}
},
{
"name": "lambda-builder",
"version": "0.9.1",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/dokku/lambda-builder/releases/download/v0.9.1/lambda-builder-linux-amd64",
"arm64": "https://gh-proxy.com/https://github.com/dokku/lambda-builder/releases/download/v0.9.1/lambda-builder-linux-arm64"
"amd64": "https://hub.diyla.com/https://github.com/dokku/lambda-builder/releases/download/v0.9.1/lambda-builder-linux-amd64",
"arm64": "https://hub.diyla.com/https://github.com/dokku/lambda-builder/releases/download/v0.9.1/lambda-builder-linux-arm64"
}
},
{
"name": "netrc",
"version": "0.10.2",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/dokku/netrc/releases/download/v0.10.2/netrc-linux-amd64",
"arm64": "https://gh-proxy.com/https://github.com/dokku/netrc/releases/download/v0.10.2/netrc-linux-arm64"
"amd64": "https://hub.diyla.com/https://github.com/dokku/netrc/releases/download/v0.10.2/netrc-linux-amd64",
"arm64": "https://hub.diyla.com/https://github.com/dokku/netrc/releases/download/v0.10.2/netrc-linux-arm64"
}
},
{
"name": "procfile-util",
"version": "0.20.3",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/dokku/procfile-util/releases/download/v0.20.3/procfile-util-linux-amd64",
"arm64": "https://gh-proxy.com/https://github.com/dokku/procfile-util/releases/download/v0.20.3/procfile-util-linux-arm64"
"amd64": "https://hub.diyla.com/https://github.com/dokku/procfile-util/releases/download/v0.20.3/procfile-util-linux-amd64",
"arm64": "https://hub.diyla.com/https://github.com/dokku/procfile-util/releases/download/v0.20.3/procfile-util-linux-arm64"
}
},
{
"name": "sshcommand",
"version": "0.20.0",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/dokku/sshcommand/releases/download/v0.20.0/sshcommand",
"arm64": "https://gh-proxy.com/https://github.com/dokku/sshcommand/releases/download/v0.20.0/sshcommand"
"amd64": "https://hub.diyla.com/https://github.com/dokku/sshcommand/releases/download/v0.20.0/sshcommand",
"arm64": "https://hub.diyla.com/https://github.com/dokku/sshcommand/releases/download/v0.20.0/sshcommand"
}
}
],
@@ -54,16 +54,16 @@
"name": "gliderlabs-sigil",
"version": "0.11.4",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/gliderlabs/sigil/releases/download/v0.11.4/sigil-linux-amd64",
"arm64": "https://gh-proxy.com/https://github.com/gliderlabs/sigil/releases/download/v0.11.4/sigil-linux-arm64"
"amd64": "https://hub.diyla.com/https://github.com/gliderlabs/sigil/releases/download/v0.11.4/sigil-linux-amd64",
"arm64": "https://hub.diyla.com/https://github.com/gliderlabs/sigil/releases/download/v0.11.4/sigil-linux-arm64"
}
},
{
"name": "plugn",
"version": "0.16.0",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/dokku/plugn/releases/download/v0.16.0/plugn-linux-amd64",
"arm64": "https://gh-proxy.com/https://github.com/dokku/plugn/releases/download/v0.16.0/plugn-linux-arm64"
"amd64": "https://hub.diyla.com/https://github.com/dokku/plugn/releases/download/v0.16.0/plugn-linux-amd64",
"arm64": "https://hub.diyla.com/https://github.com/dokku/plugn/releases/download/v0.16.0/plugn-linux-arm64"
}
}
],
@@ -72,24 +72,24 @@
"name": "dokku-event-listener",
"version": "0.17.2",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/dokku/dokku-event-listener/releases/download/v0.17.2/dokku-event-listener-linux-amd64",
"arm64": "https://gh-proxy.com/https://github.com/dokku/dokku-event-listener/releases/download/v0.17.2/dokku-event-listener-linux-arm64"
"amd64": "https://hub.diyla.com/https://github.com/dokku/dokku-event-listener/releases/download/v0.17.2/dokku-event-listener-linux-amd64",
"arm64": "https://hub.diyla.com/https://github.com/dokku/dokku-event-listener/releases/download/v0.17.2/dokku-event-listener-linux-arm64"
}
},
{
"name": "dokku-update",
"version": "0.9.6",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/dokku/dokku-update/releases/download/v0.9.6/dokku-update",
"arm64": "https://gh-proxy.com/https://github.com/dokku/dokku-update/releases/download/v0.9.6/dokku-update"
"amd64": "https://hub.diyla.com/https://github.com/dokku/dokku-update/releases/download/v0.9.6/dokku-update",
"arm64": "https://hub.diyla.com/https://github.com/dokku/dokku-update/releases/download/v0.9.6/dokku-update"
}
},
{
"name": "herokuish",
"version": "0.11.3",
"version": "0.11.8",
"urls": {
"amd64": "https://gh-proxy.com/https://github.com/gliderlabs/herokuish/releases/download/v0.11.3/herokuish_0.11.3_linux_x86_64.tgz",
"arm64": "https://gh-proxy.com/https://github.com/gliderlabs/herokuish/releases/download/v0.11.3/herokuish_0.11.3_linux_x86_64.tgz"
"amd64": "https://hub.diyla.com/https://github.com/gliderlabs/herokuish/releases/download/v0.11.8/herokuish_0.11.8_linux_x86_64.tgz",
"arm64": "https://hub.diyla.com/https://github.com/gliderlabs/herokuish/releases/download/v0.11.8/herokuish_0.11.8_linux_x86_64.tgz"
}
}
]

View File

@@ -1,8 +1,9 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
export DOKKU_PORT=${DOKKU_PORT:=22}
export DOKKU_PORT=${DOKKU_PORT:=}
export DOKKU_HOST=${DOKKU_HOST:=}
export DOKKU_APP_PATH=${DOKKU_APP_PATH:=}
fn-random-number() {
[[ -n "$1" ]] && RANGE="$1"
@@ -61,12 +62,42 @@ fn-dokku-host() {
echo "$DOKKU_HOST"
}
fn-dokku-app() {
declare DOKKU_GIT_REMOTE="$1" DOKKU_REMOTE_HOST="$2"
remote_output="$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | head -n 1 | awk '{print $2}')"
# check if there is a scheme
if echo "$remote_output" | grep -qEi "ssh://"; then
echo "$remote_output" | grep -Ei "ssh://dokku@$DOKKU_REMOTE_HOST" | cut -f2 -d'@' | cut -f2 -d'/' 2>/dev/null
else
echo "$remote_output" | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | cut -f2 -d'@' | cut -f2 -d':' 2>/dev/null
fi
}
fn-dokku-port() {
declare DOKKU_GIT_REMOTE="$1" DOKKU_REMOTE_HOST="$2"
remote_output="$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | head -n 1 | awk '{print $2}')"
if echo "$remote_output" | grep -qEi "ssh://"; then
local output="$(echo "$remote_output" | grep -Ei "ssh://dokku@$DOKKU_REMOTE_HOST" | cut -f2 -d'@' | cut -f1 -d'/' 2>/dev/null)"
# check if output has a : and if so, get the port
if echo "$output" | grep -qEi ":"; then
echo "$output" | cut -f2 -d':' 2>/dev/null
else
echo "22"
fi
else
echo "22"
fi
}
fn-get-remote() {
git config dokku.remote 2>/dev/null || echo "dokku"
}
main() {
declare CMD="$1" APP_ARG="$2"
local APP="" DOKKU_GIT_REMOTE="$(fn-get-remote)" DOKKU_REMOTE_HOST=""
local cmd_set=false next_index=1 skip=false args=("$@")
@@ -84,6 +115,10 @@ main() {
APP=${args[$next_index]}
skip=true
shift 2
elif [[ "$arg" == "--app-path" ]]; then
DOKKU_APP_PATH=${args[$next_index]}
skip=true
shift 2
elif [[ "$arg" == "--remote" ]]; then
DOKKU_GIT_REMOTE=${args[$next_index]}
skip=true
@@ -103,6 +138,11 @@ main() {
next_index=$((next_index + 1))
done
if [[ -n "$DOKKU_APP_PATH" ]]; then
pushd "$DOKKU_APP_PATH" &>/dev/null || exit 1
trap 'popd &>/dev/null || true' RETURN INT TERM
fi
DOKKU_REMOTE_HOST="$(fn-dokku-host "$DOKKU_GIT_REMOTE" "$DOKKU_HOST")"
if [[ -z "$DOKKU_REMOTE_HOST" ]] && [[ "$CMD" != remote ]] && [[ "$CMD" != remote:* ]]; then
fn-client-help-msg
@@ -111,14 +151,28 @@ main() {
if [[ -z "$APP" ]]; then
if [[ -d .git ]] || git rev-parse --git-dir &>/dev/null; then
set +e
APP=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
APP="$(fn-dokku-app "$DOKKU_GIT_REMOTE" "$DOKKU_REMOTE_HOST")"
set -e
else
echo " ! This is not a git repository" 1>&2
fi
fi
if [[ -z "$DOKKU_PORT" ]]; then
DOKKU_PORT="$(fn-dokku-port "$DOKKU_GIT_REMOTE" "$DOKKU_REMOTE_HOST")"
fi
case "$CMD" in
remote:show)
echo "dokku-app: $APP"
echo "dokku-git-remote: $DOKKU_GIT_REMOTE"
echo "dokku-host: $DOKKU_HOST"
echo "dokku-port: $DOKKU_PORT"
echo "dokku-remote-host: $DOKKU_REMOTE_HOST"
echo "dokku-ssh-user: dokku"
echo "dokku-constructed-remote: ssh://dokku@$DOKKU_REMOTE_HOST:$DOKKU_PORT/$APP"
exit 0
;;
apps:create)
if [[ -z "$APP" ]] && [[ -z "$APP_ARG" ]]; then
APP=$(fn-random-name)

6
debian/control vendored
View File

@@ -1,11 +1,11 @@
Package: dokku
Version: 0.36.8
Version: 0.37.6
Section: web
Priority: optional
Architecture: amd64
Depends: apache2-utils, locales, git, cpio, cron, curl, man-db, netcat, sshcommand, docker-engine-cs (>= 19.03.0) | docker-engine (>= 19.03.0) | docker-io (>= 19.03.0) | docker.io (>= 19.03.0) | docker-ce (>= 19.03.0) | docker-ee (>= 19.03.0) | moby-engine, docker-compose-plugin | moby-compose, docker-buildx-plugin | moby-buildx, docker-container-healthchecker, docker-image-labeler, lambda-builder, net-tools, netrc, parallel, procfile-util, rsync, dos2unix, jq, unzip, util-linux
Depends: apache2-utils, locales, git, cpio, cron, curl, logrotate, man-db, netcat, sshcommand, docker-engine-cs (>= 19.03.0) | docker-engine (>= 19.03.0) | docker-io (>= 19.03.0) | docker.io (>= 19.03.0) | docker-ce (>= 19.03.0) | docker-ee (>= 19.03.0) | moby-engine, docker-compose-plugin | moby-compose, docker-buildx-plugin | moby-buildx, docker-container-healthchecker, docker-image-labeler, lambda-builder, net-tools, netrc, parallel, procfile-util, rsync, dos2unix, unzip, util-linux
Recommends: herokuish, bash-completion, dokku-update, dokku-event-listener
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, bind9-dnsutils, debconf, plugn, sudo, python3, rsyslog
Pre-Depends: gliderlabs-sigil, jq, nginx (>= 1.8.0) | openresty, bind9-dnsutils, debconf, plugn, sudo, python3, rsyslog
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
Dokku is an extensible, open source Platform as a Service

38
debian/postinst vendored
View File

@@ -24,6 +24,40 @@ call-sshcommand() {
fi
}
setup-docker-live-restore() {
# skip if running in docker-based installation
if [[ "$DOKKU_INIT_SYSTEM" == "sv" ]]; then
return
fi
# allow disabling via /etc/default/dokku
if [[ "$DOKKU_LIVE_RESTORE" == "false" ]]; then
return
fi
live_restore="$(docker info --format '{{ .LiveRestoreEnabled }}' || true)"
if [ "$live_restore" = "true" ]; then
echo "Docker live-restore is already enabled"
return
fi
echo "Enabling docker live-restore"
if [[ ! -f /etc/docker/daemon.json ]]; then
mkdir -p /etc/docker
echo "{}" >/etc/docker/daemon.json
fi
config="$(jq '. + {"live-restore": true}' /etc/docker/daemon.json)"
echo "$config" >/etc/docker/daemon.json
if command -v systemctl &>/dev/null; then
if ! systemctl reload docker; then
echo "Unable to reload docker, please reload manually" 1>&2
fi
else
echo "Unable to reload docker, please reload manually" 1>&2
fi
}
setup-user() {
echo "Setting up dokku user"
call-sshcommand create dokku /usr/bin/dokku
@@ -128,9 +162,6 @@ case "$1" in
configure)
mandb
[ ! -x /usr/bin/docker.io ] || ln -sf /usr/bin/docker.io /usr/local/bin/docker
if [[ -f /sbin/modprobe ]]; then
modprobe aufs || echo "WARNING: Restart server to finish installing dokku!"
fi
setup-user
setup-storage
@@ -138,6 +169,7 @@ case "$1" in
dpkg-handling
setup-plugins
setup-sshcommand
setup-docker-live-restore
;;
*)

View File

@@ -86,7 +86,7 @@ main() {
fi
# run core install triggers to force create any folders that may be missing
dokku plugin:install --core
dokku plugin:install
if [[ -n "$DOKKU_HOSTNAME" ]]; then
echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections

View File

@@ -1 +1 @@
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-container-healthchecker,/usr/bin/docker-image-labeler,/usr/bin/lambda-builder,/usr/bin/nixpacks,/usr/bin/pack
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-container-healthchecker,/usr/bin/docker-image-labeler,/usr/bin/lambda-builder,/usr/bin/nixpacks,/usr/bin/railpack,/usr/bin/pack

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $TRACE ]] && set -x
main() {
declare desc="re-runs railpack commands as sudo"
local RAILPACK_BIN=""
if [[ -x "/usr/bin/railpack" ]]; then
RAILPACK_BIN="/usr/bin/railpack"
fi
if [[ -z "$RAILPACK_BIN" ]]; then
echo "! No railpack binary found" 1>&2
exit 1
fi
sudo -E "$RAILPACK_BIN" "$@"
}
main "$@"

159
docs/README.md Normal file
View File

@@ -0,0 +1,159 @@
# Dokku Documentation
This documentation covers the installation, configuration, and usage of Dokku - a Docker-powered PaaS that provides a Heroku-like experience.
## Getting Started
- [Installation](getting-started/installation/index.md) - Install Dokku on your server
- [Debian](getting-started/install/debian.md)
- [Docker](getting-started/install/docker.md)
- [DigitalOcean](getting-started/install/digitalocean.md)
- [Azure](getting-started/install/azure.md)
- [DreamHost](getting-started/install/dreamhost.md)
- [Vagrant](getting-started/install/vagrant.md)
- [Advanced Installation](getting-started/advanced-installation.md) - Custom installation options
- [Upgrading](getting-started/upgrading/index.md) - Upgrade to newer Dokku versions
- [Uninstalling](getting-started/uninstalling.md) - Remove Dokku from your server
- [Troubleshooting](getting-started/troubleshooting.md) - Common issues and solutions
- [Where to Get Help](getting-started/where-to-get-help.md) - Support resources
## Deployment
- [Application Deployment](deployment/application-deployment.md) - Deploy your first app
- [Application Management](deployment/application-management.md) - Manage deployed applications
- [Logs](deployment/logs.md) - View application logs
- [Remote Commands](deployment/remote-commands.md) - Run commands remotely
- [User Management](deployment/user-management.md) - Manage SSH access
- [Zero Downtime Deploys](deployment/zero-downtime-deploys.md) - Deploy without interruption
### Deployment Methods
- [Git](deployment/methods/git.md) - Deploy via git push
- [Archive](deployment/methods/archive.md) - Deploy from tar/zip archives
- [Image](deployment/methods/image.md) - Deploy from Docker images
### Builders
- [Builder Management](deployment/builders/builder-management.md) - Configure build systems
- [Buildpack Management](deployment/builders/buildpack-management.md) - Manage buildpack settings
- [Herokuish Buildpacks](deployment/builders/herokuish-buildpacks.md) - Heroku-compatible buildpacks
- [Cloud Native Buildpacks](deployment/builders/cloud-native-buildpacks.md) - CNB support
- [Dockerfiles](deployment/builders/dockerfiles.md) - Build from Dockerfile
- [Nixpacks](deployment/builders/nixpacks.md) - Nixpacks builder
- [Railpack](deployment/builders/railpack.md) - Railpack builder
- [Lambda](deployment/builders/lambda.md) - Lambda-style functions
- [Null Builder](deployment/builders/null.md) - Skip the build phase
### Schedulers
- [Scheduler Management](deployment/schedulers/scheduler-management.md) - Configure schedulers
- [Docker Local](deployment/schedulers/docker-local.md) - Default Docker scheduler
- [K3s](deployment/schedulers/k3s.md) - Lightweight Kubernetes
- [Kubernetes](deployment/schedulers/kubernetes.md) - External Kubernetes clusters
- [Nomad](deployment/schedulers/nomad.md) - HashiCorp Nomad
- [Null Scheduler](deployment/schedulers/null.md) - Skip scheduling
### Continuous Integration
- [Generic CI](deployment/continuous-integration/generic.md) - General CI/CD setup
- [GitHub Actions](deployment/continuous-integration/github-actions.md)
- [GitLab CI](deployment/continuous-integration/gitlab-ci.md)
- [Woodpecker CI](deployment/continuous-integration/woodpecker-ci.md)
## Configuration
- [Environment Variables](configuration/environment-variables.md) - Configure app environment
- [Domains](configuration/domains.md) - Custom domain management
- [SSL/TLS](configuration/ssl.md) - HTTPS and certificates
## Networking
- [Proxy Management](networking/proxy-management.md) - Reverse proxy configuration
- [Port Management](networking/port-management.md) - Port mapping and exposure
- [DNS](networking/dns.md) - DNS configuration
- [Network](networking/network.md) - Docker network management
### Proxies
- [Nginx](networking/proxies/nginx.md) - Default proxy
- [Caddy](networking/proxies/caddy.md)
- [HAProxy](networking/proxies/haproxy.md)
- [Traefik](networking/proxies/traefik.md)
- [OpenResty](networking/proxies/openresty.md)
## Processes
- [Process Management](processes/process-management.md) - Scale and manage processes
- [Scheduled Cron Tasks](processes/scheduled-cron-tasks.md) - Scheduled jobs
- [One-off Tasks](processes/one-off-tasks.md) - Run one-time commands
- [Entering Containers](processes/entering-containers.md) - Access running containers
## Advanced Usage
- [Persistent Storage](advanced-usage/persistent-storage.md) - Mount volumes
- [Docker Options](advanced-usage/docker-options.md) - Custom Docker run arguments
- [Resource Management](advanced-usage/resource-management.md) - CPU and memory limits
- [Plugin Management](advanced-usage/plugin-management.md) - Install and manage plugins
- [Registry Management](advanced-usage/registry-management.md) - Docker registry integration
- [Repository Management](advanced-usage/repository-management.md) - Git repository settings
- [Deployment Tasks](advanced-usage/deployment-tasks.md) - Pre/post deploy hooks
- [Event Logs](advanced-usage/event-logs.md) - Dokku event history
- [Backup and Recovery](advanced-usage/backup-recovery.md) - Data backup strategies
## Development
- [Architecture](development/architecture.md) - Internal architecture overview for contributors
- [Plugin Creation](development/plugin-creation.md) - Build custom plugins
- [Plugin Triggers](development/plugin-triggers.md) - Available plugin hooks
- [Testing](development/testing.md) - Test Dokku and plugins
- [Release Process](development/release-process.md) - How Dokku releases work
## Community
- [Plugins](community/plugins.md) - Community-maintained plugins
- [Clients](community/clients.md) - API clients and tools
## Enterprise
- [Dokku Pro](enterprise/pro.md) - Commercial features and support
## Appendices
### Migration Guides
- [0.37.0](appendices/0.37.0-migration-guide.md)
- [0.36.0](appendices/0.36.0-migration-guide.md)
- [0.35.0](appendices/0.35.0-migration-guide.md)
- [0.34.0](appendices/0.34.0-migration-guide.md)
- [0.33.0](appendices/0.33.0-migration-guide.md)
- [0.32.0](appendices/0.32.0-migration-guide.md)
- [0.31.0](appendices/0.31.0-migration-guide.md)
- [0.30.0](appendices/0.30.0-migration-guide.md)
- [0.29.0](appendices/0.29.0-migration-guide.md)
- [0.28.0](appendices/0.28.0-migration-guide.md)
- [0.27.0](appendices/0.27.0-migration-guide.md)
- [0.26.0](appendices/0.26.0-migration-guide.md)
- [0.25.0](appendices/0.25.0-migration-guide.md)
- [0.24.0](appendices/0.24.0-migration-guide.md)
- [0.23.0](appendices/0.23.0-migration-guide.md)
- [0.22.0](appendices/0.22.0-migration-guide.md)
- [0.21.0](appendices/0.21.0-migration-guide.md)
- [0.20.0](appendices/0.20.0-migration-guide.md)
- [0.10.0](appendices/0.10.0-migration-guide.md)
- [0.9.0](appendices/0.9.0-migration-guide.md)
- [0.8.0](appendices/0.8.0-migration-guide.md)
- [0.7.0](appendices/0.7.0-migration-guide.md)
- [0.6.0](appendices/0.6.0-migration-guide.md)
- [0.5.0](appendices/0.5.0-migration-guide.md)
### File Formats
- [app.json](appendices/file-formats/app-json.md) - Application configuration
- [Procfile](appendices/file-formats/procfile.md) - Process definitions
- [Dockerfile](appendices/file-formats/dockerfile.md) - Docker build instructions
- [.buildpacks](appendices/file-formats/buildpacks-file.md) - Buildpack configuration
- [project.toml](appendices/file-formats/project-toml.md) - CNB configuration
- [nixpacks.toml](appendices/file-formats/nixpacks-toml.md) - Nixpacks configuration
- [railpack.json](appendices/file-formats/railpack-json.md) - Railpack configuration
- [lambda.yml](appendices/file-formats/lambda-yml.md) - Lambda configuration
- [nginx.conf.sigil](appendices/file-formats/nginx-conf-sigil.md) - Nginx template customization

View File

@@ -1,4 +1,4 @@
FROM python:3.14.0-alpine
FROM python:3.14.3-alpine
WORKDIR /usr/src/app

View File

@@ -1,23 +1,23 @@
beautifulsoup4==4.14.2
click==8.3.0
beautifulsoup4==4.14.3
click==8.3.1
ghp-import==2.1.0
importlib-metadata==8.7.0
importlib-metadata==8.7.1
Jinja2==3.1.6
Markdown>=3.2.1,<3.10
Markdown>=3.2.1,<3.11
MarkupSafe==3.0.3
mergedeep==1.3.4
mkdocs==1.6.1
mkdocs-exclude==1.0.2
mkdocs-material==9.6.21
mkdocs-material==9.7.3
mkdocs-material-extensions==1.3.1
packaging==25.0
packaging==26.0
Pygments==2.19.2
pymdown-extensions==10.16.1
pyparsing==3.2.5
pymdown-extensions==10.21
pyparsing==3.3.2
python-dateutil==2.9.0.post0
PyYAML==6.0.3
pyyaml_env_tag==1.1
six==1.17.0
soupsieve==2.8
soupsieve==2.8.3
watchdog==6.0.0
zipp==3.23.0

View File

@@ -69,7 +69,7 @@ dokku docker-options:add node-js-app deploy "--shm-size 256m"
To remove docker options from an app, use the `docker-options:remove` command. This takes an app name, a comma-separated list of phases, and the docker-option to remove.
```shell
dokku docker-options:remove node-js-app run ""--ulimit nofile=12"
dokku docker-options:remove node-js-app run "--ulimit nofile=12"
```
Multiple phases can be specified by using a comma when specifying phases:

View File

@@ -6,7 +6,7 @@
```
plugin:disable <name> # Disable an installed plugin (third-party only)
plugin:enable <name> # Enable a previously disabled plugin
plugin:install [--core|git-url] [--committish branch|commit|tag] [--name custom-plugin-name] # Optionally download git-url (and pin to the specified branch/commit/tag) & run install trigger for active plugins (or only core ones)
plugin:install [--core|git-url] [--committish branch|commit|tag] [--name custom-plugin-name] [--skip-install-trigger] # Optionally download git-url (and pin to the specified branch/commit/tag) & run install trigger for active plugins (or only core ones)
plugin:installed <name> # Checks if a plugin is installed
plugin:install-dependencies [--core] # Run install-dependencies trigger for active plugins (or only core ones)
plugin:list # Print active plugins
@@ -36,35 +36,35 @@ dokku plugin:list
```
plugn: dev
00_dokku-standard 0.36.8 enabled dokku core standard plugin
20_events 0.36.8 enabled dokku core events logging plugin
app-json 0.36.8 enabled dokku core app-json plugin
apps 0.36.8 enabled dokku core apps plugin
build-env 0.36.8 enabled dokku core build-env plugin
buildpacks 0.36.8 enabled dokku core buildpacks plugin
certs 0.36.8 enabled dokku core certificate management plugin
checks 0.36.8 enabled dokku core checks plugin
common 0.36.8 enabled dokku core common plugin
config 0.36.8 enabled dokku core config plugin
docker-options 0.36.8 enabled dokku core docker-options plugin
domains 0.36.8 enabled dokku core domains plugin
enter 0.36.8 enabled dokku core enter plugin
git 0.36.8 enabled dokku core git plugin
logs 0.36.8 enabled dokku core logs plugin
network 0.36.8 enabled dokku core network plugin
nginx-vhosts 0.36.8 enabled dokku core nginx-vhosts plugin
plugin 0.36.8 enabled dokku core plugin plugin
proxy 0.36.8 enabled dokku core proxy plugin
ps 0.36.8 enabled dokku core ps plugin
repo 0.36.8 enabled dokku core repo plugin
resource 0.36.8 enabled dokku core resource plugin
scheduler-docker-local 0.36.8 enabled dokku core scheduler-docker-local plugin
shell 0.36.8 enabled dokku core shell plugin
ssh-keys 0.36.8 enabled dokku core ssh-keys plugin
storage 0.36.8 enabled dokku core storage plugin
tags 0.36.8 enabled dokku core tags plugin
tar 0.36.8 enabled dokku core tar plugin
trace 0.36.8 enabled dokku core trace plugin
00_dokku-standard 0.37.6 enabled dokku core standard plugin
20_events 0.37.6 enabled dokku core events logging plugin
app-json 0.37.6 enabled dokku core app-json plugin
apps 0.37.6 enabled dokku core apps plugin
build-env 0.37.6 enabled dokku core build-env plugin
buildpacks 0.37.6 enabled dokku core buildpacks plugin
certs 0.37.6 enabled dokku core certificate management plugin
checks 0.37.6 enabled dokku core checks plugin
common 0.37.6 enabled dokku core common plugin
config 0.37.6 enabled dokku core config plugin
docker-options 0.37.6 enabled dokku core docker-options plugin
domains 0.37.6 enabled dokku core domains plugin
enter 0.37.6 enabled dokku core enter plugin
git 0.37.6 enabled dokku core git plugin
logs 0.37.6 enabled dokku core logs plugin
network 0.37.6 enabled dokku core network plugin
nginx-vhosts 0.37.6 enabled dokku core nginx-vhosts plugin
plugin 0.37.6 enabled dokku core plugin plugin
proxy 0.37.6 enabled dokku core proxy plugin
ps 0.37.6 enabled dokku core ps plugin
repo 0.37.6 enabled dokku core repo plugin
resource 0.37.6 enabled dokku core resource plugin
scheduler-docker-local 0.37.6 enabled dokku core scheduler-docker-local plugin
shell 0.37.6 enabled dokku core shell plugin
ssh-keys 0.37.6 enabled dokku core ssh-keys plugin
storage 0.37.6 enabled dokku core storage plugin
tags 0.37.6 enabled dokku core tags plugin
tar 0.37.6 enabled dokku core tar plugin
trace 0.37.6 enabled dokku core trace plugin
```
> [!WARNING]
@@ -128,6 +128,12 @@ The `--core` flag may also be indicated as the sole argument, though it is only
dokku plugin:install --core
```
If installing plugins in a Dockerfile, you will want to skip the `install` trigger. This will be run on container boot.
```shell
dokku plugin:install https://github.com/dokku/smoke-test-plugin.git --name smoke-test-plugin --skip-install-trigger
```
Finally, all flags may be omitted to trigger the `install` procedures for both core and third-party plugins:
```shell

View File

@@ -4,9 +4,10 @@
> New as of 0.25.0
```
registry:login [--password-stdin] <server> <username> [<password>] # Login to a docker registry
registry:report [<app>] [<flag>] # Displays a registry report for one or more apps
registry:set <app> <key> (<value>) # Set or clear a registry property for an app
registry:login [--global|--password-stdin] [<app>] <server> <username> [<password>] # Login to a docker registry
registry:logout [--global] [<app>] <server> # Logout from a docker registry
registry:report [<app>] [<flag>] # Displays a registry report for one or more apps
registry:set <app>|--global <key> (<value>) # Set or clear a registry property for an app
```
The registry plugin enables interacting with remote registries, which is useful when either deploying images via `git:from-image` or when interacting with custom schedulers to deploy built image artifacts.
@@ -15,34 +16,75 @@ The registry plugin enables interacting with remote registries, which is useful
### Logging into a registry
The `registry:login` command can be used to log into a docker registry. The following are examples for logging into various common registries:
The `registry:login` command can be used to log into a docker registry. Credentials can be stored globally (for all apps) or on a per-app basis.
#### Global login
To log in globally (credentials shared by all apps), use the `--global` flag:
```shell
# hub.docker.com
dokku registry:login docker.io $USERNAME $PASSWORD
dokku registry:login --global docker.io $USERNAME $PASSWORD
# digitalocean
# the username and password are both defined as the same api token
dokku registry:login registry.digitalocean.com $DIGITALOCEAN_API_TOKEN $DIGITALOCEAN_API_TOKEN
dokku registry:login --global registry.digitalocean.com $DIGITALOCEAN_API_TOKEN $DIGITALOCEAN_API_TOKEN
# github container registry
# see the following link for information on retrieving a personal access token
# https://docs.github.com/en/packages/guides/pushing-and-pulling-docker-images#authenticating-to-github-container-registry
dokku registry:login ghcr.io $USERNAME $REGISTRY_PAT_TOKEN
dokku registry:login --global ghcr.io $USERNAME $REGISTRY_PAT_TOKEN
# quay
# a robot user may be used to login
dokku registry:login quay.io $USERNAME $PASSWORD
dokku registry:login --global quay.io $USERNAME $PASSWORD
```
For security reasons, the password may also be specified as stdin by specifying the `--password-stdin` flag. This is supported regardless of the registry being logged into.
> [!NOTE]
> For backwards compatibility, if the `--global` flag is omitted and only three arguments are provided (server, username, password), the command will behave as a global login but will show a deprecation warning.
#### Per-app login
To log in for a specific app, specify the app name as the first argument:
```shell
echo "$PASSWORD" | dokku registry:login --password-stdin docker.io $USERNAME
# log into docker.io for a specific app
dokku registry:login node-js-app docker.io $USERNAME $PASSWORD
# log into ghcr.io for a specific app
dokku registry:login node-js-app ghcr.io $USERNAME $REGISTRY_PAT_TOKEN
```
Per-app credentials are stored in `/var/lib/dokku/config/registry/$APP/config.json` and are automatically used for docker operations (build, push, pull) for that specific app.
#### Password via stdin
For security reasons, the password may also be specified as stdin by specifying the `--password-stdin` flag. This is supported for both global and per-app logins:
```shell
# global login via stdin
echo "$PASSWORD" | dokku registry:login --global --password-stdin docker.io $USERNAME
# per-app login via stdin
echo "$PASSWORD" | dokku registry:login node-js-app --password-stdin docker.io $USERNAME
```
For certain Docker registries - such as Amazon ECR or Google's GCR registries - users may instead wish to use a docker credential helper to automatically authenticate against a server; please see the documentation regarding the credential helper in question for further setup instructions.
### Logging out from a registry
The `registry:logout` command can be used to log out from a docker registry:
```shell
# global logout
dokku registry:logout --global docker.io
# per-app logout
dokku registry:logout node-js-app docker.io
```
When an app is destroyed, any per-app registry credentials are automatically removed.
### Setting a remote server
To specify a remote server registry for pushes, set the `server` property via the `registry:set` command. The default value for this property is empty string. Setting the value to `docker.io` or `hub.docker.com` will result in the computed value being empty string (as that is the default, implicit registry), while any non-zero length value will have a `/` appended to it if there is not one already.

View File

@@ -4,5 +4,5 @@
- The `plugin:list` command no longer outputs the version for the `plugn` binary.
- Users building docker images that run Dokku will need to use a new sudoer wrapper for the `docker-image-labeler` binary to work correctly. A reference version has been placed in the `docker` skeleton directory. This should only impact platform developers, and users of our Docker image will already have the file available.
- The `dokku` user's cron is now in use by Dokku itself. Customizations will be overwritten. Users are encouraged to use a cron entry in `/etc/cron.d/dokku` to avoid this issue.
- The `dokku` user's cron is now in use by Dokku itself. Customizations will be overwritten. Users are encouraged to use a cron file at `/etc/cron.d/dokku` to avoid this issue.
- As of 0.23.0, Dokku will now inject the `max-size` log driver option for applications. This is restricted to app-configured log driver values empty, `local` or `json-file` in 0.23.1 to increase setup compatibility. Users who configure alternative log drivers at the system level will need to either set the global `max-size` property to `unlimited` or switch to the built-in `vector` logging support.

View File

@@ -0,0 +1,15 @@
# 0.37.0 Migration Guide
## Changes
- The `app.json` file format is now parsed as JSONC and supports inline comments.
- The `scheduler-k3s:cluster-add` command is now `scheduler-k3s:cluster:add`.
- The `scheduler-k3s:cluster-list` command is now `scheduler-k3s:cluster:list`.
- The `scheduler-k3s:cluster-remove` command is now `scheduler-k3s:cluster:remove`.
## Removals
- Support for the `DOKKU_DOCKERFILE_CACHE_BUILD` environment variable has been removed. Use the `docker-options` plugin to set build arguments for your app instead.
- Support for the `DOKKU_DOCKER_BUILD_OPTS` environment variable has been removed. Use the `docker-options` plugin to set build arguments for your app instead.
- Support for the `no-cache` nixpacks property has been removed. Use the `docker-options` plugin to set build arguments for your app instead.
- Support for customizing the label-key for the caddy proxy has been removed. Always use `caddy.` as a prefix for your caddy directives.

View File

@@ -21,7 +21,9 @@
(list, optional) A list of cron resources. Keys are the names of the process types. The values are an object containing one or more of the following properties:
- `command`: (string, required)
- `maintenance`: (boolean, optional)
- `schedule`: (string, required)
- `concurrency_policy`: (string, optional, default: `allow`, options: `allow`, `forbid`, `replace`)
## Formation
@@ -41,6 +43,7 @@
- `autoscaling` (map of string to object, optional) autoscaling rules. See the autoscaling section for more details
- `max_parallel`: (int, optional) number of instances to deploy in parallel at a given time
- `quantity`: (int, optional) number of processes to maintain. Default 1 for web processes, 0 for all others.
- `service`: (map of string to oject, optional) governs how non-web processes are exposed as services on the network
### Autoscaling
@@ -80,6 +83,24 @@ An autoscaling trigger consists of the following properties:
- `type`: (string, optional)
- `metadata`: (object, optional)
### Service
```json
{
"formation": {
"internal-web": {
"service": {
"exposed": true
}
}
}
}
```
(object, optional) A key-value object specifying how to expose non-web processes as services.
- `service`: (boolean, optional) Whether to expose a process as a network service. The `PORT` variable will be set to 5000.
## Healthchecks
```json

View File

@@ -0,0 +1,3 @@
# railpack.json
The `railpack.json` file is used to configure an application when built with the `railpack` builder. Please refer to the [railpack.json documentation](https://railpack.com/config/file) for more information.

View File

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

View File

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

View File

@@ -25,9 +25,9 @@
/* Avatar section darkmode fade */
--avatar-before-gradient: rgba(0, 0, 0, 0) linear-gradient(90deg, white 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
--avatar-darkmode-before-gradient: rgba(0, 0, 0, 0) linear-gradient(90deg, #043791 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
--avatar-darkmode-before-gradient: rgba(0, 0, 0, 0) linear-gradient(90deg, #0.37.6 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
--avatar-after-gradient: rgba(0, 0, 0, 0) linear-gradient(270deg, white 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
--avatar-darkmode-after-gradient: rgba(0, 0, 0, 0) linear-gradient(270deg, #043791 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
--avatar-darkmode-after-gradient: rgba(0, 0, 0, 0) linear-gradient(270deg, #0.37.6 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
}
body {
@@ -1191,15 +1191,15 @@ ul.fas li .fa-large:before {
.getting-started::after {
background: linear-gradient(0deg, rgba(52, 52, 87, 0.2) -40.97%, rgba(0, 0, 0, 0) 103.19%),
#043791;
#0.37.6;
}
.tab-content {
background: #043791;
background: #0.37.6;
}
.nav-tabs {
background: #043791;
background: #0.37.6;
}
.powered-by_brands {

View File

@@ -33,6 +33,7 @@
"0.33.9",
"0.34.9",
"0.35.20",
"0.36.8"
"0.36.11",
"0.37.6"
]
}

View File

@@ -113,6 +113,7 @@ The following plugins are available and provided by Dokku maintainers. Please f
| [APT](https://github.com/dokku-community/dokku-apt) | [dokku-community][] | 0.18.x+ |
| [Auto Sync](https://github.com/IdeaSynthesis/dokku-autosync)<sup>1</sup> | [fomojola][] | 0.8.1+ |
| [Deploy Webhook](https://github.com/IdeaSynthesis/dokku-deploy-webhook)<sup>2</sup> | [fomojola][] | 0.8.1+ |
| [DNS](https://github.com/deanmarano/dokku-dns) | [deanmarano][] | 0.31.0+ |
| [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [flink][] | 0.4.0+ |
| [Docker Direct](https://github.com/dokku-community/dokku-docker-direct) | [josegonzalez][] | 0.4.0+ |
| [Dokku Clone](https://github.com/crisward/dokku-clone) | [crisward][] | 0.4.0+ |
@@ -270,6 +271,7 @@ The following plugins are no longer maintained by their developers.
[crisward]: https://github.com/crisward
[cu12]: https://github.com/cu12
[darkpixel]: https://github.com/darkpixel
[deanmarano]: https://github.com/deanmarano
[dokku]: https://github.com/dokku
[dokku-community]: https://github.com/dokku-community
[dyson]: https://github.com/dyson

View File

@@ -110,7 +110,6 @@ The following config variables have special meanings and can be set in a variety
| `DOKKU_DEFAULT_CHECKS_WAIT` | `10` | `dokku config:set` | If no user-defined checks are specified - or if the process being checked is not a `web` process - this is the period of time Dokku will wait before checking that a container is still running. |
| `DOKKU_DISABLE_PROXY` | none | `dokku proxy:disable` <br /> `dokku proxy:enable` | Disables the proxy in front of your application, resulting in publicly routing the docker container. |
| `DOKKU_DISABLE_APP_AUTOCREATION` | none | `dokku config:set` | Disables automatic creation of a non-existent app on deploy. |
| `DOKKU_DOCKERFILE_CACHE_BUILD` | none | `dokku config:set` | |
| `DOKKU_DOCKERFILE_START_CMD` | none | `dokku config:set` | |
| `DOKKU_PARALLEL_ARGUMENTS`. | none | `dokku config:set` | Allows passing custom arguments to parallel for `ps:*all` commands |
| `DOKKU_PROXY_PORT` | automatically assigned | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` <br /> `dokku config:set` | |

View File

@@ -0,0 +1,174 @@
# Buildpacks Management
> [!NOTE]
> Buildpacks commands apply to both herokuish and CNB-based builds
```
buildpacks:add [--index 1] <app> <buildpack> # Add new app buildpack while inserting into list of buildpacks if necessary
buildpacks:clear <app> # Clear all buildpacks set on the app
buildpacks:list <app> # List all buildpacks for an app
buildpacks:remove <app> <buildpack> # Remove a buildpack set on the app
buildpacks:report [<app>] [<flag>] # Displays a buildpack report for one or more apps
buildpacks:set [--index 1] <app> <buildpack> # Set new app buildpack at a given position defaulting to the first buildpack if no index is specified
```
## Usage
### Listing Buildpacks in Use
The `buildpacks:list` command can be used to show buildpacks that have been set for an app. This will omit any auto-detected buildpacks.
```shell
# running for an app with no buildpacks specified
dokku buildpacks:list node-js-app
```
```
-----> test buildpack urls
```
```shell
# running for an app with two buildpacks specified
dokku buildpacks:list node-js-app
```
```
-----> test buildpack urls
https://github.com/heroku/heroku-buildpack-python.git
https://github.com/heroku/heroku-buildpack-nodejs.git
```
### Adding custom buildpacks
> Please check the documentation for your particular buildpack as you may need to include configuration files (such as a Procfile) in your project root.
To add a custom buildpack, use the `buildpacks:add` command:
```shell
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-nodejs.git
```
When no buildpacks are currently specified, the specified buildpack will be the only one executed for detection and compilation.
Multiple buildpacks may be specified by using the `buildpacks:add` command multiple times.
```shell
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-nodejs.git
```
Buildpacks are executed in order, may be inserted at a specified index via the `--index` flag. This flag is specified starting at a 1-index value.
```shell
# will add the golang buildpack at the second position, bumping all proceeding ones by 1 position
dokku buildpacks:add --index 2 node-js-app https://github.com/heroku/heroku-buildpack-golang.git
```
### Overwriting a buildpack position
In some cases, it may be necessary to swap out a given buildpack. Rather than needing to re-specify each buildpack, the `buildpacks:set` command can be used to overwrite a buildpack at a given position.
```shell
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
```
By default, this will overwrite the _first_ buildpack specified. To specify an index, the `--index` flag may be used. This flag is specified starting at a 1-index value, and defaults to `1`.
```shell
# the following are equivalent commands
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
dokku buildpacks:set --index 1 node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
```
If the index specified is larger than the number of buildpacks currently configured, the buildpack will be appended to the end of the list.
```shell
dokku buildpacks:set --index 99 node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
```
### Removing a buildpack
> At least one of a buildpack or index must be specified
A single buildpack can be removed by name via the `buildpacks:remove` command.
```shell
dokku buildpacks:remove node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
```
Buildpacks can also be removed by index via the `--index` flag. This flag is specified starting at a 1-index value.
```shell
dokku buildpacks:remove node-js-app --index 1
```
### Clearing all buildpacks
> This does not affect automatically detected buildpacks, nor does it impact any specified `BUILDPACK_URL` environment variable.
The `buildpacks:clear` command can be used to clear all configured buildpacks for a specified app.
```shell
dokku buildpacks:clear node-js-app
```
### Using a specific buildpack version
> Always remember to pin your buildpack versions when using the multi-buildpacks method, or you may find deploys changing your deployed environment.
By default, builders will pin their vendored buildpacks, resulting in a consistent build result for your application. There may be occasions where the pinned version results in a broken deploy, or does not have a particular feature that is required to build your project. To use a more recent version of a given buildpack, the buildpack may be specified _without_ a Git commit SHA like so:
```shell
# using the latest nodejs buildpack
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs
```
This will use the latest commit on the `master` branch of the specified buildpack. To pin to a newer version of a buildpack, a sha may also be specified by using the form `REPOSITORY_URL#COMMIT_SHA`, where `COMMIT_SHA` is any tree-ish git object - usually a git tag.
```shell
# using v87 of the nodejs buildpack
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs#v87
```
### Displaying buildpack reports for an app
You can get a report about the app's buildpacks status using the `buildpacks:report` command:
```shell
dokku buildpacks:report
```
```
=====> node-js-app buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:v0.7.0-22
Buildpacks global stack: gliderlabs/herokuish:latest-24
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
Buildpacks stack: gliderlabs/herokuish:v0.7.0-20
=====> python-sample buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:latest-24
Buildpacks global stack: gliderlabs/herokuish:latest-24
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git,https://github.com/heroku/heroku-buildpack-python.git
Buildpacks stack:
=====> ruby-sample buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:latest-24
Buildpacks global stack: gliderlabs/herokuish:latest-24
Buildpacks list:
Buildpacks stack:
```
You can run the command for a specific app also.
```shell
dokku buildpacks:report node-js-app
```
```
=====> node-js-app buildpacks information
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku buildpacks:report node-js-app --buildpacks-list
```

View File

@@ -14,8 +14,8 @@ buildpacks:set-property [--global|<app>] <key> <value> # Set or clear a buildpa
Cloud Native Buildpacks are an evolution over the Buildpacks technology provided by the Herokuish builder. See the [herokuish buildpacks documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how to clear buildpack build cache for an application.
> [!WARNING]
> This functionality uses the `pack` cli from the [Cloud Native Buildpacks](https://buildpacks.io) project to build apps. As the integration is experimental in Dokku, it is likely to change over time.
> [!NOTE]
> This functionality uses the `pack` cli from the [Cloud Native Buildpacks](https://buildpacks.io) project to build apps.
## Usage
@@ -27,7 +27,7 @@ Builds will proceed with the `pack` cli for the app from then on.
### Caveats
As this functionality is highly experimental, there are a number of caveats. Please note that not all issues are listed below.
While pack is well-supported in Dokku, there are a number of caveats. Please note that not all issues are listed below.
- Specifying specific buildpacks is not currently possible.
- A future release will add support for specifying buildpacks via the `buildpacks` plugin.
@@ -41,16 +41,7 @@ As this functionality is highly experimental, there are a number of caveats. Ple
### Detection
This builder will be auto-detected in either the following cases:
- The `DOKKU_CNB_EXPERIMENTAL` app environment variable is set to `1`.
```shell
dokku config:set --no-restart node-js-app DOKKU_CNB_EXPERIMENTAL=1
```
- A `project.toml` file exists in the root of the app repository.
- This file is consumed by `pack-cli` and used to describe how the app is built.
This builder will be auto-detected if a `project.toml` file exists in the root of the app repository. This file is consumed by `pack-cli` and used to describe how the app is built.
The builder can also be specified via the `builder:set` command:

View File

@@ -199,8 +199,6 @@ dokku config:set node-js-app DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
To tell Docker what to run.
Setting `$DOKKU_DOCKERFILE_CACHE_BUILD` to `true` or `false` will enable or disable Docker's image layer cache. Lastly, for more granular build control, you may also pass any `docker build` option to `docker`, by setting `$DOKKU_DOCKER_BUILD_OPTS`.
### Procfiles and multiple processes
> [!IMPORTANT]

View File

@@ -4,12 +4,6 @@
> Subcommands new as of 0.15.0
```
buildpacks:add [--index 1] <app> <buildpack> # Add new app buildpack while inserting into list of buildpacks if necessary
buildpacks:clear <app> # Clear all buildpacks set on the app
buildpacks:list <app> # List all buildpacks for an app
buildpacks:remove <app> <buildpack> # Remove a buildpack set on the app
buildpacks:report [<app>] [<flag>] # Displays a buildpack report for one or more apps
buildpacks:set [--index 1] <app> <buildpack> # Set new app buildpack at a given position defaulting to the first buildpack if no index is specified
buildpacks:set-property [--global|<app>] <key> <value> # Set or clear a buildpacks property for an app
```
@@ -49,104 +43,6 @@ dokku builder:set node-js-app selected herokuish
> Dokku will only select the `dockerfile` builder if both the `herokuish` and `pack` builders are not detected and a Dockerfile exists. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how that builder functions.
### Listing Buildpacks in Use
The `buildpacks:list` command can be used to show buildpacks that have been set for an app. This will omit any auto-detected buildpacks.
```shell
# running for an app with no buildpacks specified
dokku buildpacks:list node-js-app
```
```
-----> test buildpack urls
```
```shell
# running for an app with two buildpacks specified
dokku buildpacks:list node-js-app
```
```
-----> test buildpack urls
https://github.com/heroku/heroku-buildpack-python.git
https://github.com/heroku/heroku-buildpack-nodejs.git
```
### Adding custom buildpacks
> Please check the documentation for your particular buildpack as you may need to include configuration files (such as a Procfile) in your project root.
To add a custom buildpack, use the `buildpacks:add` command:
```shell
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-nodejs.git
```
When no buildpacks are currently specified, the specified buildpack will be the only one executed for detection and compilation.
Multiple buildpacks may be specified by using the `buildpacks:add` command multiple times.
```shell
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-nodejs.git
```
Buildpacks are executed in order, may be inserted at a specified index via the `--index` flag. This flag is specified starting at a 1-index value.
```shell
# will add the golang buildpack at the second position, bumping all proceeding ones by 1 position
dokku buildpacks:add --index 2 node-js-app https://github.com/heroku/heroku-buildpack-golang.git
```
### Overwriting a buildpack position
In some cases, it may be necessary to swap out a given buildpack. Rather than needing to re-specify each buildpack, the `buildpacks:set` command can be used to overwrite a buildpack at a given position.
```shell
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
```
By default, this will overwrite the _first_ buildpack specified. To specify an index, the `--index` flag may be used. This flag is specified starting at a 1-index value, and defaults to `1`.
```shell
# the following are equivalent commands
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
dokku buildpacks:set --index 1 node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
```
If the index specified is larger than the number of buildpacks currently configured, the buildpack will be appended to the end of the list.
```shell
dokku buildpacks:set --index 99 node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
```
### Removing a buildpack
> At least one of a buildpack or index must be specified
A single buildpack can be removed by name via the `buildpacks:remove` command.
```shell
dokku buildpacks:remove node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
```
Buildpacks can also be removed by index via the `--index` flag. This flag is specified starting at a 1-index value.
```shell
dokku buildpacks:remove node-js-app --index 1
```
### Clearing all buildpacks
> This does not affect automatically detected buildpacks, nor does it impact any specified `BUILDPACK_URL` environment variable.
The `buildpacks:clear` command can be used to clear all configured buildpacks for a specified app.
```shell
dokku buildpacks:clear node-js-app
```
### Customizing the Buildpack stack builder
> [!IMPORTANT]
@@ -207,49 +103,6 @@ The default value may be set by passing an empty value for the option.
dokku builder-herokuish:set --global allowed
```
### Displaying buildpack reports for an app
You can get a report about the app's buildpacks status using the `buildpacks:report` command:
```shell
dokku buildpacks:report
```
```
=====> node-js-app buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:v0.7.0-22
Buildpacks global stack: gliderlabs/herokuish:latest-24
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
Buildpacks stack: gliderlabs/herokuish:v0.7.0-20
=====> python-sample buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:latest-24
Buildpacks global stack: gliderlabs/herokuish:latest-24
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git,https://github.com/heroku/heroku-buildpack-python.git
Buildpacks stack:
=====> ruby-sample buildpacks information
Buildpacks computed stack: gliderlabs/herokuish:latest-24
Buildpacks global stack: gliderlabs/herokuish:latest-24
Buildpacks list:
Buildpacks stack:
```
You can run the command for a specific app also.
```shell
dokku buildpacks:report node-js-app
```
```
=====> node-js-app buildpacks information
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku buildpacks:report node-js-app --buildpacks-list
```
### Displaying builder-herokuish reports for an app
> [!IMPORTANT]
@@ -309,24 +162,6 @@ If an application was previously deployed via Dockerfile, the following commands
dokku ports:clear node-js-app
```
### Using a specific buildpack version
> Always remember to pin your buildpack versions when using the multi-buildpacks method, or you may find deploys changing your deployed environment.
By default, Dokku uses the [gliderlabs/herokuish](https://github.com/gliderlabs/herokuish/) project, which pins all of it's vendored buildpacks. There may be occasions where the pinned version results in a broken deploy, or does not have a particular feature that is required to build your project. To use a more recent version of a given buildpack, the buildpack may be specified _without_ a Git commit SHA like so:
```shell
# using the latest nodejs buildpack
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs
```
This will use the latest commit on the `master` branch of the specified buildpack. To pin to a newer version of a buildpack, a sha may also be specified by using the form `REPOSITORY_URL#COMMIT_SHA`, where `COMMIT_SHA` is any tree-ish git object - usually a git tag.
```shell
# using v87 of the nodejs buildpack
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs#v87
```
### `curl` build timeouts
Certain buildpacks may time out in retrieving dependencies via `curl`. This can happen when your network connection is poor or if there is significant network congestion. You may see a message similar to `gzip: stdin: unexpected end of file` after a `curl` command.
@@ -345,3 +180,32 @@ See the [repository management documentation](/docs/advanced-usage/repository-ma
### Specifying commands via Procfile
See the [Procfile documentation](/docs/processes/process-management.md#procfile) for more information on how to specify different processes for your app.
### Listing Buildpacks in Use
See the [buildpack management documentation](/docs/processes/process-management.md#listing-buildpacks-in-use) for more information on how to list buildpacks in use.
### Adding custom buildpacks
See the [buildpack management documentation](/docs/processes/process-management.md#adding-custom-buildpacks) for more information on how to add custom buildpacks.
### Overwriting a buildpack position
See the [buildpack management documentation](/docs/processes/process-management.md#overwriting-a-buildpack-position) for more information on how to overwrite a buildpack position.
### Removing a buildpack
See the [buildpack management documentation](/docs/processes/process-management.md#removing-a-buildpack) for more information on how to remove a buildpack.
### Clearing all buildpacks
See the [buildpack management documentation](/docs/processes/process-management.md#clearing-all-buildpacks) for more information on how to clear all buildpacks.
### Using a specific buildpack version
See the [buildpack management documentation](/docs/processes/process-management.md#using-a-specific-buildpack-version) for more information on how to using a specific buildpack version
### Displaying buildpack reports for an app
See the [buildpack management documentation](/docs/processes/process-management.md#displaying-buildpack-reports-for-an-app) for more information on how to display buildpack reports for an app.

View File

@@ -80,28 +80,10 @@ dokku builder-nixpacks:set --global nixpackstoml-path
### Disabling cache
Cache is enabled by default, but can be disabled by setting the `no-cache` property to `true`:
Disable cache using the [docker-options] plugin:
```shell
dokku builder-nixpacks:set node-js-app no-cache true
```
The default value may be set by passing an empty value for the option:
```shell
dokku builder-nixpacks:set node-js-app no-cache
```
The `no-cache` property can also be set globally. The global default is `false`, and the global value is used when no app-specific value is set.
```shell
dokku builder-nixpacks:set --global no-cache true
```
The default value may be set by passing an empty value for the option.
```shell
dokku builder-nixpacks:set --global no-cache
dokku docker-options:add node-js-app build "--no-cache"
```
### Displaying builder-nixpacks reports for an app
@@ -117,23 +99,14 @@ dokku builder-nixpacks:report
Builder-nixpacks computed nixpackstoml path: nixpacks2.toml
Builder-nixpacks global nixpackstoml path: nixpacks.toml
Builder-nixpacks nixpackstoml path: nixpacks2.toml
Builder-nixpacks computed no cache: true
Builder-nixpacks global no cache: false
Builder-nixpacks no cache: true
=====> python-sample builder-nixpacks information
Builder-nixpacks computed nixpackstoml path: nixpacks.toml
Builder-nixpacks global nixpackstoml path: nixpacks.toml
Builder-nixpacks nixpackstoml path:
Builder-nixpacks computed no cache: false
Builder-nixpacks global no cache: false
Builder-nixpacks no cache:
=====> ruby-sample builder-nixpacks information
Builder-nixpacks computed nixpackstoml path: nixpacks.toml
Builder-nixpacks global nixpackstoml path: nixpacks.toml
Builder-nixpacks nixpackstoml path:
Builder-nixpacks computed no cache: false
Builder-nixpacks global no cache: false
Builder-nixpacks no cache:
```
You can run the command for a specific app also.
@@ -147,17 +120,14 @@ dokku builder-nixpacks:report node-js-app
Builder-nixpacks computed nixpackstoml path: nixpacks2.toml
Builder-nixpacks global nixpackstoml path: nixpacks.toml
Builder-nixpacks nixpackstoml path: nixpacks2.toml
Builder-nixpacks computed no cache: true
Builder-nixpacks global no cache: false
Builder-nixpacks no cache: true
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku builder-nixpacks:report node-js-app --builder-nixpacks-no-cache
dokku builder-nixpacks:report node-js-app --builder-nixpacks-nixpackstoml-path
```
```
true
nixpacks2.toml
```

View File

@@ -0,0 +1,142 @@
# Railpack
> [!IMPORTANT]
> New as of 0.37.0
The `railpack` builder builds apps via [Railpack](https://railpack.com/), a buildpack alternative.
## Usage
### Requirements
Before using Railpacks, the following steps must be taken:
- Install the `railpack` cli: The `railpack` cli tool is not included by default with Dokku or as a dependency. It must also be installed as shown on [this page](https://railpack.com/installation).
- Create a `buildkit` builder: Railpack uses buildkit.
```shell
docker run --rm --privileged -d --name buildkit moby/buildkit
```
- Set the buildkit builder: Update the `/etc/default/dokku` file to set `BUILDKIT_HOST`:
```shell
touch /etc/default/dokku
echo "export BUILDKIT_HOST='docker-container://buildkit'" >> /etc/default/dokku
````
### Detection
This builder will be auto-detected in the following case:
- A `railpack.json` exists in the root of the app repository.
The builder may also be selected via the `builder:set` command
```shell
dokku builder:set node-js-app selected railpack
```
### Supported languages
See the [upstream railpack documentation](https://railpack.com/) for further information on what languages and frameworks are supported.
### Build-time configuration variables
For security reasons - and as per [Docker recommendations](https://github.com/docker/docker/issues/13490) - railpack-based deploys have variables available only during runtime.
For users that require customization in the `build` phase, you may use build arguments via the [docker-options plugin](/docs/advanced-usage/docker-options.md). All environment variables set by the `config` plugin are automatically exported within the railpack build environment, and thus `--env` only requires setting a key without a value.
```shell
dokku docker-options:add node-js-app build '--env NODE_ENV'
```
Alternatively, a full value may be provided in the form of `--env KEY=VALUE`:
```shell
dokku docker-options:add node-js-app build '--env NODE_ENV=production'
```
### Changing the `railpack.json` location
The `railpack.json` is expected to be found in a specific directory, depending on the deploy approach:
- The `WORKDIR` of the Docker image for deploys resulting from `git:from-image` and `git:load-image` commands.
- The root of the source code tree for all other deploys (git push, `git:from-archive`, `git:sync`).
Sometimes it may be desirable to set a different path for a given app, e.g. when deploying from a monorepo. This can be done via the `railpackjson-path` property:
```shell
dokku builder-railpack:set node-js-app railpackjson-path .dokku/railpack.json
```
The value is the path to the desired file *relative* to the base search directory, and will never be treated as absolute paths in any context. If that file does not exist within the repository, the build will fail.
The default value may be set by passing an empty value for the option:
```shell
dokku builder-railpack:set node-js-app railpackjson-path
```
The `railpackjson-path` property can also be set globally. The global default is `railpack.json`, and the global value is used when no app-specific value is set.
```shell
dokku builder-railpack:set --global railpackjson-path railpack2.json
```
The default value may be set by passing an empty value for the option.
```shell
dokku builder-railpack:set --global railpackjson-path
```
### Disabling cache
Disable cache using the [docker-options] plugin:
```shell
dokku docker-options:add node-js-app build "--no-cache"
```
### Displaying builder-railpack reports for an app
You can get a report about the app's storage status using the `builder-railpack:report` command:
```shell
dokku builder-railpack:report
```
```
=====> node-js-app builder-railpack information
Builder-railpack computed railpackjson path: railpack2.json
Builder-railpack global railpackjson path: railpack.json
Builder-railpack railpackjson path: railpack2.json
=====> python-sample builder-railpack information
Builder-railpack computed railpackjson path: railpack.json
Builder-railpack global railpackjson path: railpack.json
Builder-railpack railpackjson path:
=====> ruby-sample builder-railpack information
Builder-railpack computed railpackjson path: railpack.json
Builder-railpack global railpackjson path: railpack.json
Builder-railpack railpackjson path:
```
You can run the command for a specific app also.
```shell
dokku builder-railpack:report node-js-app
```
```
=====> node-js-app builder-railpack information
Builder-railpack computed railpackjson path: railpack2.json
Builder-railpack global railpackjson path: railpack.json
Builder-railpack railpackjson path: railpack2.json
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku builder-railpack:report node-js-app --builder-railpack-railpackjson-path
```
```
railpack2.json
```

View File

@@ -10,7 +10,7 @@ git:from-archive [--archive-type ARCHIVE_TYPE] <app> <archive-url> [<git-usernam
git:from-image [--build-dir DIRECTORY] <app> <docker-image> [<git-username> <git-email>] # Updates an app's git repository with a given docker image
git:generate-deploy-key # Generates a deploy ssh key
git:load-image [--build-dir DIRECTORY] <app> <docker-image> [<git-username> <git-email>] # Updates an app's git repository with a docker image loaded from stdin
git:sync [--build|build-if-changes] <app> <repository> [<git-ref>] # Clone or fetch an app from remote git repo
git:sync [--build|--build-if-changes] [--skip-deploy-branch] <app> <repository> [<git-ref>] # Clone or fetch an app from remote git repo
git:initialize <app> # Initialize a git repository for an app
git:public-key # Outputs the dokku public deploy key
git:report [<app>] [<flag>] # Displays a git report for one or more apps
@@ -163,6 +163,12 @@ When running `git:sync` without a reference, it may be useful to only build when
dokku git:sync --build-if-changes node-js-app https://github.com/heroku/node-js-getting-started.git
```
By default, when running `git:sync` with a git branch reference, Dokku will automatically set the `deploy-branch` property to the specified branch. To skip setting the deploy branch, specify the `--skip-deploy-branch` flag.
```shell
dokku git:sync --skip-deploy-branch node-js-app https://github.com/heroku/node-js-getting-started.git main
```
### Initializing from private repositories
> [!IMPORTANT]

View File

@@ -17,7 +17,13 @@ In the above example, Dokku will build the app as if the repository contained _o
FROM my-registry/node-js-getting-started:latest
```
If the specified image already exists on the Dokku host, it will not be pulled again, though this behavior may be changed using [build phase docker-options](/docs/advanced-usage/docker-options.md).
If the specified image already exists on the Dokku host, it will not be pulled again. To force a pull even when the image exists locally, use the `--force` flag:
```shell
dokku git:from-image --force node-js-app my-registry/node-js-getting-started:latest
```
This is useful when the remote image has been updated but the tag remains the same.
Triggering a build with the same arguments multiple times will result in Dokku exiting `0` early as there will be no changes detected. If the image tag is reused but the underlying image is different, it is recommended to use the image digest instead of the tag. This can be retrieved via the following command:

View File

@@ -71,7 +71,7 @@ All commands have the application name automatically set via the `--app` flag on
The client supports several environment variables:
- `DOKKU_HOST` (default: `dokku` git remote): Used to interact with a specific remote server. Can be overridden via the `--remote` flag.
- `DOKKU_HOST` (default: `dokku` git remote): Used to interact with a specific remote server. Can be overridden via the `--remote` flag. Must specify the `--app` flag when specified.
- `DOKKU_PORT` (default: `22`): Used to specify a port to connect to the Dokku server on.
It also supports several flags (all flags unspecified here are passed as is to the server):
@@ -99,6 +99,12 @@ To list all available remotes, run `dokku remote:list`. This is equivalent to ru
To add a remote, run `dokku remote:add $REMOTE_NAME dokku@dokku.me:$APP_NAME`, replacing `$REMOTE_NAME` with your desired remote name, the `$APP_NAME` with your desired app name and the host `dokku.me` with your Dokku host. This is equivalent to running `git remote add $REMOTE_NAME dokku@dokku.me:$APP_NAME`.
The following remote formats are supported:
- `dokku@HOSTNAME.TLD:APP_NAME`
- `ssh://dokku@HOSTNAME.TLD/APP_NAME`
- `ssh://dokku@HOSTNAME.TLD:HOST_PORT/APP_NAME`
To remove a remote, run `dokku remote:remove $REMOTE_NAME`. This is equivalent to running `git remote remove $REMOTE_NAME`.
By default, the remote in use is `dokku`. To change the remote the client uses by default, run `dokku remote:set $REMOTE_NAME`, where `$REMOTE_NAME` is the name of your desired remote. This will not check the value specified, so that remote *must* be available or errors will occur when running normal client commands. Note that specifying `--remote` when running dokku commands will override this configuration value.

View File

@@ -7,12 +7,15 @@
scheduler-k3s:annotations:set <app|--global> <property> (<value>) [--process-type PROCESS_TYPE] <--resource-type RESOURCE_TYPE>, Set or clear an annotation for a given app/process-type/resource-type combination
scheduler-k3s:autoscaling-auth:set <app|--global> <trigger> [<--metadata key=value>...], Set or clear a scheduler-k3s autoscaling keda trigger authentication resource for an app
scheduler-k3s:autoscaling-auth:report <app|--global> [--format stdout|json] [--include-metadata] # Displays a scheduler-k3s autoscaling auth report for an app
scheduler-k3s:cluster-add [ssh://user@host:port] # Adds a server node to a Dokku-managed cluster
scheduler-k3s:cluster-list # Lists all nodes in a Dokku-managed cluster
scheduler-k3s:cluster-remove [node-id] # Removes client node to a Dokku-managed cluster
scheduler-k3s:cluster:add [ssh://user@host:port] # Adds a server node to a Dokku-managed cluster
scheduler-k3s:cluster:list # Lists all nodes in a Dokku-managed cluster
scheduler-k3s:cluster:remove [node-id] # Removes client node to a Dokku-managed cluster
scheduler-k3s:ensure-charts # Ensures the k3s charts are installed
scheduler-k3s:initialize # Initializes a cluster
scheduler-k3s:labels:set <app|--global> <property> (<value>) [--process-type PROCESS_TYPE] <--resource-type RESOURCE_TYPE>, Set or clear a label for a given app/process-type/resource-type combination
scheduler-k3s:labels:set <app|--global> <property> (<value>) [--process-type PROCESS_TYPE] <--resource-type RESOURCE_TYPE> # Set or clear a label for a given app/process-type/resource-type combination
scheduler-k3s:profiles:add <profile> [--role ROLE] [--insecure-allow-unknown-hosts] [--taint-scheduling] [--kubelet-args KUBELET_ARGS] Adds a node profile to the k3s cluster
scheduler-k3s:profiles:list [--format json|stdout] # Lists all node profiles in the k3s cluster
scheduler-k3s:profiles:remove <profile> # Removes a node profile from the k3s cluster
scheduler-k3s:report [<app>] [<flag>] # Displays a scheduler-k3s report for one or more apps
scheduler-k3s:set [<app>|--global] <key> (<value>) # Set or clear a scheduler-k3s property for an app or the scheduler
scheduler-k3s:show-kubeconfig # Displays the kubeconfig for remote usage
@@ -77,22 +80,38 @@ dokku scheduler-k3s:initialize --ingress-class traefik
#### Adding a worker node
Nodes that run app workloads can be added via the `scheduler-k3s:cluster-add` command. This will ssh onto the specified server, install k3s, and join it to the current Dokku node in worker mode. Workers are typically used to run app workloads.
Nodes that run app workloads can be added via the `scheduler-k3s:cluster:add` command. This will ssh onto the specified server, install k3s, and join it to the current Dokku node in worker mode. Workers are typically used to run app workloads.
```shell
dokku scheduler-k3s:cluster-add ssh://root@worker-1.example.com
dokku scheduler-k3s:cluster:add ssh://root@worker-1.example.com
```
Per-node kubelet flags can be supplied by passing `--kubelet-args` with a comma-separated `key=value` list. This is useful for tuning scheduler capacity or enforcing cluster-wide defaults at the node level.
```shell
dokku scheduler-k3s:cluster:add \
--kubelet-args allowed-unsafe-sysctls=net.ipv6.conf.all.disable_ipv6 \
ssh://root@worker-1.example.com
```
Multiple kubelet arguments can be specified in the same call by separating them with commas. The following example enables IPv4 forwarding while also increasing the pod density on the worker.
```shell
dokku scheduler-k3s:cluster:add \
--kubelet-args allowed-unsafe-sysctls=net.ipv6.conf.all.disable_ipv6,max-pods=150 \
ssh://root@worker-2.example.com
```
If the server isn't in the `known_hosts` file, the connection will fail. This can be bypassed by setting the `--insecure-allow-unknown-hosts` flag:
```shell
dokku scheduler-k3s:cluster-add --insecure-allow-unknown-hosts ssh://root@worker-1.example.com
dokku scheduler-k3s:cluster:add --insecure-allow-unknown-hosts ssh://root@worker-1.example.com
```
By default, Dokku will attempt to auto-detect the IP address of the Dokku server for the remote server to connect to. In cases where the auto-detected IP address is incorrect, an override may be specified via the `--server-ip` flag:
```shell
dokku scheduler-k3s:cluster-add --server-ip 192.168.20.15 ssh://root@worker-1.example.com
dokku scheduler-k3s:cluster:add --server-ip 192.168.20.15 ssh://root@worker-1.example.com
```
#### Adding a server node
@@ -102,28 +121,28 @@ dokku scheduler-k3s:cluster-add --server-ip 192.168.20.15 ssh://root@worker-1.ex
Server nodes are typically used to replicate the cluster state, and it is recommended to have an odd number of nodes spread across several availability zones (datacenters in close proximity within a region). This allows for higher availability in the event of a cluster failure. Server nodes run control-plane services such as the traefik load balancer and the etcd backing store.
Server nodes can also be added with the `scheduler-k3s:cluster-add` command by specifying `--role server`. This will ssh onto the specified server, install k3s, and join it to the current Dokku node in server mode.
Server nodes can also be added with the `scheduler-k3s:cluster:add` command by specifying `--role server`. This will ssh onto the specified server, install k3s, and join it to the current Dokku node in server mode.
```shell
dokku scheduler-k3s:cluster-add --role server ssh://root@server-1.example.com
dokku scheduler-k3s:cluster:add --role server ssh://root@server-1.example.com
```
Server nodes allow any workloads to be scheduled on them by default, in addition to the control-plane, etcd, and the scheduler itself. To avoid app workloads being scheduled on your control-plane, use the `--taint-scheduling` flag:
```shell
dokku scheduler-k3s:cluster-add --role server --taint-scheduling ssh://root@server-1.example.com
dokku scheduler-k3s:cluster:add --role server --taint-scheduling ssh://root@server-1.example.com
```
If the server isn't in the `known_hosts` file, the connection will fail. This can be bypassed by setting the `--insecure-allow-unknown-hosts` flag:
```shell
dokku scheduler-k3s:cluster-add --role server --insecure-allow-unknown-hosts ssh://root@server-1.example.com
dokku scheduler-k3s:cluster:add --role server --insecure-allow-unknown-hosts ssh://root@server-1.example.com
```
By default, Dokku will attempt to auto-detect the IP address of the Dokku server for the remote server to connect to. In cases where the auto-detected IP address is incorrect, an override may be specified via the `--server-ip` flag:
```shell
dokku scheduler-k3s:cluster-add --role server --server-ip 192.168.20.15 ssh://root@server-1.example.com
dokku scheduler-k3s:cluster:add --role server --server-ip 192.168.20.15 ssh://root@server-1.example.com
```
#### Changing the network interface
@@ -134,6 +153,48 @@ When attaching an worker or server node, the K3s plugin will look at the IP asso
dokku scheduler-k3s:set --global network-interface eth1
```
### Node Profiles
Node profiles capture repeatable `scheduler-k3s:cluster:add` options so you can join multiple nodes with identical settings. A profile name can be specified for the `scheduler-k3s:cluster:add` command via the `--profile <name>` flag. Any flags passed directly to `scheduler-k3s:cluster:add` override the stored values for that run.
#### Listing profiles
Display stored profiles to understand which roles and behaviors will be used.
```shell
dokku scheduler-k3s:profiles:list
```
```
name role
awesome-profile worker
```
This command also takes an optional `--format` flag to specify a format for the output. Options include `json` and `stdout`
#### Adding profiles
Create or update a profile that defines how new nodes should be prepared before joining the cluster.
```shell
dokku scheduler-k3s:profiles:add edge-workers \
--role worker \
--insecure-allow-unknown-hosts \
--kubelet-args protect-kernel-defaults=true,eviction-hard=memory.available<200Mi
```
Profile names must be alphanumeric, may include internal dashes, cannot start/end with a dash, and must be ≤32 characters. Other than the `--server-ip` flag, all flags used for `scheduler-k3s:cluster:add` are valid for the `scheduler-k3s:profiles:add` command.
#### scheduler-k3s:profiles:remove
Delete a profile once it’s no longer required.
```shell
dokku scheduler-k3s:profiles:remove edge-workers
```
Removal only deletes the stored definition; nodes that already joined the cluster keep their existing configuration.
### Changing deployment settings
The k3s plugin provides a number of settings that can be used to managed deployments on a per-app basis. The following table outlines ones not covered elsewhere:
@@ -171,6 +232,27 @@ The global default value may be set by passing an empty value for the option.
dokku scheduler-k3s:set --global deploy-timeout
```
### Exposing services on the network
Dokku will automatically expose the `web` process as a Kubernetes Service, with all others being treated as background processes. In some cases, it may be useful to have other processes exposed as Kubernetes Service objects so as to segregate internal http endpoints from public http endpoints. This can be done by modifying the `app.json` Formation entry for your process type.
```json
{
"formation": {
"internal-web": {
"service": {
"exposed": true
}
}
}
}
```
In the above example, the `internal-web` process is exposed as a service. The `PORT` variable for the process will be set to `5000`, and a kubernetes `Service` object will be created pointing at your processes.
> [!NOTE]
> It is not possible to modify the port mapping, nor is it possible to assign domains or SSL to a non-web process.
### SSL Certificates
#### Enabling letsencrypt integration
@@ -201,7 +283,7 @@ The default value may be set by passing an empty value for the option:
dokku scheduler-k3s:set node-js-app letsencrypt-server
```
The `image-pull-secrets` property can also be set globally. The global default is `production`.
The `letsencrypt-server` property can also be set globally. The global default is `production`.
```shell
dokku scheduler-k3s:set --global letsencrypt-server staging
@@ -213,6 +295,50 @@ The default value may be set by passing an empty value for the option.
dokku scheduler-k3s:set --global letsencrypt-server staging
```
Letsencrypt can be completely disabled for a given app by setting the `letsencrypt-server` to `false`
```shell
dokku scheduler-k3s:set node-js-app letsencrypt-server false
```
The server can also be disabled globally, and then conditionally enabled on a per-app basis:
```shell
dokku scheduler-k3s:set --global letsencrypt-server false
```
#### Using imported SSL certificates
SSL certificates imported via the `certs` plugin can be used with the k3s scheduler. When a certificate is imported, it is automatically synced to Kubernetes as a TLS secret and will be used for the app's ingress configuration.
To import a certificate:
```shell
dokku certs:add node-js-app server.crt server.key
```
When a certificate is imported:
- A Kubernetes TLS secret named `tls-<app-name>` is created in the app's namespace
- The ingress configuration is updated to use the imported certificate
- Automatic Let's Encrypt certificate generation is disabled for the app
Imported certificates take precedence over Let's Encrypt certificates. If you have both an imported certificate and Let's Encrypt configured, the imported certificate will be used.
To remove an imported certificate:
```shell
dokku certs:remove node-js-app
```
When a certificate is removed:
- The TLS secret is deleted from Kubernetes
- The app is automatically redeployed to update the ingress configuration
- If Let's Encrypt is configured, automatic certificate generation will resume
When an app is destroyed, any associated TLS secret is automatically cleaned up.
### Customizing Annotations and Labels
> [!NOTE]

View File

@@ -0,0 +1,316 @@
# Dokku Architecture
This document provides a developer-focused overview of Dokku's internal architecture. It is intended for contributors who want to understand how Dokku works under the hood before diving into the codebase.
## High-Level Architecture
Dokku is a Docker-powered Platform as a Service (PaaS) that provides a Heroku-like deployment experience. The following diagram shows the main components and their interactions:
```
+------------------+
| User/Client |
+--------+---------+
|
| SSH / git push
v
+--------+---------+
| dokku binary |
| (bash script) |
+--------+---------+
|
| parse_args / execute_dokku_cmd
v
+--------+---------+
| Plugin System |
| (plugn) |
+--------+---------+
|
| triggers / subcommands
v
+--------+---------+ +------------------+
| Core Plugins |---->| Docker / K8s |
| (apps, git, | | Runtime |
| config, etc.) | +------------------+
+------------------+
```
**Key components:**
- **dokku binary**: The main entry point (`/dokku`), a bash script that handles authentication, argument parsing, and routes commands to plugins
- **Plugin System**: Uses [plugn](https://github.com/dokku/plugn) to execute triggers and discover commands
- **Core Plugins**: Implement all Dokku functionality (apps, git, config, builders, schedulers, proxies, etc.)
- **Runtime**: Docker (default via `scheduler-docker-local`) or Kubernetes (via `scheduler-k3s`)
## Directory Structure
### Source Tree
```
dokku/
├── dokku # Main CLI entry point (bash script)
├── plugins/ # All plugin source code
│ ├── apps/ # App management
│ ├── git/ # Git push handling
│ ├── config/ # Environment variables
│ ├── builder-*/ # Build backends (herokuish, pack, dockerfile, etc.)
│ ├── scheduler-*/ # Deployment schedulers (docker-local, k3s)
│ ├── *-vhosts/ # Proxy implementations (nginx, traefik, caddy, etc.)
│ └── common/ # Shared functions and utilities
├── docs/ # Documentation (markdown)
├── debian/ # Debian packaging files
├── contrib/ # Installation scripts and helpers
└── tests/ # Integration tests (bats)
```
### Runtime Directories
When Dokku is installed, it creates the following directory structure:
```
/var/lib/dokku/
├── core-plugins/ # Core plugin binaries (installed from source)
│ ├── available/ # All available core plugins
│ └── enabled/ # Symlinks to enabled plugins
├── plugins/ # Community plugins
│ ├── available/
│ └── enabled/
└── data/ # Plugin data storage
└── <plugin>/ # Per-plugin data
└── <app>/ # Per-app properties
$DOKKU_ROOT (~dokku by default)
├── <app>/ # Per-app data
│ ├── refs/ # Git refs
│ ├── HEAD # Current git HEAD
│ ├── tls/ # SSL certificates
│ └── ... # Other app-specific files
└── .dokkurc/ # Global configuration overrides
```
### Plugin Directory Layout
Each plugin follows a consistent structure:
```
plugins/<plugin-name>/
├── plugin.toml # Plugin metadata (description, version)
├── commands # Help output and catch-all command handler
├── subcommands/ # Individual command implementations
│ ├── default # Default command (e.g., `dokku apps`)
│ └── <command> # Named commands (e.g., `dokku apps:create`)
├── functions # Public functions for other plugins to source
├── internal-functions # Private functions
├── triggers.go # Go-based trigger implementations
├── *.go # Additional Go code
└── Makefile # Build configuration
```
## Plugin System Architecture
Dokku's functionality is entirely implemented through plugins. This architecture provides:
- **Extensibility**: Add new features without modifying core code
- **Loose coupling**: Plugins communicate via well-defined triggers
- **Composability**: Mix and match builders, schedulers, and proxies
### Plugin Communication via Triggers
Plugins communicate through the **trigger system** powered by [plugn](https://github.com/dokku/plugn). When a trigger is fired, plugn executes matching scripts from all enabled plugins:
```
+---------------+ plugn trigger +---------------+
| Plugin A | -------------------> | Plugin B |
| (fires event) | "post-deploy" | (listens for |
+---------------+ | event) |
+---------------+
|
v
+---------------+
| Plugin C |
| (also listens)|
+---------------+
```
**Trigger execution flow:**
1. A plugin calls `plugn trigger <trigger-name> [args...]`
2. plugn searches `$PLUGIN_ENABLED_PATH/*/` for files named `<trigger-name>`
3. Each matching executable is run with the provided arguments
4. Triggers can return data via stdout or signal errors via exit codes
**Key trigger categories:**
| Category | Examples | Purpose |
|----------|----------|---------|
| App lifecycle | `post-create`, `pre-delete`, `post-deploy` | React to app events |
| Build | `builder-detect`, `pre-build`, `builder-build` | Control build process |
| Deploy | `scheduler-deploy`, `check-deploy` | Manage deployments |
| Proxy | `proxy-build-config`, `nginx-pre-reload` | Configure reverse proxy |
| Git | `git-pre-pull`, `receive-app` | Handle git operations |
For the complete list of triggers, see [Plugin Triggers](/docs/development/plugin-triggers.md).
### Calling Triggers from Go Code
Go-based plugins use the `common.CallPlugnTrigger` function:
```go
result, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
Trigger: "post-deploy",
Args: []string{appName, port, ip, imageTag},
})
```
## Command Flow
When a user runs a command like `dokku apps:list`, here's what happens:
```
User runs: ssh dokku@host apps:list
|
v
+-------------------+-------------------+
| dokku bash script |
| 1. Source /etc/default/dokku |
| 2. Set DOKKU_ROOT, PLUGIN_PATH |
| 3. Source common/functions |
| 4. Call parse_args() |
| 5. Check user permissions |
+-------------------+-------------------+
|
v
+-------------------+-------------------+
| execute_dokku_cmd() |
| 1. Handle plugin aliases |
| 2. Check for subcommands/default |
| 3. Check for subcommands/<cmd> |
| 4. Fall back to commands scripts |
+-------------------+-------------------+
|
v
+-------------------+-------------------+
| plugins/apps/subcommands/list |
| (executes the actual command) |
+-------------------+-------------------+
```
**Command resolution order:**
1. Check `$PLUGIN_ENABLED_PATH/<plugin>/subcommands/default` for the default command
2. Check `$PLUGIN_ENABLED_PATH/<plugin>/subcommands/<command>` for named commands
3. Iterate through all `$PLUGIN_ENABLED_PATH/*/commands` scripts as fallback
## Deployment Pipeline
When code is pushed via `git push dokku@host:myapp`, Dokku executes a multi-stage pipeline:
```
+-------------+ +-------------+ +-------------+ +-------------+
| Receive |--->| Build |--->| Release |--->| Deploy |
+-------------+ +-------------+ +-------------+ +-------------+
| | | |
v v v v
git-hook builder-detect builder-release scheduler-deploy
receive-app pre-build core-post-deploy
post-extract builder-build post-deploy
```
### Stage 1: Receive
The git receive stage handles the incoming push and prepares the source code:
1. `git-hook` receives the push and validates the branch
2. `receive-app` trigger is fired
3. Source code is extracted to a temporary directory
4. `post-extract` trigger allows modification of source
### Stage 2: Build
The build stage creates a Docker image from the source:
1. `builder-detect` determines the builder type (herokuish, pack, dockerfile, etc.)
2. `pre-build` trigger runs pre-build hooks
3. `builder-build` creates the Docker image
4. `post-build` trigger runs post-build hooks
### Stage 3: Release
The release stage prepares the image for deployment:
1. `pre-release-builder` allows image modifications
2. `builder-release` sets environment variables in the image
3. `post-release-builder` runs final release hooks
### Stage 4: Deploy
The deploy stage starts containers and configures networking:
1. `scheduler-deploy` starts new containers
2. `check-deploy` runs health checks
3. `core-post-deploy` switches traffic to new containers
4. `post-deploy` runs deployment tasks
5. Old containers are retired
## State Management
Dokku uses a file-based state system for simplicity and transparency.
### Property System
Plugin-specific configuration is stored in the property system:
```
/var/lib/dokku/data/<plugin>/<app>/<property>
```
Properties are managed via helper functions:
```bash
# Shell
fn-plugin-property-write "git" "$APP" "deploy-branch" "main"
fn-plugin-property-get "git" "$APP" "deploy-branch"
```
```go
// Go
common.PropertyWrite("git", appName, "deploy-branch", "main")
common.PropertyGet("git", appName, "deploy-branch")
```
### Per-App Data
Application-specific data sometimes lives in `$DOKKU_ROOT/<app>/`:
- `refs/` - Git references
- `tls/` - SSL certificates
- `ENV` - Environment file
- Container IDs, port mappings, etc.
All non-git code is being migrated to the property system.
### Global Configuration
Global settings can be configured via:
- `/etc/default/dokku` - System-level defaults
- `$DOKKU_ROOT/dokkurc` - User-level configuration
- `$DOKKU_ROOT/.dokkurc/*` - Additional configuration files
## Key Design Decisions
| Decision | Rationale |
|----------|-----------|
| **Plugin-based architecture** | Enables extensibility without modifying core code. Community plugins can add databases, caching, and other services. |
| **Bash + Go hybrid** | Bash for orchestration and simple commands; Go for performance-critical operations and complex logic. |
| **Trigger system** | Loose coupling between plugins. Plugins don't need to know about each other; they just fire and respond to events. |
| **File-based state** | Simple, transparent, and easy to debug. No database dependency. State can be inspected with standard Unix tools. |
| **Docker as foundation** | Leverages Docker's container runtime, networking, and image management. Allows multiple scheduler backends. |
## Further Reading
- [Plugin Creation](/docs/development/plugin-creation.md) - How to create custom plugins
- [Plugin Triggers](/docs/development/plugin-triggers.md) - Complete list of available triggers
- [Testing](/docs/development/testing.md) - How to test Dokku and plugins
- [Application Deployment](/docs/deployment/application-deployment.md) - User-facing deployment guide
- [Builder Management](/docs/deployment/builders/builder-management.md) - Available build backends
- [Scheduler Management](/docs/deployment/schedulers/scheduler-management.md) - Available scheduler backends

View File

@@ -387,6 +387,30 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `certs-get`
- Description: Returns the certificate or key content for an app
- Invoked by: `scheduler-k3s`
- Arguments: `$APP $KEY_TYPE`
- Example:
```shell
#!/usr/bin/env bash
# Returns the certificate or key content for an app
# KEY_TYPE should be "crt" or "key"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; KEY_TYPE="$2"
APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
if [[ "$KEY_TYPE" == "crt" ]]; then
cat "$APP_SSL_PATH/server.crt"
elif [[ "$KEY_TYPE" == "key" ]]; then
cat "$APP_SSL_PATH/server.key"
fi
```
### `check-deploy`
- Description: Allows you to run checks on a deploy before Dokku allows the container to handle requests.
@@ -582,7 +606,7 @@ APP="$1"; PROPERTY="$2"
### `cron-entries`
- Description: Allows injecting cron entries into the written out scheduled cron task list. Each entry is newline delimited, and individual entries come in the form `$SCHEDULE;$FULL_COMMAND;$ARBITRARY_DATA`. Individual implementations of cron writing can decide whether and how to include these cron entries. The `ARBITRARY_DATA` includes the log file path for the basic `docker-local` cron implementation.
- Description: Allows injecting cron tasks into the written out scheduled cron task list. Each entry is newline delimited, and individual tasks come in the form `$SCHEDULE;$FULL_COMMAND;$ARBITRARY_DATA`. Individual implementations of cron writing can decide whether and how to include these cron tasks. The `ARBITRARY_DATA` includes the log file path for the basic `docker-local` cron implementation.
- Invoked by:
- Arguments: `$DOKKU_SCHEDULER`
- Example:
@@ -2450,7 +2474,7 @@ DOKKU_SCHEDULER="$1"; APP="$2";
> The scheduler plugin trigger apis are under development and may change
> between minor releases until the 1.0 release.
- Description: Force triggers writing out cron entries. Arguments are optional.
- Description: Force triggers writing out cron tasks. Arguments are optional.
- Invoked by: `ps:start`, `ps:stop`, `cron:set`
- Arguments: `$DOKKU_SCHEDULER $APP`
- Example:
@@ -2805,6 +2829,26 @@ DOKKU_SCHEDULER="$1"; APP="$2"; CONTAINER="$3"; TAIL="$4"; PRETTY_PRINT="$5"; NU
# TODO
```
### `scheduler-run-retire`
> [!WARNING]
> The scheduler plugin trigger apis are under development and may change
> between minor releases until the 1.0 release.
- Description: Allows you to retire containers started by the `run` command
- Invoked by: `dokku run:retire`
- Arguments: `$DOKKU_SCHEDULER $APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
DOKKU_SCHEDULER="$1"; APP="$2";
# TODO
```
### `scheduler-run-stop`
> [!WARNING]

View File

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

View File

@@ -3,7 +3,7 @@
Pull the dokku/dokku image:
```shell
docker pull dokku/dokku:0.36.8
docker pull dokku/dokku:0.37.6
```
Next, run the image.
@@ -19,7 +19,7 @@ docker container run -d \
--publish 8443:443 \
--volume /var/lib/dokku:/mnt/dokku \
--volume /var/run/docker.sock:/var/run/docker.sock \
dokku/dokku:0.36.8
dokku/dokku:0.37.6
```
Alternatively, you can use `docker-compose.yml`:
@@ -27,7 +27,7 @@ Alternatively, you can use `docker-compose.yml`:
```yaml
services:
dokku:
image: dokku/dokku:0.36.8
image: dokku/dokku:0.37.6
container_name: dokku
network_mode: bridge
ports:
@@ -80,12 +80,12 @@ redis: https://github.com/dokku/dokku-redis.git
### Prior to Dokku start
The alternative is to build a custom docker image via a custom Dockerfile. This Dockerfile can run any `plugin:install` command. Note that the version installed at that time will be the one that persists. Below is an example Dockerfile showing this method.
The alternative is to build a custom docker image via a custom Dockerfile. This Dockerfile can run any `plugin:install` command, though the `install` trigger must be skipped via the `--skip-install-trigger`. The version installed at that time will be the one that persists. Below is an example Dockerfile showing this method.
```Dockerfile
FROM dokku/dokku:0.36.8
RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
RUN dokku plugin:install https://github.com/dokku/dokku-redis.git redis
FROM dokku/dokku:0.37.6
RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git --skip-install-trigger
RUN dokku plugin:install https://github.com/dokku/dokku-redis.git --skip-install-trigger
```
## SSH Key Management

View File

@@ -8,17 +8,11 @@ Dokku is an extensible, open source Platform as a Service that runs on a single
To start using Dokku, you'll need a system that meets the following minimum requirements:
- A fresh installation of any of the following operating systems:
- [Ubuntu 22.04/24.04](https://www.ubuntu.com/download)
- [Debian 11+ x64](https://www.debian.org/distrib/)
- A server with one of the following architectures
- AMD64 (alternatively known as `x86_64`), commonly used for Intel cloud servers
- ARMV8 (alternatively known as `arm64`), commonly used for Raspberry PI and AWS Graviton
To avoid memory pressure during builds or runtime of your applications, we suggest the following:
- At least 1 GB of system memory
- If your system has less than 1GB of memory, you can use [this workaround](/docs/getting-started/advanced-installation.md#vms-with-less-than-1-gb-of-memory).
- Operating Systems: [Ubuntu 22.04/24.04](https://www.ubuntu.com/download) or [Debian 11+ x64](https://www.debian.org/distrib/)
- Supported Architectures: `AMD64` (`x86_64`) and `arm64` (`armv8`)
- Minimum Memory:
- Docker Scheduler: 1GB of system memory, or [add swap memory](/docs/getting-started/advanced-installation.md#vms-with-less-than-1-gb-of-memory)
- K3s Scheduler: 2GB of system memory on every node in the cluster
Finally, we recommend attaching at least one domain name to your server. This is not required, but using a domain name will make app access easier. When connecting a domain, either a single domain or a wildcard may be associated to the server's IP.
@@ -37,8 +31,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 -NP . https://dokku.com/install/v0.36.8/bootstrap.sh
sudo DOKKU_TAG=v0.36.8 bash bootstrap.sh
wget -NP . https://dokku.com/install/v0.37.6/bootstrap.sh
sudo DOKKU_TAG=v0.37.6 bash bootstrap.sh
```
The installation process takes about 5-10 minutes, depending upon internet connection speed.

View File

@@ -18,6 +18,8 @@ Docker releases updates periodically to their engine. We recommend reading their
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
- [Upgrading to 0.37](/docs/appendices/0.37.0-migration-guide.md)
- [Upgrading to 0.36](/docs/appendices/0.36.0-migration-guide.md)
- [Upgrading to 0.35](/docs/appendices/0.35.0-migration-guide.md)
- [Upgrading to 0.34](/docs/appendices/0.34.0-migration-guide.md)
- [Upgrading to 0.33](/docs/appendices/0.33.0-migration-guide.md)

View File

@@ -10,26 +10,26 @@
<meta name="author" content="">
<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.36.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.36.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.36.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.36.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.36.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.36.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.36.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.36.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.36.8/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.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.36.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/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.36.8/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
@@ -38,7 +38,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/style.css" rel="stylesheet">
<!-- <link href="./assets/style.css" rel="stylesheet"> -->
</head>
@@ -98,7 +98,7 @@
<main class="container px-4 px-lg-5">
<div class="row">
<div class="col-lg-7">
<a class="badge-link" href="https://github.com/dokku/dokku/releases"><span class="badge py-2 d-flex fit-content"><div class="circle align-self-center me-2"></div>Latest release <span id="releaseVersion" class="ms-1">v0.36.8</span></span></a>
<a class="badge-link" href="https://github.com/dokku/dokku/releases"><span class="badge py-2 d-flex fit-content"><div class="circle align-self-center me-2"></div>Latest release <span id="releaseVersion" class="ms-1">v0.37.6</span></span></a>
<h1 class="text-white hero-heading mt-5">An open source PAAS alternative to Heroku.</h1>
<h4 class="text-white mt-5">Dokku helps you build and manage the lifecycle of applications from building to scaling.</h4>
<div class="d-flex mt-5">
@@ -125,7 +125,7 @@
</p>
<p class="line">
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.36.8 bash bootstrap.sh</span>
<span class="command">sudo DOKKU_TAG=v0.37.6 bash bootstrap.sh</span>
</p>
<br>

View File

@@ -3,7 +3,7 @@
> [!IMPORTANT]
> New as of 0.28.0
Dokku provides integration with the [Caddy](https://caddyserver.com/) proxy service by utilizing the Docker label-based integration implemented by Caddy.
Dokku provides integration with the [Caddy](https://caddyserver.com/) proxy service by utilizing the Docker label-based integration implemented by [Caddy Docker Proxy](https://github.com/lucaslorentz/caddy-docker-proxy).
```
caddy:report [<app>] [<flag>] # Displays a caddy report for one or more apps
@@ -117,19 +117,57 @@ dokku caddy:set --global log-level DEBUG
After modifying, the Caddy container will need to be restarted.
### Changing the label key for the app
### Label Management
The default label key for the app is `caddy`. This can be changed by setting the `label-key` property:
The Caddy plugin allows you to add custom container labels to apps. These labels are injected into containers during deployment and can be used to configure Caddy behavior beyond what the plugin provides by default.
Refer to the upstream [caddy-docker-proxy](https://github.com/lucaslorentz/caddy-docker-proxy) documentation for more information on what labels are available.
#### Adding a label
To add a custom container label to an app, use the `caddy:labels:add` command:
```shell
dokku caddy:set node-js-app label-key caddy_0
dokku caddy:labels:add node-js-app caddy.directive value
```
This will update the app's label key to `caddy_0`. The label key is used to identify the app in the Caddy configuration. If you change the label key, you will need to restart or rebuild the app to apply the updates.
This will add the label `caddy.directive=value` to the app's containers. After adding a label, you will need to rebuild or redeploy the app for the label to be applied to running containers.
```shell
dokku ps:rebuild node-js-app
```
#### Removing a label
To remove a custom container label from an app, use the `caddy:labels:remove` command:
```shell
dokku caddy:labels:remove node-js-app caddy.directive
```
This will remove the specified label from the app. After removing a label, you will need to rebuild or redeploy the app for the change to be applied to running containers.
```shell
dokku ps:rebuild node-js-app
```
#### Showing labels
To view all custom container labels for an app, use the `caddy:labels:show` command:
```shell
dokku caddy:labels:show node-js-app
```
To view a specific label value, provide the label name:
```shell
dokku caddy:labels:show node-js-app caddy.directive
```
### SSL Configuration
The caddy plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
The caddy plugin only supports automatic ssl certificates from its letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
#### Enabling letsencrypt integration

View File

@@ -113,6 +113,54 @@ dokku haproxy:set --global log-level DEBUG
After modifying, the Haproxy container will need to be restarted.
### Label Management
The Haproxy plugin allows you to add custom container labels to apps. These labels are injected into containers during deployment and can be used to configure Haproxy behavior beyond what the plugin provides by default.
Refer to the upstream [EasyHaproxy](https://github.com/byjg/docker-easy-haproxy) documentation for more information on what labels are available.
#### Adding a label
To add a custom container label to an app, use the `haproxy:labels:add` command:
```shell
dokku haproxy:labels:add node-js-app haproxy.directive value
```
This will add the label `haproxy.directive=value` to the app's containers. After adding a label, you will need to rebuild or redeploy the app for the label to be applied to running containers.
```shell
dokku ps:rebuild node-js-app
```
#### Removing a label
To remove a custom container label from an app, use the `haproxy:labels:remove` command:
```shell
dokku haproxy:labels:remove node-js-app haproxy.directive
```
This will remove the specified label from the app. After removing a label, you will need to rebuild or redeploy the app for the change to be applied to running containers.
```shell
dokku ps:rebuild node-js-app
```
#### Showing labels
To view all custom container labels for an app, use the `haproxy:labels:show` command:
```shell
dokku haproxy:labels:show node-js-app
```
To view a specific label value, provide the label name:
```shell
dokku haproxy:labels:show node-js-app haproxy.directive
```
### SSL Configuration
The haproxy plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.

View File

@@ -338,6 +338,7 @@ Changing these value globally or on a per-app basis will require rebuilding the
| proxy-buffers | `8 8k` | string | Number and size of the buffers used for reading the proxied server response, for a single connection |
| proxy-busy-buffers-size | `16k` | string | Limits the total size of buffers that can be busy sending a response to the client while the response is not yet fully read. |
| proxy-connect-timeout | `60s` | string | Timeout (with units) for establishing a connection to your backend server |
| proxy-keepalive | empty (disabled) | integer | Number of idle keepalive connections to upstream servers (disabled by default) |
| proxy-read-timeout | `60s` | string | Timeout (with units) for reading response from your backend server |
| proxy-send-timeout | `60s` | string | Timeout (with units) for transmitting a request to your backend server |
| send-timeout | `60s` | string | Timeout (with units) for transmitting a response to your the client |

View File

@@ -124,6 +124,54 @@ The following folders within an app repository may have `*.conf` files that will
- `openresty/http-includes/`: Injected in the `server` block serving http(s) requests for the app.
- `openresty/http-location-includes/`: Injected in the `location` block that proxies to the app in the app's respective `server` block.
### Label Management
The OpenResty plugin allows you to add custom container labels to apps. These labels are injected into containers during deployment and can be used to configure OpenResty behavior beyond what the plugin provides by default.
Refer to the upstream [openresty-docker-proxy](https://github.com/dokku/openresty-docker-proxy) documentation for more information on what labels are available.
#### Adding a label
To add a custom container label to an app, use the `openresty:labels:add` command:
```shell
dokku openresty:labels:add node-js-app openresty.directive value
```
This will add the label `openresty.directive=value` to the app's containers. After adding a label, you will need to rebuild or redeploy the app for the label to be applied to running containers.
```shell
dokku ps:rebuild node-js-app
```
#### Removing a label
To remove a custom container label from an app, use the `openresty:labels:remove` command:
```shell
dokku openresty:labels:remove node-js-app openresty.directive
```
This will remove the specified label from the app. After removing a label, you will need to rebuild or redeploy the app for the change to be applied to running containers.
```shell
dokku ps:rebuild node-js-app
```
#### Showing labels
To view all custom container labels for an app, use the `openresty:labels:show` command:
```shell
dokku openresty:labels:show node-js-app
```
To view a specific label value, provide the label name:
```shell
dokku openresty:labels:show node-js-app openresty.directive
```
### SSL Configuration
The OpenResty plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.

View File

@@ -127,6 +127,54 @@ dokku traefik:set --global log-level DEBUG
After modifying, the Traefik container will need to be restarted.
### Label Management
The Traefik plugin allows you to add custom container labels to apps. These labels are injected into containers during deployment and can be used to configure Traefik behavior beyond what the plugin provides by default.
Refer to the upstream [Traefik](https://doc.traefik.io/traefik/) documentation for more information on what labels are available.
#### Adding a label
To add a custom container label to an app, use the `traefik:labels:add` command:
```shell
dokku traefik:labels:add node-js-app traefik.directive value
```
This will add the label `traefik.directive=value` to the app's containers. After adding a label, you will need to rebuild or redeploy the app for the label to be applied to running containers.
```shell
dokku ps:rebuild node-js-app
```
#### Removing a label
To remove a custom container label from an app, use the `traefik:labels:remove` command:
```shell
dokku traefik:labels:remove node-js-app traefik.directive
```
This will remove the specified label from the app. After removing a label, you will need to rebuild or redeploy the app for the change to be applied to running containers.
```shell
dokku ps:rebuild node-js-app
```
#### Showing labels
To view all custom container labels for an app, use the `traefik:labels:show` command:
```shell
dokku traefik:labels:show node-js-app
```
To view a specific label value, provide the label name:
```shell
dokku traefik:labels:show node-js-app traefik.directive
```
### SSL Configuration
The traefik plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
@@ -151,6 +199,41 @@ dokku traefik:set --global letsencrypt-server https://acme-staging-v02.api.letse
After enabling, the Traefik container will need to be restarted and apps will need to be rebuilt to retrieve certificates from the new server.
#### Switching to DNS-01 challenge mode
By default, Traefik uses TLS-ALPN-01 challenge for obtaining certificates. To switch to DNS-01 challenge mode (useful for wildcard certificates or when port 443 is not accessible), you need to:
1. Set the challenge mode to `dns`:
```shell
dokku traefik:set --global challenge-mode dns
```
2. Set your DNS provider:
```shell
dokku traefik:set --global dns-provider cloudflare
```
3. Configure the required environment variables for your DNS provider. Each DNS provider requires specific environment variables. The variable names should be prefixed with `dns-provider-`:
```shell
dokku traefik:set --global dns-provider-cf_api_email user@example.com
dokku traefik:set --global dns-provider-cf_api_key your-api-key
```
The `dns-provider-` prefix will be stripped and the variable name will be uppercased when passed to the Traefik container. For example, `dns-provider-cf_api_email` becomes `CF_API_EMAIL`.
After configuring, the Traefik container will need to be restarted and apps will need to be rebuilt.
Refer to the [Traefik DNS Challenge documentation](https://doc.traefik.io/traefik/https/acme/#dnschallenge) for the list of supported DNS providers and their required environment variables.
To switch back to TLS challenge mode:
```shell
dokku traefik:set --global challenge-mode tls
```
### API Access
Traefik exposes an API and Dashboard, which Dokku disables by default for security reasons. It can be exposed and customized as described below.
@@ -216,7 +299,9 @@ dokku traefik:report
Traefik api vhost: traefik.dokku.me
Traefik basic auth password: password
Traefik basic auth username: user
Traefik challenge mode: tls
Traefik dashboard enabled: false
Traefik dns provider:
Traefik image: traefik:v2.8
Traefik letsencrypt email:
Traefik letsencrypt server:
@@ -226,7 +311,9 @@ dokku traefik:report
Traefik api vhost: traefik.dokku.me
Traefik basic auth password: password
Traefik basic auth username: user
Traefik challenge mode: tls
Traefik dashboard enabled: false
Traefik dns provider:
Traefik image: traefik:v2.8
Traefik letsencrypt email:
Traefik letsencrypt server:
@@ -236,7 +323,9 @@ dokku traefik:report
Traefik api vhost: traefik.dokku.me
Traefik basic auth password: password
Traefik basic auth username: user
Traefik challenge mode: tls
Traefik dashboard enabled: false
Traefik dns provider:
Traefik image: traefik:v2.8
Traefik letsencrypt email:
Traefik letsencrypt server:
@@ -255,7 +344,9 @@ dokku traefik:report node-js-app
Traefik api vhost: traefik.dokku.me
Traefik basic auth password: password
Traefik basic auth username: user
Traefik challenge mode: tls
Traefik dashboard enabled: false
Traefik dns provider:
Traefik image: traefik:v2.8
Traefik letsencrypt email:
Traefik letsencrypt server:

View File

@@ -1,8 +1,8 @@
# One-off Tasks
```
run [-e|--env KEY=VALUE] [--no-tty] <app> <cmd> # Run a command in a new container using the current app image
run:detached [-e|-env KEY=VALUE] [--force-tty] <app> <cmd> # Run a command in a new detached container using the current app image
run [-e|--env KEY=VALUE] [--no-tty] [--ttl-seconds SECONDS] <app> <cmd> # Run a command in a new container using the current app image
run:detached [-e|-env KEY=VALUE] [--force-tty] [--ttl-seconds SECONDS] <app> <cmd> # Run a command in a new detached container using the current app image
run:list [--format json|stdout] [<app>] # List all run containers for an app
run:logs <app|--container CONTAINER> [-h] [-t] [-n num] [-q] # Display recent log output for run containers
run:stop <app|--container CONTAINER> # Stops all run containers for an app or a specified run container
@@ -29,6 +29,16 @@ dokku run --env "NODE_ENV=development" --env "PATH=/custom/path" node-js-app npm
One off containers are removed at the end of process execution.
In addition, one-off containers also run for a max of 24 hours (86400 seconds) by default, after which they are reaped. This can be changed by setting the `--ttl-seconds` argument:
```shell
# runs for 10 minutes
dokku run --ttl-seconds 600 node-js-app npm run mytask
```
One-off containers that exceed their runtime are reaped every 5 minutes, so the ttl-seconds is an approximation and your app may end up running for up to 5 minutes longer than expected.
#### Running Procfile commands
The `run` command can also be used to run a command defined in the app `Procfile`:

View File

@@ -6,8 +6,10 @@
```
cron:list <app> [--format json|stdout] # List scheduled cron tasks for an app
cron:report [<app>] [<flag>] # Display report about an app
cron:resume <app> <cron_id> # Resume a cron task
cron:run <app> <cron_id> [--detach] # Run a cron task on the fly
cron:set [--global|<app>] <key> <value> # Set or clear a cron property for an app
cron:suspend <app> <cron_id> # Suspend a cron task
```
## Usage
@@ -31,12 +33,17 @@ The `app.json` file for a given app can define a special `cron` key that contain
}
```
A cron entry takes the following properties:
A cron task takes the following properties:
- `command`: A command to be run within the built app image. Specified commands can also be `Procfile` entries.
- `maintenance`: A boolean value that decides whether the cron task is in maintenance and therefore executable or not.
- `schedule`: A [cron-compatible](https://en.wikipedia.org/wiki/Cron#Overview) scheduling definition upon which to run the command. Seconds are generally not supported.
- `concurrency_policy`: A string (default: `allow`), that controls whether the cron task can be run concurrently with another invocation of itself. Valid options are `allow` (allow concurrency), `forbid` (exit the new cron task if there is an existing one), `replace` (delete any existing cron task and start the new one).
Zero or more cron commands can be specified per app. Cron entries are validated after the build artifact is created but before the app is deployed, and the cron schedule is updated during the post-deploy phase.
Zero or more cron tasks can be specified per app. Cron tasks are validated after the build artifact is created but before the app is deployed, and the cron schedule is updated during the post-deploy phase.
Cron tasks can run for a maximum of 24 hours via the docker-local scheduler, after which they are reaped from the system.
See the [app.json location documentation](/docs/advanced-usage/deployment-tasks.md#changing-the-appjson-location) for more information on where to place your `app.json` file.
@@ -123,6 +130,26 @@ ID Schedule Command
5cruaotm4yzzpnjlsdunblj8qyjp @daily /bin/true
```
#### Suspending and resuming a specific cron task
Cron tasks can be suspended to temporarily prevent them from running, and later resumed to re-enable them. This is useful for maintenance or debugging purposes.
To suspend a specific cron task, use the `cron:suspend` command with the app name and cron ID:
```shell
dokku cron:suspend node-js-app cGhwPT09cGhwIHRlc3QucGhwPT09QGRhaWx5
```
A suspended task will not execute according to its schedule. You can verify a task is suspended by checking the `Maintenance` column in the `cron:list` output, which will show `true (task)` for suspended tasks.
To resume a suspended cron task, use the `cron:resume` command:
```shell
dokku cron:resume node-js-app cGhwPT09cGhwIHRlc3QucGhwPT09QGRhaWx5
```
Once resumed, the task will execute according to its schedule again. The cron ID can be retrieved from the `cron:list` output.
#### Executing a cron task on the fly
Cron tasks can be invoked via the `cron:run` command. This command takes an `app` argument and a `cron id` (retrievable from `cron:list` output).
@@ -218,7 +245,7 @@ For tasks that will properly resume, you _should_ use the above method, as runni
Regularly scheduled tasks can be a bit of a pain with Dokku. The following are general recommendations to follow to help ensure successful task runs.
- Use the `dokku` user in your cron entry.
- Use the `dokku` user in your cron task.
- If you do not, the `dokku` binary will attempt to execute with `sudo`, and your cron run with fail with `sudo: no tty present and no askpass program specified`.
- Add a `MAILTO` environment variable to ship cron emails to yourself.
- Add a `PATH` environment variable or specify the full path to binaries on the host.

View File

@@ -9,26 +9,26 @@
<meta name="author" content="">
<title>Dokku - {{DOC_TITLE}}</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.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.36.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.36.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.36.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.36.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.36.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.36.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.36.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.36.8/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.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.36.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/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.36.8/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script>
@@ -48,7 +48,7 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.8/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.6/docs/assets/style.css" rel="stylesheet">
<!-- <link href="./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">
</head>
@@ -150,6 +150,7 @@
<a href="/{{NAME}}/deployment/builders/lambda/" class="list-group-item">Lambda Builder</a>
<a href="/{{NAME}}/deployment/builders/nixpacks/" class="list-group-item">Nixpacks Builder</a>
<a href="/{{NAME}}/deployment/builders/null/" class="list-group-item">Null Builder</a>
<a href="/{{NAME}}/deployment/builders/railpack/" class="list-group-item">Railpack Builder</a>
<a href="#" class="list-group-item disabled">Deployment Methods</a>
<a href="/{{NAME}}/deployment/methods/git/" class="list-group-item">Git Deployment</a>
@@ -206,6 +207,7 @@
<a href="#" class="list-group-item disabled">Development</a>
<a href="/{{NAME}}/development/architecture/" class="list-group-item">Architecture</a>
<a href="/{{NAME}}/development/plugin-creation/" class="list-group-item">Plugin Creation</a>
<a href="/{{NAME}}/development/plugin-triggers/" class="list-group-item">Plugin Triggers</a>
<a href="/{{NAME}}/development/testing/" class="list-group-item">Running Tests</a>

21
dokku
View File

@@ -135,6 +135,27 @@ execute_dokku_cmd() {
local script
local argv=("$@")
local -A PLUGIN_ALIASES
PLUGIN_ALIASES["docker-local"]="scheduler-docker-local"
PLUGIN_ALIASES["dockerfile"]="builder-dockerfile"
PLUGIN_ALIASES["herokuish"]="builder-herokuish"
PLUGIN_ALIASES["k3s"]="scheduler-k3s"
PLUGIN_ALIASES["lambda"]="builder-lambda"
PLUGIN_ALIASES["nixpacks"]="builder-nixpacks"
PLUGIN_ALIASES["pack"]="builder-pack"
PLUGIN_ALIASES["rails"]="builder-railpack"
local plugin_alias_source="${PLUGIN_NAME%%:*}"
local plugin_alias_target="${PLUGIN_ALIASES[$plugin_alias_source]}"
if [[ -n "$plugin_alias_target" ]]; then
PLUGIN_NAME="${PLUGIN_NAME/$plugin_alias_source/$plugin_alias_target}"
PLUGIN_CMD="${PLUGIN_CMD/$plugin_alias_source/$plugin_alias_target}"
# also replace the first argument in $@ with the new PLUGIN_NAME
shift 1
set -- "$PLUGIN_NAME" "$@"
argv=("$PLUGIN_NAME" "${argv[@]:1}")
fi
case "$PLUGIN_NAME" in
events | events:*)
local PLUGIN_NAME=${PLUGIN_NAME/events/20_events}

View File

@@ -1,4 +1,4 @@
go 1.25.1
go 1.25.5
use (
./plugins/app-json

View File

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

View File

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

View File

@@ -8,6 +8,7 @@ import (
"strings"
"github.com/dokku/dokku/plugins/common"
"github.com/tailscale/hujson"
"k8s.io/utils/ptr"
)
@@ -25,8 +26,8 @@ var (
// AppJSON is a struct that represents an app.json file as understood by Dokku
type AppJSON struct {
// Cron is a list of cron commands to execute
Cron []CronCommand `json:"cron"`
// Cron is a list of cron tasks to execute
Cron []CronTask `json:"cron"`
// Formation is a map of process types to scale
Formation map[string]Formation `json:"formation"`
@@ -50,13 +51,19 @@ type AppJSON struct {
} `json:"scripts"`
}
// CronCommand is a struct that represents a single cron command from an app.json file
type CronCommand struct {
// CronTask is a struct that represents a single cron task from an app.json file
type CronTask struct {
// Command is the command to execute
Command string `json:"command"`
// Maintenance is whether or not the cron task is in maintenance mode
Maintenance bool `json:"maintenance"`
// Schedule is the cron schedule to execute the command on
Schedule string `json:"schedule"`
// ConcurrencyPolicy is the concurrency policy for the cron command
ConcurrencyPolicy string `json:"concurrency_policy"`
}
// Formation is a struct that represents the scale for a process from an app.json file
@@ -69,6 +76,16 @@ type Formation struct {
// MaxParallel is the maximum number of processes to start in parallel
MaxParallel *int `json:"max_parallel"`
// Service is a struct that represents how to expose the process to the network
// This only applies to non-web processes
Service *FormationService `json:"service"`
}
// FormationService is a struct that represents how to expose a process to the network
type FormationService struct {
// Exposed is whether or not the process is exposed as a service
Exposed bool `json:"exposed"`
}
// FormationAutoscaling is a struct that represents the autoscaling configuration for a process from an app.json file
@@ -256,8 +273,14 @@ func ReadAppJSON(path string) (AppJSON, error) {
return AppJSON{}, nil
}
ast, err := hujson.Parse(b)
if err != nil {
return AppJSON{}, fmt.Errorf("Cannot parse app.json as jsonc: %v", err)
}
ast.Standardize()
var appJSON AppJSON
if err = json.Unmarshal(b, &appJSON); err != nil {
if err = json.Unmarshal(ast.Pack(), &appJSON); err != nil {
return AppJSON{}, fmt.Errorf("Cannot parse app.json: %v", err)
}

View File

@@ -133,11 +133,7 @@ func cleanupDeploymentContainer(containerID string, phase string) error {
}
func executeScript(appName string, image string, imageTag string, phase string) error {
phaseName := phase
if phase == "heroku.postdeploy" {
phaseName = "first deploy postdeploy"
}
common.LogInfo1(fmt.Sprintf("Checking for %s task", phaseName))
common.LogInfo1(fmt.Sprintf("Checking for %s task", phase))
command := ""
phaseSource := ""
if phase == "release" {
@@ -152,14 +148,14 @@ func executeScript(appName string, image string, imageTag string, phase string)
}
if command == "" {
common.LogVerbose(fmt.Sprintf("No %s task found, skipping", phaseName))
common.LogVerbose(fmt.Sprintf("No %s task found, skipping", phase))
return nil
}
if phase == "predeploy" {
common.LogVerbose(fmt.Sprintf("Executing %s task from %s: %s", phaseName, phaseSource, command))
common.LogVerbose(fmt.Sprintf("Executing %s task from %s: %s", phase, phaseSource, command))
} else {
common.LogVerbose(fmt.Sprintf("Executing %s task from %s in ephemeral container: %s", phaseName, phaseSource, command))
common.LogVerbose(fmt.Sprintf("Executing %s task from %s in ephemeral container: %s", phase, phaseSource, command))
}
isHerokuishImage := common.IsImageHerokuishBased(image, appName)
@@ -271,15 +267,15 @@ func executeScript(appName string, image string, imageTag string, phase string)
defer cleanupDeploymentContainer(containerID, phase)
if !waitForExecution(containerID) {
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phase, containerID[0:9]))
common.LogVerboseQuietContainerLogs(containerID)
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
return fmt.Errorf("Execution of %s task failed: %s", phaseName, command)
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phase, containerID[0:9]))
return fmt.Errorf("Execution of %s task failed: %s", phase, command)
}
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phase, containerID[0:9]))
common.LogVerboseQuietContainerLogs(containerID)
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phase, containerID[0:9]))
if phase != "predeploy" {
return nil

View File

@@ -1,11 +1,12 @@
module github.com/dokku/dokku/plugins/app-json
go 1.25.1
go 1.25.5
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/spf13/pflag v1.0.10
github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
)
@@ -23,9 +24,10 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.5 // indirect
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
golang.org/x/crypto v0.43.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.37.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
golang.org/x/crypto v0.46.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.39.0 // indirect
)
replace github.com/dokku/dokku/plugins/common => ../common

View File

@@ -22,8 +22,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
github.com/onsi/gomega v1.39.0 h1:y2ROC3hKFmQZJNFeGAMeHZKkjBL65mIZcvrLQBF9k6Q=
github.com/onsi/gomega v1.39.0/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4=
github.com/otiai10/copy v1.14.1 h1:5/7E6qsUMBaH5AnQ0sSLzzTg1oTECmcCmT6lvF45Na8=
github.com/otiai10/copy v1.14.1/go.mod h1:oQwrEDDOci3IM8dJF0d8+jnbfPDllW6vUjNc3DoZm9I=
github.com/otiai10/mint v1.6.3 h1:87qsV/aw1F5as1eH1zS/yqHY85ANKVMgkDrf9rcxbQs=
@@ -39,8 +39,11 @@ github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFo
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a h1:a6TNDN9CgG+cYjaeN8l2mc4kSz2iMiCDQxPEyltUV/I=
github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a/go.mod h1:EbW0wDK/qEUYI0A5bqq0C2kF8JTQwWONmGDBbzsxxHo=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
@@ -48,20 +51,20 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM=
golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -72,20 +75,20 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=
golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss=
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=

View File

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

View File

@@ -1,9 +1,9 @@
package appjson
import (
"encoding/json"
"errors"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/common"
@@ -42,18 +42,17 @@ func TriggerAppJSONGetContent(appName string) error {
return nil
}
b, err := os.ReadFile(getProcessSpecificAppJSONPath(appName))
appJSON, err := ReadAppJSON(getProcessSpecificAppJSONPath(appName))
if err != nil {
return fmt.Errorf("Cannot read app.json file: %v", err)
return err
}
content := strings.TrimSpace(string(b))
if content == "" {
fmt.Print("{}")
return nil
content, err := json.Marshal(appJSON)
if err != nil {
return err
}
fmt.Print(content)
fmt.Print(string(content))
return nil
}

View File

@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/apps
go 1.25.1
go 1.25.5
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
@@ -21,9 +21,9 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.5 // indirect
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
golang.org/x/crypto v0.43.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/crypto v0.46.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.39.0 // indirect
)
replace github.com/dokku/dokku/plugins/common => ../common

View File

@@ -19,8 +19,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
github.com/onsi/gomega v1.39.0 h1:y2ROC3hKFmQZJNFeGAMeHZKkjBL65mIZcvrLQBF9k6Q=
github.com/onsi/gomega v1.39.0/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4=
github.com/otiai10/copy v1.14.1 h1:5/7E6qsUMBaH5AnQ0sSLzzTg1oTECmcCmT6lvF45Na8=
github.com/otiai10/copy v1.14.1/go.mod h1:oQwrEDDOci3IM8dJF0d8+jnbfPDllW6vUjNc3DoZm9I=
github.com/otiai10/mint v1.6.3 h1:87qsV/aw1F5as1eH1zS/yqHY85ANKVMgkDrf9rcxbQs=
@@ -45,20 +45,20 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM=
golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -69,20 +69,20 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=
golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss=
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=

View File

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

View File

@@ -1,6 +1,7 @@
package apps
import (
"errors"
"fmt"
"os"
"time"
@@ -48,7 +49,7 @@ func TriggerInstall() error {
}
apps, err := common.UnfilteredDokkuApps()
if err != nil {
if err != nil && !errors.Is(err, common.NoAppsExist) {
return nil
}

View File

@@ -17,9 +17,7 @@ trigger-builder-dockerfile-builder-build() {
dokku_log_info1 "Building $APP from Dockerfile"
local IMAGE=$(get_app_image_name "$APP")
local DOKKU_DOCKERFILE_CACHE_BUILD=$(config_get "$APP" "DOKKU_DOCKERFILE_CACHE_BUILD")
local DOKKU_DOCKER_BUILD_OPTS=$(config_get "$APP" "DOKKU_DOCKER_BUILD_OPTS")
local DOCKER_BUILD_LABEL_ARGS=("--label=dokku" "--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=dockerfile" "--label=com.dokku.app-name=$APP")
local DOCKER_BUILD_LABEL_ARGS=("--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=dockerfile" "--label=com.dokku.app-name=$APP" "--label=dokku")
pushd "$SOURCECODE_WORK_DIR" &>/dev/null
@@ -34,17 +32,224 @@ trigger-builder-dockerfile-builder-build() {
fi
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
DOCKER_ARGS+=" $DOKKU_GLOBAL_BUILD_ARGS"
# strip --link, --volume and -v args from DOCKER_ARGS
local DOCKER_ARGS=$(sed -e "s/^--link=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--link[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--volume=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--volume[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" -e "s/^-v[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS")
declare -a ARG_ARRAY
eval "ARG_ARRAY=($DOCKER_ARGS)"
DOCKER_ARGS=" $DOCKER_ARGS "
eval set -- "$DOCKER_ARGS"
declare -a DOCKERFILE_ARGS
while true; do
case "$1" in
--add-host)
DOCKERFILE_ARGS+=("--add-host")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--add-host=*)
DOCKERFILE_ARGS+=("--add-host" "${1#--add-host=}")
shift 1
;;
--allow)
DOCKERFILE_ARGS+=("--allow")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--allow=*)
DOCKERFILE_ARGS+=("--allow" "${1#--allow=}")
shift 1
;;
--annotation)
DOCKERFILE_ARGS+=("--annotation")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--annotation=*)
DOCKERFILE_ARGS+=("--annotation" "${1#--annotation=}")
shift 1
;;
--attest)
DOCKERFILE_ARGS+=("--attest")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--attest=*)
DOCKERFILE_ARGS+=("--attest" "${1#--attest=}")
shift 1
;;
--build-arg)
DOCKERFILE_ARGS+=("--build-arg")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--build-arg=*)
DOCKERFILE_ARGS+=("--build-arg" "${1#--build-arg=}")
shift 1
;;
--builder)
DOCKERFILE_ARGS+=("--builder")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--builder=*)
DOCKERFILE_ARGS+=("--builder" "${1#--builder=}")
shift 1
;;
--cache-from)
DOCKERFILE_ARGS+=("--cache-from")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--cache-from=*)
DOCKERFILE_ARGS+=("--cache-from" "${1#--cache-from=}")
shift 1
;;
--cache-to)
DOCKERFILE_ARGS+=("--cache-to")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--cache-to=*)
DOCKERFILE_ARGS+=("--cache-to" "${1#--cache-to=}")
shift 1
;;
--call)
DOCKERFILE_ARGS+=("--call")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--call=*)
DOCKERFILE_ARGS+=("--call" "${1#--call=}")
shift 1
;;
--cgroup-parent)
DOCKERFILE_ARGS+=("--cgroup-parent")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--cgroup-parent=*)
DOCKERFILE_ARGS+=("--cgroup-parent" "${1#--cgroup-parent=}")
shift 1
;;
--label)
DOCKERFILE_ARGS+=("--label")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--label=*)
DOCKERFILE_ARGS+=("--label" "${1#--label=}")
shift 1
;;
--network)
DOCKERFILE_ARGS+=("--network")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--network=*)
DOCKERFILE_ARGS+=("--network" "${1#--network=}")
shift 1
;;
--platform)
DOCKERFILE_ARGS+=("--platform")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--platform=*)
DOCKERFILE_ARGS+=("--platform" "${1#--platform=}")
shift 1
;;
--progress)
DOCKERFILE_ARGS+=("--progress")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--progress=*)
DOCKERFILE_ARGS+=("--progress" "${1#--progress=}")
shift 1
;;
--provenance)
DOCKERFILE_ARGS+=("--provenance")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--provenance=*)
DOCKERFILE_ARGS+=("--provenance" "${1#--provenance=}")
shift 1
;;
--sbom)
DOCKERFILE_ARGS+=("--sbom")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--sbom=*)
DOCKERFILE_ARGS+=("--sbom" "${1#--sbom=}")
shift 1
;;
--secret)
DOCKERFILE_ARGS+=("--secret")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--secret=*)
DOCKERFILE_ARGS+=("--secret" "${1#--secret=}")
shift 1
;;
--shm-size)
DOCKERFILE_ARGS+=("--shm-size")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--shm-size=*)
DOCKERFILE_ARGS+=("--shm-size" "${1#--shm-size=}")
shift 1
;;
--ssh)
DOCKERFILE_ARGS+=("--platform")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--ssh=*)
DOCKERFILE_ARGS+=("--ssh" "${1#--ssh=}")
shift 1
;;
--target)
DOCKERFILE_ARGS+=("--target")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--target=*)
DOCKERFILE_ARGS+=("--target" "${1#--target=}")
shift 1
;;
--ulimit)
DOCKERFILE_ARGS+=("--tag")
DOCKERFILE_ARGS+=("$2")
shift 2
;;
--tag=*)
DOCKERFILE_ARGS+=("--tag" "${1#--tag=}")
shift 1
;;
--check | -D | --debug | --no-cache)
DOCKERFILE_ARGS+=("$1")
shift 1
;;
*)
if [[ -n "$1" ]]; then
shift
continue
fi
break
;;
esac
done
eval "$(config_export app "$APP")"
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" ${DOKKU_DOCKER_BUILD_OPTS} -t $IMAGE .
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" "${DOCKERFILE_ARGS[@]}" --tag $IMAGE .
plugn trigger ports-set-detected "$APP" "$(fn-builder-dockerfile-get-detect-port-map "$APP" "$IMAGE" "$SOURCECODE_WORK_DIR/Dockerfile")"
if fn-plugn-trigger-exists "post-build-dockerfile"; then

View File

@@ -29,6 +29,9 @@ trigger-builder-dockerfile-builder-release() {
DOCKER_BUILD_ARGS+=("--platform=linux/amd64")
fi
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-dockerfile/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t "$IMAGE" "$TMP_WORK_DIR"; then
dokku_log_warn "Failure injecting docker labels on image"
return 1

View File

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

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
fn-builder-herokuish-ensure-cache() {
@@ -45,7 +46,10 @@ trigger-builder-herokuish-builder-build() {
NEW_DOKKU_IMAGE=$(plugn trigger builder-dokku-image "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR" "$DOKKU_IMAGE")
[[ -n "$NEW_DOKKU_IMAGE" ]] && DOKKU_IMAGE="$NEW_DOKKU_IMAGE"
local DOCKER_BUILD_LABEL_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.app-name=$APP"
local DOCKER_BUILD_LABEL_ARGS=("--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=herokuish" "--label=com.dokku.app-name=$APP" "--label=dokku")
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true)
DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"}
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/copy-source.Dockerfile" --build-arg APP_IMAGE="$DOKKU_IMAGE" --build-arg "DOKKU_APP_USER=$DOKKU_APP_USER" --build-arg "TRACE=$DOKKU_TRACE" -t $IMAGE "$SOURCECODE_WORK_DIR"; then
@@ -61,7 +65,10 @@ trigger-builder-herokuish-builder-build() {
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" --env=TRACE=true "
if [[ -n "$DOKKU_TRACE" ]]; then
DOCKER_ARGS+=" --env=TRACE=true "
DOCKER_ARGS+=" --env=BUILDPACK_XTRACE=1 "
fi
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
declare -a ARG_ARRAY

View File

@@ -30,6 +30,10 @@ trigger-builder-herokuish-builder-release() {
DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true)
DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"}
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/builder-pre-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" --build-arg "DOKKU_APP_USER=$DOKKU_APP_USER" -t "$IMAGE" "$TMP_WORK_DIR"; then
dokku_log_warn "Failure injecting environment variables"
return 1

View File

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

View File

@@ -14,7 +14,7 @@ trigger-builder-herokuish-pre-build-buildpack() {
return
fi
local DOCKER_BUILD_LABEL_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.app-name=$APP"
local DOCKER_BUILD_LABEL_ARGS=("--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=herokuish" "--label=com.dokku.app-name=$APP" "--label=dokku")
IMAGE=$(get_app_image_name "$APP")
@@ -41,6 +41,9 @@ trigger-builder-herokuish-pre-build-buildpack() {
DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true)
DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"}
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/pre-build.Dockerfile" --build-arg APP_IMAGE="$IMAGE" --build-arg "DOKKU_APP_USER=$DOKKU_APP_USER" -t $IMAGE "$TMP_WORK_DIR"; then
dokku_log_warn "Failure injecting BUILD_ENV into build environment"
return 1

View File

@@ -24,6 +24,9 @@ trigger-builder-lambda-builder-build() {
fi
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
lambda-builder build --generate-image --write-procfile --image-env=DOCKER_LAMBDA_STAY_OPEN=1 --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.image-stage=build --label=com.dokku.builder-type=lambda "--label=com.dokku.app-name=$APP" $DOKKU_GLOBAL_BUILD_ARGS --port 5000 --tag "$IMAGE" --working-directory "$SOURCECODE_WORK_DIR"
if [[ ! -f "$SOURCECODE_WORK_DIR/lambda.zip" ]]; then
dokku_log_warn "Compressed lambda.zip not detected, failed to build lambda function"

View File

@@ -22,7 +22,10 @@ trigger-builder-lambda-builder-release() {
TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")"
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
local DOCKER_BUILD_LABEL_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.app-name=$APP --label=com.dokku.image-stage=release --label=dokku"
local DOCKER_BUILD_LABEL_ARGS=("--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=release" "--label=com.dokku.builder-type=lambda" "--label=com.dokku.app-name=$APP" "--label=dokku")
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-lambda/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t "$IMAGE" "$TMP_WORK_DIR"; then
dokku_log_warn "Failure injecting docker labels on image"
return 1

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-lambda plugin"
version = "0.36.8"
version = "0.37.6"
[plugin.config]

View File

@@ -21,36 +21,233 @@ trigger-builder-nixpacks-builder-build() {
fi
local IMAGE=$(get_app_image_name "$APP")
local DOCKER_BUILD_LABEL_ARGS=("--label=dokku" "--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=nixpacks" "--label=com.dokku.app-name=$APP")
local DOCKER_BUILD_LABEL_ARGS=("--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=nixpacks" "--label=com.dokku.app-name=$APP" "--label=dokku")
pushd "$SOURCECODE_WORK_DIR" &>/dev/null
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
no_cache="$(fn-builder-nixpacks-computed-no-cache "$APP")"
NIXPACKS_ARGS=""
if [[ "$no_cache" == "true" ]]; then
NIXPACKS_ARGS="$NIXPACKS_ARGS --no-cache"
fi
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
# strip --link, --volume and -v args from DOCKER_ARGS
local DOCKER_ARGS=$(sed -e "s/^--link=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--link[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--volume=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--volume[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" -e "s/^-v[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS")
declare -a ARG_ARRAY
eval "ARG_ARRAY=($DOCKER_ARGS)"
eval "$(config_export app "$APP" --merged)"
if [[ -f "$SOURCECODE_WORK_DIR/Procfile" ]]; then
if procfile-util exists --process-type release; then
procfile-util delete --process-type release
fi
fi
# shellcheck disable=SC2086
if ! nixpacks build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" $NIXPACKS_ARGS --name "$IMAGE" "$SOURCECODE_WORK_DIR"; then
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
DOCKER_ARGS+=" $DOKKU_GLOBAL_BUILD_ARGS"
DOCKER_ARGS=" $DOCKER_ARGS "
eval set -- "$DOCKER_ARGS"
declare -a NIXPACKS_ARGS
while true; do
case "$1" in
-t | --tag)
NIXPACKS_ARGS+=("--tag")
NIXPACKS_ARGS+=("$2")
shift 2
;;
-t=* | --tag=*)
if [[ "$1" == "--tag=*" ]]; then
NIXPACKS_ARGS+=("--tag" "${1#--tag=}")
elif [[ "$1" == "-t=*" ]]; then
NIXPACKS_ARGS+=("--tag" "${1#-t=}")
fi
shift 1
;;
-i | --install-cmd)
NIXPACKS_ARGS+=("--install-cmd")
NIXPACKS_ARGS+=("$2")
shift 2
;;
-i=* | --install-cmd=*)
if [[ "$1" == "--install-cmd=*" ]]; then
NIXPACKS_ARGS+=("--install-cmd" "${1#--install-cmd=}")
elif [[ "$1" == "-i=*" ]]; then
NIXPACKS_ARGS+=("--install-cmd" "${1#-i=}")
fi
shift 1
;;
-l | --label)
NIXPACKS_ARGS+=("--label")
NIXPACKS_ARGS+=("$2")
shift 2
;;
-l=* | --label=*)
if [[ "$1" == "--label=*" ]]; then
NIXPACKS_ARGS+=("--label" "${1#--label=}")
elif [[ "$1" == "-l=*" ]]; then
NIXPACKS_ARGS+=("--label" "${1#-l=}")
fi
shift 1
;;
-b | --build-cmd)
NIXPACKS_ARGS+=("--build-cmd")
NIXPACKS_ARGS+=("$2")
shift 2
;;
-b=* | --build-cmd=*)
if [[ "$1" == "--build-cmd=*" ]]; then
NIXPACKS_ARGS+=("--build-cmd" "${1#--build-cmd=}")
elif [[ "$1" == "-b=*" ]]; then
NIXPACKS_ARGS+=("--build-cmd" "${1#-b=}")
fi
shift 1
;;
-s | --start-cmd)
NIXPACKS_ARGS+=("--start-cmd")
NIXPACKS_ARGS+=("$2")
shift 2
;;
-s=* | --start-cmd=*)
if [[ "$1" == "--start-cmd=*" ]]; then
NIXPACKS_ARGS+=("--start-cmd" "${1#--start-cmd=}")
elif [[ "$1" == "-s=*" ]]; then
NIXPACKS_ARGS+=("--start-cmd" "${1#-s=}")
fi
shift 1
;;
-p | --pkgs)
NIXPACKS_ARGS+=("--pkgs")
NIXPACKS_ARGS+=("$2")
shift 2
;;
-p=* | --pkgs=*)
if [[ "$1" == "--pkgs=*" ]]; then
NIXPACKS_ARGS+=("--pkgs" "${1#--pkgs=}")
elif [[ "$1" == "-p=*" ]]; then
NIXPACKS_ARGS+=("--pkgs" "${1#-p=}")
fi
shift 1
;;
-a | --apt)
NIXPACKS_ARGS+=("--apt")
NIXPACKS_ARGS+=("$2")
shift 2
;;
-a=* | --apt=*)
if [[ "$1" == "--apt=*" ]]; then
NIXPACKS_ARGS+=("--apt" "${1#--apt=}")
elif [[ "$1" == "-a=*" ]]; then
NIXPACKS_ARGS+=("--apt" "${1#-a=}")
fi
shift 1
;;
-e | --env)
NIXPACKS_ARGS+=("--env")
NIXPACKS_ARGS+=("$2")
shift 2
;;
-e=* | --env=*)
if [[ "$1" == "--env=*" ]]; then
NIXPACKS_ARGS+=("--env" "${1#--env=}")
elif [[ "$1" == "-e=*" ]]; then
NIXPACKS_ARGS+=("--env" "${1#-e=}")
fi
shift 1
;;
--platform)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--platform=*)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--cache-key)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--cache-key=*)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--incremental-cache-image)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--incremental-cache-image=*)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--libs)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--libs=*)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--cache-from)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--cache-from=*)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--docker-host)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--docker-host=*)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--add-host)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--add-host=*)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--docker-tls-verify)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--docker-tls-verify=*)
NIXPACKS_ARGS+=("$1")
NIXPACKS_ARGS+=("$2")
shift 2
;;
--no-cache | --inline-cache | --no-error-without-start)
NIXPACKS_ARGS+=("$1")
shift 1
;;
*)
if [[ -n "$1" ]]; then
shift
continue
fi
break
;;
esac
done
eval "$(config_export app "$APP" --merged)"
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
if ! nixpacks build "${DOCKER_BUILD_LABEL_ARGS[@]}" "${NIXPACKS_ARGS[@]}" --name "$IMAGE" "$SOURCECODE_WORK_DIR"; then
dokku_log_warn "Failure building image"
return 1
fi

View File

@@ -18,7 +18,10 @@ trigger-builder-nixpacks-builder-release() {
TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")"
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
local DOCKER_BUILD_LABEL_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.app-name=$APP --label=com.dokku.image-stage=release --label=dokku"
local DOCKER_BUILD_LABEL_ARGS=("--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=release" "--label=com.dokku.builder-type=nixpacks" "--label=com.dokku.app-name=$APP" "--label=dokku")
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-nixpacks/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t "$IMAGE" "$TMP_WORK_DIR"; then
dokku_log_warn "Failure injecting docker labels on image"
return 1

View File

@@ -38,9 +38,6 @@ cmd-builder-nixpacks-report-single() {
"--builder-nixpacks-computed-nixpackstoml-path: $(fn-builder-nixpacks-computed-nixpackstoml-path "$APP")"
"--builder-nixpacks-global-nixpackstoml-path: $(fn-builder-nixpacks-global-nixpackstoml-path "$APP")"
"--builder-nixpacks-nixpackstoml-path: $(fn-builder-nixpacks-nixpackstoml-path "$APP")"
"--builder-nixpacks-computed-no-cache: $(fn-builder-nixpacks-computed-no-cache "$APP")"
"--builder-nixpacks-global-no-cache: $(fn-builder-nixpacks-global-no-cache "$APP")"
"--builder-nixpacks-no-cache: $(fn-builder-nixpacks-no-cache "$APP")"
)
if [[ -z "$INFO_FLAG" ]]; then
@@ -91,26 +88,3 @@ fn-builder-nixpacks-nixpackstoml-path() {
fn-plugin-property-get "builder-nixpacks" "$APP" "nixpackstoml-path" ""
}
fn-builder-nixpacks-computed-no-cache() {
declare APP="$1"
file="$(fn-builder-nixpacks-no-cache "$APP")"
if [[ "$file" == "" ]]; then
file="$(fn-builder-nixpacks-global-no-cache "$APP")"
fi
echo "$file"
}
fn-builder-nixpacks-global-no-cache() {
declare APP="$1"
fn-plugin-property-get "builder-nixpacks" "--global" "no-cache" "false"
}
fn-builder-nixpacks-no-cache() {
declare APP="$1"
fn-plugin-property-get "builder-nixpacks" "$APP" "no-cache" ""
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-nixpacks plugin"
version = "0.36.8"
version = "0.37.6"
[plugin.config]

View File

@@ -9,13 +9,13 @@ cmd-builder-nixpacks-set() {
declare cmd="builder-nixpacks:set"
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" KEY="$2" VALUE="$3"
local VALID_KEYS=("nixpackstoml-path" "no-cache")
local VALID_KEYS=("nixpackstoml-path")
[[ "$APP" == "--global" ]] || verify_app_name "$APP"
[[ -z "$KEY" ]] && dokku_log_fail "No key specified"
if ! fn-in-array "$KEY" "${VALID_KEYS[@]}"; then
dokku_log_fail "Invalid key specified, valid keys include: nixpackstoml-path, no-cache"
dokku_log_fail "Invalid key specified, valid keys include: nixpackstoml-path"
fi
if [[ -n "$VALUE" ]]; then

View File

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

View File

@@ -38,33 +38,264 @@ trigger-builder-pack-builder-build() {
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" --env=TRACE=true "
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" --env=TRACE=true "
DOCKER_ARGS=" $DOCKER_ARGS "
declare -a ARG_ARRAY
eval "ARG_ARRAY=($DOCKER_ARGS)"
eval set -- "$DOCKER_ARGS"
declare -a PACK_ARGS
while true; do
case "$1" in
--volume=* | -v=*)
PACK_ARGS+=("$1")
shift
-b | --buildpack)
PACK_ARGS+=("--buildpack")
PACK_ARGS+=("$2")
shift 2
;;
-b=* | --buildpack=*)
if [[ "$1" == "--buildpack=*" ]]; then
PACK_ARGS+=("--buildpack" "${1#--buildpack=}")
elif [[ "$1" == "-b=*" ]]; then
PACK_ARGS+=("--buildpack" "${1#-b=}")
fi
shift 1
;;
-r | --buildpack-registry)
PACK_ARGS+=("--buildpack-registry")
PACK_ARGS+=("$2")
shift 2
;;
-r=* | --buildpack-registry=*)
if [[ "$1" == "--buildpack-registry=*" ]]; then
PACK_ARGS+=("--buildpack-registry" "${1#--buildpack-registry=}")
elif [[ "$1" == "-r=*" ]]; then
PACK_ARGS+=("--buildpack-registry" "${1#-r=}")
fi
shift 2
;;
-e | --env)
PACK_ARGS+=("--env")
PACK_ARGS+=("$2")
shift 2
;;
-e=* | --env=*)
if [[ "$1" == "--env=*" ]]; then
PACK_ARGS+=("--env" "${1#--env=}")
elif [[ "$1" == "-e=*" ]]; then
PACK_ARGS+=("--env" "${1#-e=}")
fi
shift 1
;;
-t | --tag)
PACK_ARGS+=("--tag")
PACK_ARGS+=("$2")
shift 2
;;
-t=* | --tag=*)
if [[ "$1" == "--tag=*" ]]; then
PACK_ARGS+=("--tag" "${1#--tag=}")
elif [[ "$1" == "-t=*" ]]; then
PACK_ARGS+=("--tag" "${1#-t=}")
fi
shift 1
;;
--volume | -v)
PACK_ARGS+=("--volume")
PACK_ARGS+=("$2")
shift 2
;;
--volume=* | -v=*)
if [[ "$1" == "--volume=*" ]]; then
PACK_ARGS+=("--volume" "${1#--volume=}")
elif [[ "$1" == "-v=*" ]]; then
PACK_ARGS+=("--volume" "${1#-v=}")
fi
shift 1
;;
--cache)
PACK_ARGS+=("--cache")
PACK_ARGS+=("$2")
shift 2
;;
--cache=*)
PACK_ARGS+=("--cache" "${1#--cache=}")
shift 1
;;
--cache-image)
PACK_ARGS+=("--cache-image")
PACK_ARGS+=("$2")
shift 2
;;
--cache-image=*)
PACK_ARGS+=("--cache-image" "${1#--cache-image=}")
shift 1
;;
--creation-time)
PACK_ARGS+=("--creation-time")
PACK_ARGS+=("$2")
shift 2
;;
--creation-time=*)
PACK_ARGS+=("--creation-time" "${1#--creation-time=}")
shift 1
;;
--env-file)
PACK_ARGS+=("--env-file")
PACK_ARGS+=("$2")
shift 2
;;
--env-file=*)
PACK_ARGS+=("--env-file" "${1#--env-file=}")
shift 1
;;
--extension)
PACK_ARGS+=("--extension")
PACK_ARGS+=("$2")
shift 2
;;
--extension=*)
PACK_ARGS+=("--extension" "${1#--extension=}")
shift 1
;;
--gid)
PACK_ARGS+=("--gid")
PACK_ARGS+=("$2")
shift 2
;;
--gid=*)
PACK_ARGS+=("--gid" "${1#--gid=}")
shift 1
;;
--insecure-registry)
PACK_ARGS+=("--insecure-registry")
PACK_ARGS+=("$2")
shift 2
;;
--insecure-registry=*)
PACK_ARGS+=("--insecure-registry" "${1#--insecure-registry=}")
shift 1
;;
--lifecycle-image)
PACK_ARGS+=("--lifecycle-image")
PACK_ARGS+=("$2")
shift 2
;;
--lifecycle-image=*)
PACK_ARGS+=("--lifecycle-image" "${1#--lifecycle-image=}")
shift 1
;;
--network)
PACK_ARGS+=("--network")
PACK_ARGS+=("$2")
shift 2
;;
--network=*)
PACK_ARGS+=("--network" "${1#--network=}")
shift 1
;;
--platform)
PACK_ARGS+=("--platform")
PACK_ARGS+=("$2")
shift 2
;;
--platform=*)
PACK_ARGS+=("--platform" "${1#--platform=}")
shift 1
;;
--post-buildpack)
PACK_ARGS+=("--post-buildpack")
PACK_ARGS+=("$2")
shift 2
;;
--post-buildpack=*)
PACK_ARGS+=("--post-buildpack" "${1#--post-buildpack=}")
shift 1
;;
--pre-buildpack)
PACK_ARGS+=("--pre-buildpack")
PACK_ARGS+=("$2")
shift 2
;;
--pre-buildpack=*)
PACK_ARGS+=("--pre-buildpack" "${1#--pre-buildpack=}")
shift 1
;;
--previous-image)
PACK_ARGS+=("--previous-image")
PACK_ARGS+=("$2")
shift 2
;;
--previous-image=*)
PACK_ARGS+=("--previous-image" "${1#--previous-image=}")
shift 1
;;
--pull-policy)
PACK_ARGS+=("--pull-policy")
PACK_ARGS+=("$2")
shift 2
;;
--pull-policy=*)
PACK_ARGS+=("--pull-policy" "${1#--pull-policy=}")
shift 1
;;
--run-image)
PACK_ARGS+=("--run-image")
PACK_ARGS+=("$2")
shift 2
;;
--run-image=*)
PACK_ARGS+=("--run-image" "${1#--run-image=}")
shift 1
;;
--uid)
PACK_ARGS+=("--uid")
PACK_ARGS+=("$2")
shift 2
;;
--uid=*)
PACK_ARGS+=("--uid" "${1#--uid=}")
shift 1
;;
--workspace)
PACK_ARGS+=("--workspace")
PACK_ARGS+=("$2")
shift 2
;;
--workspace=*)
PACK_ARGS+=("--workspace" "${1#--workspace=}")
shift 1
;;
--clear-cache | --disable-system-buildpacks | --publish | --trust-builder | --trust-extra-buildpacks | --userns-host)
PACK_ARGS+=("$1")
shift 1
;;
*)
if [[ -n "$1" ]]; then
shift
continue
fi
break
;;
esac
done
if [ -n "$BUILDPACK_URL" ]; then
PACK_ARGS+=("--builder")
PACK_ARGS+=("$BUILDPACK_URL")
elif [ -f "$SOURCECODE_WORK_DIR/.buildpacks" ]; then
while read -r buildpack; do
if [ -z "$buildpack" ]; then
continue
fi
PACK_ARGS+=("--builder")
PACK_ARGS+=("$buildpack")
done <"$SOURCECODE_WORK_DIR/.buildpacks"
fi
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
pack build "$IMAGE" --builder "$DOKKU_CNB_BUILDER" --path "$SOURCECODE_WORK_DIR" --default-process web "${PACK_ARGS[@]}" "${ENV_ARGS[@]}"
docker-image-labeler relabel --label=dokku --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.image-stage=build --label=com.dokku.builder-type=pack --label=com.dokku.app-name=$APP "$IMAGE"

View File

@@ -12,11 +12,6 @@ trigger-builder-pack-builder-detect() {
echo "pack"
return
fi
if [[ "$(config_get "$APP" DOKKU_CNB_EXPERIMENTAL || true)" == "1" ]]; then
echo "pack"
return
fi
}
trigger-builder-pack-builder-detect "$@"

View File

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

View File

@@ -0,0 +1,149 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/builder-railpack/internal-functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-builder-railpack-builder-build() {
declare desc="builder-railpack builder-build plugin trigger"
declare trigger="builder-build"
declare BUILDER_TYPE="$1" APP="$2" SOURCECODE_WORK_DIR="$3"
if [[ "$BUILDER_TYPE" != "railpack" ]]; then
return
fi
dokku_log_info1 "Building $APP from railpack"
if ! command -v "railpack" &>/dev/null; then
dokku_log_fail "Missing railpack, install it"
fi
local IMAGE=$(get_app_image_name "$APP")
local DOCKER_BUILD_LABEL_ARGS=("--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=railpack" "--label=com.dokku.app-name=$APP" "--label=dokku")
pushd "$SOURCECODE_WORK_DIR" &>/dev/null
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
if [[ -f "$SOURCECODE_WORK_DIR/Procfile" ]]; then
if procfile-util exists --process-type release; then
procfile-util delete --process-type release
fi
fi
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
DOCKER_ARGS=" $DOCKER_ARGS "
eval set -- "$DOCKER_ARGS"
declare -a RAILPACK_ARGS
while true; do
case "$1" in
--platform)
RAILPACK_ARGS+=("--platform")
RAILPACK_ARGS+=("$2")
shift 2
;;
--platform=*)
RAILPACK_ARGS+=("--platform" "${1#--platform=}")
shift 1
;;
--progress)
RAILPACK_ARGS+=("--progress")
RAILPACK_ARGS+=("$2")
shift 2
;;
--progress=*)
RAILPACK_ARGS+=("--progress" "${1#--progress=}")
shift 1
;;
--cache-key)
RAILPACK_ARGS+=("--cache-key")
RAILPACK_ARGS+=("$2")
shift 2
;;
--cache-key=*)
RAILPACK_ARGS+=("--cache-key" "${1#--cache-key=}")
shift 1
;;
-e | --env)
RAILPACK_ARGS+=("--env")
RAILPACK_ARGS+=("$2")
shift 2
;;
-e=* | --env=*)
if [[ "$1" == "--env=*" ]]; then
RAILPACK_ARGS+=("--env" "${1#--env=}")
elif [[ "$1" == "--e=*" ]]; then
RAILPACK_ARGS+=("--env" "${1#-e=}")
fi
shift 1
;;
--previous)
RAILPACK_ARGS+=("--previous")
RAILPACK_ARGS+=("$2")
shift 2
;;
--previous=*)
RAILPACK_ARGS+=("--previous" "${1#--previous=}")
shift 1
;;
--build-cmd)
RAILPACK_ARGS+=("--build-cmd")
RAILPACK_ARGS+=("$2")
shift 2
;;
--build-cmd=*)
RAILPACK_ARGS+=("--build-cmd" "${1#--build-cmd=}")
shift 1
;;
--start-cmd)
RAILPACK_ARGS+=("--start-cmd")
RAILPACK_ARGS+=("$2")
shift 2
;;
--start-cmd=*)
RAILPACK_ARGS+=("--start-cmd" "${1#--start-cmd=}")
shift 1
;;
---show-plan | --error-missing-start)
RAILPACK_ARGS+=("$1")
shift 1
;;
*)
if [[ -n "$1" ]]; then
shift
continue
fi
break
;;
esac
done
eval "$(config_export app "$APP" --merged)"
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
if ! railpack build "${RAILPACK_ARGS[@]}" --name "$IMAGE-build" "$SOURCECODE_WORK_DIR"; then
dokku_log_warn "Failure building image"
return 1
fi
if ! suppress_output "$DOCKER_BIN" image build -f "$PLUGIN_AVAILABLE_PATH/builder-railpack/dockerfiles/builder-build.Dockerfile" --build-arg APP_IMAGE="$IMAGE-build" "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -t "$IMAGE" "$SOURCECODE_WORK_DIR"; then
"$DOCKER_BIN" image remove "$IMAGE-build"
dokku_log_warn "Failure injecting docker labels and custom entrypoint on image"
return 1
fi
"$DOCKER_BIN" image remove "$IMAGE-build"
plugn trigger post-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
popd &>/dev/null || pushd "/tmp" >/dev/null
}
trigger-builder-railpack-builder-build "$@"

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
source "$PLUGIN_AVAILABLE_PATH/config/functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-builder-railpack-builder-detect() {
declare desc="builder-railpack builder-detect plugin trigger"
declare trigger="builder-detect"
declare APP="$1" SOURCECODE_WORK_DIR="$2"
if [[ -f "$SOURCECODE_WORK_DIR/railpack.json" ]]; then
echo "railpack"
return
fi
}
trigger-builder-railpack-builder-detect "$@"

View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-builder-railpack-builder-release() {
declare desc="builder-railpack builder-release plugin trigger"
declare trigger="builder-release"
declare BUILDER_TYPE="$1" APP="$2" IMAGE_TAG="$3"
if [[ "$BUILDER_TYPE" != "railpack" ]]; then
return
fi
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
plugn trigger pre-release-builder "$BUILDER_TYPE" "$APP" "$IMAGE"
TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")"
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
local DOCKER_BUILD_LABEL_ARGS=("--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=release" "--label=com.dokku.builder-type=railpack" "--label=com.dokku.app-name=$APP" "--label=dokku")
local DOCKER_CONFIG
DOCKER_CONFIG="$(fn-registry-docker-config-dir "$APP")"
[[ -n "$DOCKER_CONFIG" ]] && export DOCKER_CONFIG
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-railpack/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t "$IMAGE" "$TMP_WORK_DIR"; then
dokku_log_warn "Failure injecting docker labels on image"
return 1
fi
plugn trigger post-release-builder "$BUILDER_TYPE" "$APP" "$IMAGE"
}
trigger-builder-railpack-builder-release "$@"

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/builder-railpack/help-functions"
case "$1" in
help | builder-railpack:help)
cmd-builder-railpack-help "$@"
;;
*)
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
;;
esac

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/builder-railpack/internal-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-builder-railpack-core-post-extract() {
declare desc="builder-railpack post-extract plugin trigger"
declare trigger="post-extract"
declare APP="$1" SOURCECODE_WORK_DIR="$2"
local NEW_RAILPACK_JSON="$(fn-builder-railpack-computed-railpackjson-path "$APP")"
pushd "$TMP_WORK_DIR" >/dev/null
if [[ -z "$NEW_RAILPACK_JSON" ]]; then
return
fi
if [[ ! -f "$NEW_RAILPACK_JSON" ]]; then
rm -f railpack.json
return
fi
if [[ "$NEW_RAILPACK_JSON" != "railpack.json" ]]; then
mv "$NEW_RAILPACK_JSON" railpack.json
fi
popd &>/dev/null || pushd "/tmp" >/dev/null
}
trigger-builder-railpack-core-post-extract "$@"

View File

@@ -0,0 +1,4 @@
ARG APP_IMAGE
FROM $APP_IMAGE
ENTRYPOINT []

View File

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

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