diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 026074260..76bbffc3d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1527e5964..7e6917f0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 68c42ae64..38984b343 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e58b3548c..35a5f7bb9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ecbf36432..3abf5ef8b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e0ea6e94b..b84ccdcd5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/Dockerfile b/Dockerfile index f598c5230..5c9b063aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ diff --git a/HISTORY.md b/HISTORY.md index 94ae9b452..b4d427000 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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: diff --git a/README.md b/README.md index 94e8c4814..39c798aaa 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/common.mk b/common.mk index 226d35e60..157a9d6b8 100644 --- a/common.mk +++ b/common.mk @@ -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) diff --git a/contrib/build-docs b/contrib/build-docs index f454416cd..db0431023 100755 --- a/contrib/build-docs +++ b/contrib/build-docs @@ -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 "$@" diff --git a/contrib/build-dokku.Dockerfile b/contrib/build-dokku.Dockerfile index 04342fc45..7f08388fa 100644 --- a/contrib/build-dokku.Dockerfile +++ b/contrib/build-dokku.Dockerfile @@ -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 diff --git a/contrib/dependencies.json b/contrib/dependencies.json index cf19569ca..119420746 100644 --- a/contrib/dependencies.json +++ b/contrib/dependencies.json @@ -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" } } ] diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index d2c7c4f04..2b43d004d 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -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) diff --git a/debian/control b/debian/control index ede9715b6..104d4817d 100644 --- a/debian/control +++ b/debian/control @@ -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 Description: Docker-powered PaaS that helps build and manage the lifecycle of applications Dokku is an extensible, open source Platform as a Service diff --git a/debian/postinst b/debian/postinst index f3bcee171..8bef386ac 100755 --- a/debian/postinst +++ b/debian/postinst @@ -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 ;; *) diff --git a/docker/etc/my_init.d/10_dokku_init b/docker/etc/my_init.d/10_dokku_init index 6307ddefa..38948d4af 100755 --- a/docker/etc/my_init.d/10_dokku_init +++ b/docker/etc/my_init.d/10_dokku_init @@ -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 diff --git a/docker/etc/sudoers.d/dokku-docker b/docker/etc/sudoers.d/dokku-docker index bebd88538..f3dc76faa 100644 --- a/docker/etc/sudoers.d/dokku-docker +++ b/docker/etc/sudoers.d/dokku-docker @@ -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 diff --git a/docker/usr/local/bin/railpack b/docker/usr/local/bin/railpack new file mode 100644 index 000000000..35bee71d2 --- /dev/null +++ b/docker/usr/local/bin/railpack @@ -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 "$@" diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..08ce6096d --- /dev/null +++ b/docs/README.md @@ -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 diff --git a/docs/_build/Dockerfile b/docs/_build/Dockerfile index e07981907..d30d0700f 100644 --- a/docs/_build/Dockerfile +++ b/docs/_build/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.14.0-alpine +FROM python:3.14.3-alpine WORKDIR /usr/src/app diff --git a/docs/_build/requirements.txt b/docs/_build/requirements.txt index a4e351803..43407bc6c 100644 --- a/docs/_build/requirements.txt +++ b/docs/_build/requirements.txt @@ -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 diff --git a/docs/advanced-usage/docker-options.md b/docs/advanced-usage/docker-options.md index 1c8664cbb..24b24a00c 100644 --- a/docs/advanced-usage/docker-options.md +++ b/docs/advanced-usage/docker-options.md @@ -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: diff --git a/docs/advanced-usage/plugin-management.md b/docs/advanced-usage/plugin-management.md index 0266075d2..2dea44e31 100644 --- a/docs/advanced-usage/plugin-management.md +++ b/docs/advanced-usage/plugin-management.md @@ -6,7 +6,7 @@ ``` plugin:disable # Disable an installed plugin (third-party only) plugin:enable # 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 # 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 diff --git a/docs/advanced-usage/registry-management.md b/docs/advanced-usage/registry-management.md index 8e2eef8f6..8f33ee319 100644 --- a/docs/advanced-usage/registry-management.md +++ b/docs/advanced-usage/registry-management.md @@ -4,9 +4,10 @@ > New as of 0.25.0 ``` -registry:login [--password-stdin] [] # Login to a docker registry -registry:report [] [] # Displays a registry report for one or more apps -registry:set () # Set or clear a registry property for an app +registry:login [--global|--password-stdin] [] [] # Login to a docker registry +registry:logout [--global] [] # Logout from a docker registry +registry:report [] [] # Displays a registry report for one or more apps +registry:set |--global () # 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. diff --git a/docs/appendices/0.23.0-migration-guide.md b/docs/appendices/0.23.0-migration-guide.md index b46cb8bc4..2853eafde 100644 --- a/docs/appendices/0.23.0-migration-guide.md +++ b/docs/appendices/0.23.0-migration-guide.md @@ -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. diff --git a/docs/appendices/0.37.0-migration-guide.md b/docs/appendices/0.37.0-migration-guide.md new file mode 100644 index 000000000..b06b9c81d --- /dev/null +++ b/docs/appendices/0.37.0-migration-guide.md @@ -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. diff --git a/docs/appendices/file-formats/app-json.md b/docs/appendices/file-formats/app-json.md index 189a892b8..53924fabc 100644 --- a/docs/appendices/file-formats/app-json.md +++ b/docs/appendices/file-formats/app-json.md @@ -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 diff --git a/docs/appendices/file-formats/railpack-json.md b/docs/appendices/file-formats/railpack-json.md new file mode 100644 index 000000000..d6e390fb4 --- /dev/null +++ b/docs/appendices/file-formats/railpack-json.md @@ -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. diff --git a/docs/assets/favicons/browserconfig.xml b/docs/assets/favicons/browserconfig.xml index 5f8e8a4e5..b5acbe5b7 100644 --- a/docs/assets/favicons/browserconfig.xml +++ b/docs/assets/favicons/browserconfig.xml @@ -2,10 +2,10 @@ - - - - + + + + #da532c diff --git a/docs/assets/favicons/manifest.json b/docs/assets/favicons/manifest.json index cb2a5dbaa..4be5bd1d0 100644 --- a/docs/assets/favicons/manifest.json +++ b/docs/assets/favicons/manifest.json @@ -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" diff --git a/docs/assets/style.css b/docs/assets/style.css index c996d55b5..b05038198 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -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 { diff --git a/docs/assets/versions.json b/docs/assets/versions.json index 6c9e7a063..b4e2d13b2 100644 --- a/docs/assets/versions.json +++ b/docs/assets/versions.json @@ -33,6 +33,7 @@ "0.33.9", "0.34.9", "0.35.20", - "0.36.8" + "0.36.11", + "0.37.6" ] } diff --git a/docs/community/plugins.md b/docs/community/plugins.md index cf6ce1d69..4d39680db 100644 --- a/docs/community/plugins.md +++ b/docs/community/plugins.md @@ -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)1 | [fomojola][] | 0.8.1+ | | [Deploy Webhook](https://github.com/IdeaSynthesis/dokku-deploy-webhook)2 | [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 diff --git a/docs/configuration/environment-variables.md b/docs/configuration/environment-variables.md index d2c21fd50..dd805bd0f 100644 --- a/docs/configuration/environment-variables.md +++ b/docs/configuration/environment-variables.md @@ -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`
`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`
`~dokku/.dokkurc`
`~dokku/.dokkurc/*`
`dokku config:set` | | diff --git a/docs/deployment/builders/buildpack-management.md b/docs/deployment/builders/buildpack-management.md new file mode 100644 index 000000000..c577e26c9 --- /dev/null +++ b/docs/deployment/builders/buildpack-management.md @@ -0,0 +1,174 @@ +# Buildpacks Management + +> [!NOTE] +> Buildpacks commands apply to both herokuish and CNB-based builds + +``` +buildpacks:add [--index 1] # Add new app buildpack while inserting into list of buildpacks if necessary +buildpacks:clear # Clear all buildpacks set on the app +buildpacks:list # List all buildpacks for an app +buildpacks:remove # Remove a buildpack set on the app +buildpacks:report [] [] # Displays a buildpack report for one or more apps +buildpacks:set [--index 1] # 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 +``` diff --git a/docs/deployment/builders/cloud-native-buildpacks.md b/docs/deployment/builders/cloud-native-buildpacks.md index 83a3ec407..f6a3ebb83 100644 --- a/docs/deployment/builders/cloud-native-buildpacks.md +++ b/docs/deployment/builders/cloud-native-buildpacks.md @@ -14,8 +14,8 @@ buildpacks:set-property [--global|] # 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: diff --git a/docs/deployment/builders/dockerfiles.md b/docs/deployment/builders/dockerfiles.md index 64b3c4726..ec1b7b5ee 100644 --- a/docs/deployment/builders/dockerfiles.md +++ b/docs/deployment/builders/dockerfiles.md @@ -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] diff --git a/docs/deployment/builders/herokuish-buildpacks.md b/docs/deployment/builders/herokuish-buildpacks.md index f35b5e687..dfaedfbd2 100644 --- a/docs/deployment/builders/herokuish-buildpacks.md +++ b/docs/deployment/builders/herokuish-buildpacks.md @@ -4,12 +4,6 @@ > Subcommands new as of 0.15.0 ``` -buildpacks:add [--index 1] # Add new app buildpack while inserting into list of buildpacks if necessary -buildpacks:clear # Clear all buildpacks set on the app -buildpacks:list # List all buildpacks for an app -buildpacks:remove # Remove a buildpack set on the app -buildpacks:report [] [] # Displays a buildpack report for one or more apps -buildpacks:set [--index 1] # Set new app buildpack at a given position defaulting to the first buildpack if no index is specified buildpacks:set-property [--global|] # 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. \ No newline at end of file diff --git a/docs/deployment/builders/nixpacks.md b/docs/deployment/builders/nixpacks.md index 46559ca68..945b424c3 100644 --- a/docs/deployment/builders/nixpacks.md +++ b/docs/deployment/builders/nixpacks.md @@ -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 ``` diff --git a/docs/deployment/builders/railpack.md b/docs/deployment/builders/railpack.md new file mode 100644 index 000000000..d7aef6d5b --- /dev/null +++ b/docs/deployment/builders/railpack.md @@ -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 +``` diff --git a/docs/deployment/methods/git.md b/docs/deployment/methods/git.md index eb46b3261..b27371a07 100644 --- a/docs/deployment/methods/git.md +++ b/docs/deployment/methods/git.md @@ -10,7 +10,7 @@ git:from-archive [--archive-type ARCHIVE_TYPE] [ [ ] # 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] [ ] # Updates an app's git repository with a docker image loaded from stdin -git:sync [--build|build-if-changes] [] # Clone or fetch an app from remote git repo +git:sync [--build|--build-if-changes] [--skip-deploy-branch] [] # Clone or fetch an app from remote git repo git:initialize # Initialize a git repository for an app git:public-key # Outputs the dokku public deploy key git:report [] [] # 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] diff --git a/docs/deployment/methods/image.md b/docs/deployment/methods/image.md index aca831f9b..bc180a9f7 100644 --- a/docs/deployment/methods/image.md +++ b/docs/deployment/methods/image.md @@ -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: diff --git a/docs/deployment/remote-commands.md b/docs/deployment/remote-commands.md index beebfde22..283ea2364 100644 --- a/docs/deployment/remote-commands.md +++ b/docs/deployment/remote-commands.md @@ -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. diff --git a/docs/deployment/schedulers/k3s.md b/docs/deployment/schedulers/k3s.md index 2846949e9..975c51061 100644 --- a/docs/deployment/schedulers/k3s.md +++ b/docs/deployment/schedulers/k3s.md @@ -7,12 +7,15 @@ scheduler-k3s:annotations:set () [--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 [<--metadata key=value>...], Set or clear a scheduler-k3s autoscaling keda trigger authentication resource for an app scheduler-k3s:autoscaling-auth:report [--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 () [--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 () [--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 [--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 # Removes a node profile from the k3s cluster scheduler-k3s:report [] [] # Displays a scheduler-k3s report for one or more apps scheduler-k3s:set [|--global] () # 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 ` 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-` 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] diff --git a/docs/development/architecture.md b/docs/development/architecture.md new file mode 100644 index 000000000..2e8cdf9eb --- /dev/null +++ b/docs/development/architecture.md @@ -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 + └── / # Per-plugin data + └── / # Per-app properties + +$DOKKU_ROOT (~dokku by default) +├── / # 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.toml # Plugin metadata (description, version) +├── commands # Help output and catch-all command handler +├── subcommands/ # Individual command implementations +│ ├── default # Default command (e.g., `dokku apps`) +│ └── # 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 [args...]` +2. plugn searches `$PLUGIN_ENABLED_PATH/*/` for files named `` +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/ | +| 4. Fall back to commands scripts | ++-------------------+-------------------+ + | + v ++-------------------+-------------------+ +| plugins/apps/subcommands/list | +| (executes the actual command) | ++-------------------+-------------------+ +``` + +**Command resolution order:** + +1. Check `$PLUGIN_ENABLED_PATH//subcommands/default` for the default command +2. Check `$PLUGIN_ENABLED_PATH//subcommands/` 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/// +``` + +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//`: + +- `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 diff --git a/docs/development/plugin-triggers.md b/docs/development/plugin-triggers.md index 43bbab731..35e809137 100644 --- a/docs/development/plugin-triggers.md +++ b/docs/development/plugin-triggers.md @@ -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] diff --git a/docs/development/release-process.md b/docs/development/release-process.md index 920aed1b1..2666efbf6 100644 --- a/docs/development/release-process.md +++ b/docs/development/release-process.md @@ -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' diff --git a/docs/getting-started/install/docker.md b/docs/getting-started/install/docker.md index 3e9b1993d..76b22b675 100644 --- a/docs/getting-started/install/docker.md +++ b/docs/getting-started/install/docker.md @@ -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 diff --git a/docs/getting-started/installation/index.md b/docs/getting-started/installation/index.md index 74badc8d6..87a098384 100644 --- a/docs/getting-started/installation/index.md +++ b/docs/getting-started/installation/index.md @@ -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. diff --git a/docs/getting-started/upgrading/index.md b/docs/getting-started/upgrading/index.md index 7effb6010..7c3ae989d 100644 --- a/docs/getting-started/upgrading/index.md +++ b/docs/getting-started/upgrading/index.md @@ -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) diff --git a/docs/home.html b/docs/home.html index b61aa2518..8480c6a6c 100644 --- a/docs/home.html +++ b/docs/home.html @@ -10,26 +10,26 @@ Dokku - The smallest PaaS implementation you've ever seen - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + @@ -38,7 +38,7 @@ - + @@ -98,7 +98,7 @@
-
Latest release v0.36.8
+
Latest release v0.37.6

An open source PAAS alternative to Heroku.

Dokku helps you build and manage the lifecycle of applications from building to scaling.

@@ -125,7 +125,7 @@

$ - sudo DOKKU_TAG=v0.36.8 bash bootstrap.sh + sudo DOKKU_TAG=v0.37.6 bash bootstrap.sh


diff --git a/docs/networking/proxies/caddy.md b/docs/networking/proxies/caddy.md index b56ab994d..454086960 100644 --- a/docs/networking/proxies/caddy.md +++ b/docs/networking/proxies/caddy.md @@ -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 [] [] # 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 diff --git a/docs/networking/proxies/haproxy.md b/docs/networking/proxies/haproxy.md index eda8e27bd..13b0f2272 100644 --- a/docs/networking/proxies/haproxy.md +++ b/docs/networking/proxies/haproxy.md @@ -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. diff --git a/docs/networking/proxies/nginx.md b/docs/networking/proxies/nginx.md index bd6b5d92a..330f5fa0f 100644 --- a/docs/networking/proxies/nginx.md +++ b/docs/networking/proxies/nginx.md @@ -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 | diff --git a/docs/networking/proxies/openresty.md b/docs/networking/proxies/openresty.md index 1a275de05..d1597be95 100644 --- a/docs/networking/proxies/openresty.md +++ b/docs/networking/proxies/openresty.md @@ -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. diff --git a/docs/networking/proxies/traefik.md b/docs/networking/proxies/traefik.md index 3d8fe76f5..5e13daa1a 100644 --- a/docs/networking/proxies/traefik.md +++ b/docs/networking/proxies/traefik.md @@ -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: diff --git a/docs/processes/one-off-tasks.md b/docs/processes/one-off-tasks.md index 1df42652c..f3f699111 100644 --- a/docs/processes/one-off-tasks.md +++ b/docs/processes/one-off-tasks.md @@ -1,8 +1,8 @@ # One-off Tasks ``` -run [-e|--env KEY=VALUE] [--no-tty] # Run a command in a new container using the current app image -run:detached [-e|-env KEY=VALUE] [--force-tty] # Run a command in a new detached container using the current app image +run [-e|--env KEY=VALUE] [--no-tty] [--ttl-seconds SECONDS] # Run a command in a new container using the current app image +run:detached [-e|-env KEY=VALUE] [--force-tty] [--ttl-seconds SECONDS] # Run a command in a new detached container using the current app image run:list [--format json|stdout] [] # List all run containers for an app run:logs [-h] [-t] [-n num] [-q] # Display recent log output for run containers run:stop # 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`: diff --git a/docs/processes/scheduled-cron-tasks.md b/docs/processes/scheduled-cron-tasks.md index 76c3f2232..e9473312d 100644 --- a/docs/processes/scheduled-cron-tasks.md +++ b/docs/processes/scheduled-cron-tasks.md @@ -6,8 +6,10 @@ ``` cron:list [--format json|stdout] # List scheduled cron tasks for an app cron:report [] [] # Display report about an app +cron:resume # Resume a cron task cron:run [--detach] # Run a cron task on the fly cron:set [--global|] # Set or clear a cron property for an app +cron:suspend # 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. diff --git a/docs/template.html b/docs/template.html index 66a235b25..e47da406b 100644 --- a/docs/template.html +++ b/docs/template.html @@ -9,26 +9,26 @@ Dokku - {{DOC_TITLE}} - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + +