Commit Graph

13479 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
63f0aaa0cf docs: fix reference to when the build plugin was introduced 2026-04-30 14:39:02 -04:00
Dokku Bot
7dfe8dd336 Release 0.38.0
# History

## 0.38.0

Install/update via the bootstrap script:

```shell
wget -NP . https://dokku.com/install/v0.38.0/bootstrap.sh
sudo DOKKU_TAG=v0.38.0 bash bootstrap.sh
```

See the [0.38.0 migration guide](/docs/appendices/0.38.0-migration-guide.md) for more information on migrating to 0.38.0.

### Bug Fixes

- #8533: @josegonzalez Split env config and image pull secret into separate helm releases
- #8530: @josegonzalez Split multi-flag input in docker-options
- #8528: @josegonzalez Skip retiring images still in use by app containers
- #8525: @josegonzalez Add launcher entrypoint for CNB images on dokku run and cron:run
- #8522: @josegonzalez Only emit keda fallback when a non-cpu/memory trigger exists
- #8515: @josegonzalez Fix vector mount directory config
- #8508: @josegonzalez Preserve all domains when renaming an app
- #8507: @josegonzalez Retire orphaned containers when scaling down

### New Features

- #8538: @josegonzalez Add scheduler-aware named storage entries
- #8527: @josegonzalez Accept --global on :report subcommands
- #8524: @josegonzalez Pre-validate custom nginx.conf.sigil during core-post-extract
- #8523: @josegonzalez Support resource limits on the build container
- #8517: @josegonzalez Send SIGTERM to old containers immediately on deploy
- #8516: @josegonzalez Scope docker-options to specific procfile processes
- #8509: @josegonzalez Ship default catch-all site on fresh apt install
- #8506: @josegonzalez Add --format json to git:report and nginx:report
- #8505: @josegonzalez Add git:auth-status to check netrc match
- #8493: @josegonzalez Generate 502 config for apps without web listeners
- #8404: @josegonzalez Upgrade vector chart from 0.42.0 to 0.52.0
- #8403: @josegonzalez Upgrade ingress-nginx chart from 4.10.0 to 4.15.1
- #8402: @josegonzalez Upgrade keda to 2.19.0 and keda-add-ons-http to 0.12.2
- #8259: @josegonzalez Add post-create support for env key in app.json
- #8157: @josegonzalez Add support for specifying buildpacks via app.json
- #8154: @josegonzalez Enable live-restore by default when installing Dokku
- #3697: @josegonzalez Migrate builds plugin to go and track per-build records

### Refactors

- #8514: @josegonzalez Migrate docker-options subcommands to go
- #6716: @josegonzalez Move app and global ENV files to consolidated config path

### Dependencies

- #8541: @dependabot[bot] chore(deps): bump traefik from v3.6.14 to v3.6.15 in /plugins/traefik-vhosts
- #8537: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.43 to 2.11.44 in /plugins/scheduler-k3s
- #8535: @dependabot[bot] chore(deps): bump github.com/onsi/gomega from 1.39.1 to 1.40.0 in /plugins/common
- #8529: @josegonzalez chore: bump dokku/netrc to v0.11.0
- #8520: @dependabot[bot] chore(deps): bump packaging from 26.1 to 26.2 in /docs/_build
- #8510: @dependabot[bot] chore(deps): bump packaging from 26.1 to 26.2 in /docs/_build
- #8503: @josegonzalez Bump dependency versions and add daily updater workflow
- #8502: @josegonzalez Bump go version to 1.26.2
- #8495: @dependabot[bot] chore(deps): bump k8s.io/apimachinery from 0.35.4 to 0.36.0 in /plugins/scheduler-k3s
- #8494: @dependabot[bot] chore(deps): bump dokku/openresty-docker-proxy from 0.9.3 to 0.10.0 in /plugins/openresty-vhosts
- #8490: @dependabot[bot] chore(deps): bump k8s.io/kubernetes from 1.35.4 to 1.36.0 in /plugins/scheduler-k3s

### Other

- #8498: @josegonzalez Migrate environment variables to plugin properties
v0.38.0
2026-04-30 17:38:51 +00:00
Jose Diaz-Gonzalez
c95c9f8518 Merge pull request #8501 from dokku/0.38-release
Release 0.38.0
2026-04-30 13:36:29 -04:00
Jose Diaz-Gonzalez
c0794abc30 Merge pull request #8538 from dokku/6814-k3s-plugin-add-pv-option
Add scheduler-aware named storage entries
2026-04-30 12:10:30 -04:00
Jose Diaz-Gonzalez
f020b76e11 Merge pull request #3697 from dokku/track-deploys
Migrate builds plugin to go and track per-build records
2026-04-30 12:08:11 -04:00
Jose Diaz-Gonzalez
0a857b7966 docs: add file formats to list 2026-04-30 12:08:00 -04:00
Jose Diaz-Gonzalez
1a6f01a1eb docs: link to build tracking docs in sidebar 2026-04-30 12:04:23 -04:00
Jose Diaz-Gonzalez
8de073c960 docs: delete docs/deployment/builds-management.md
This is duplicated
2026-04-30 12:03:07 -04:00
Jose Diaz-Gonzalez
7cd4493cc7 Merge pull request #8541 from dokku/dependabot/docker/plugins/traefik-vhosts/traefik-v3.6.15
chore(deps): bump traefik from v3.6.14 to v3.6.15 in /plugins/traefik-vhosts
2026-04-30 10:15:10 -04:00
dependabot[bot]
2210307e42 chore(deps): bump traefik in /plugins/traefik-vhosts
Bumps traefik from v3.6.14 to v3.6.15.

---
updated-dependencies:
- dependency-name: traefik
  dependency-version: v3.6.15
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-30 13:54:23 +00:00
Jose Diaz-Gonzalez
4d5a16b714 fix: chown test-fixture build records to dokku user 2026-04-30 02:58:18 -04:00
Jose Diaz-Gonzalez
f0d088bc1d test: cover the legacy -v migration with go and bats tests
Adds plugins/storage/migrate_test.go exercising migrateApp and MigrateLegacyMounts: single deploy phase, cross-phase grouping into one attachment, :ro and free-form volume options preserved on the attachment, idempotency on a second pass, the per-app flag-file fast path that skips already-migrated apps, and the name-collision refusal that aborts before draining. tests/unit/storage.bats gains an end-to-end case that stages a -v line via docker-options:add, runs storage:migrate, and asserts the synthesized colon form shows up in storage:list, the legacy-<hash> entry shows up in storage:list-entries, and the original -v line is gone from docker-options:report on both phases. To make that test (and operators with restored backups) practical, storage gains a storage:migrate <app>|--all subcommand backed by a new MigrateApp helper that skips the per-app flag file so a re-run actually re-scans.
2026-04-30 02:37:01 -04:00
Jose Diaz-Gonzalez
ea25c5b6e2 fix: keep operator stdout when teeing build output to file 2026-04-30 02:02:02 -04:00
Jose Diaz-Gonzalez
ae61547505 fix: pad shfmt-required spaces around arithmetic operator 2026-04-30 01:19:21 -04:00
Jose Diaz-Gonzalez
67e4cf04ab feat: migrate builds plugin to go and track per-build records
Adds typed JSON build records under data/builds/<app>/<build-id>.{json,log} keyed on a stable base36 ULID-style DOKKU_BUILD_ID generated for every deploy. The new commands surface that history (builds:list, builds:info, builds:prune) and an operator-configurable retention via builds:set retention. The existing builds:cancel and builds:output now key on the build-id (with safe handling for already-finalized and abandoned records), and the per-build log file replaces journalctl as the durable source of truth for builds:output.
2026-04-30 01:18:03 -04:00
Jose Diaz-Gonzalez
e9a53ac82d fix: propagate storage:exec exit codes and route legacy mounts to attachments
CallExecCommand wraps non-zero exit codes as errors with the code populated on the response, so storage:exec was returning the wrapped error and being collapsed to exit 1 by LogFailWithError before the os.Exit branch ran. Both storage's CommandExec and scheduler-docker-local's TriggerSchedulerStorageExec now check ExitCode before err so the underlying tool's status flows through verbatim. Separately, the legacy host:container colon form of storage:mount used to write straight into docker-options, but storage:list now reads only attachments, so newly mounted legacy-form storage was invisible. CommandMount and CommandUnmount route the colon form through LegacyMountToEntry plus AddAttachment / RemoveAttachment, making storage:list show every mount regardless of form while preserving the existing "Mount path already exists." / "Mount path does not exist." error wording.
2026-04-30 01:10:00 -04:00
Jose Diaz-Gonzalez
cdbc91048a fix: chown the storage registry tree to the dokku user
The install trigger created /var/lib/dokku/data/storage-registry and its entries / migrations subdirectories as root with mode 0755, so the dokku user that runs storage:create couldn't write entry JSON files or migration flag files into them. Mirrors what PropertySetup does for config/storage by calling SetPermissions on each registry path. This unblocks the bats coverage that was failing at the first storage:create call.
2026-04-30 00:01:54 -04:00
Jose Diaz-Gonzalez
58042b9330 feat: delegate storage:exec to scheduler plugins, harden the flow
Moves the actual exec out of the storage plugin and into a new scheduler-storage-exec plugn trigger. scheduler-docker-local does docker run with TTY-aware -it/-i selection and --user derived from entry.Chown; scheduler-k3s creates a throwaway Pod via the kubernetes API, waits for it to reach Running with structured error reporting (ImagePullBackOff and friends are surfaced from the container status verbatim, no kubectl involvement), execs the user command via the existing SPDY plumbing in k8s.go, and deletes the Pod on the way out. (Entry).Validate now accepts either an absolute path or a docker named-volume token for docker-local entries so the migration synthesizer's named-volume legacy entries work cleanly. storage:exec gains --as-user for one-off uid overrides, propagates the underlying tool's exit code via os.Exit, and detects TTY/interactive mode from os.Stdin so non-interactive scripted use no longer trips over docker's input-device-is-not-a-tty error.
2026-04-29 23:29:30 -04:00
Jose Diaz-Gonzalez
d75228f165 fix: storage:list reads from attachments, deprecate storage-list trigger
storage:list was calling the storage-list plugn trigger which read -v lines from docker-options. After the install-time migration drains those lines into the attachment store, that source is empty for every migrated app and for any app that only ever used storage:create + storage:mount. The fix moves CommandList to call a new in-process ListAppMountEntries helper that reads attachments directly, surfaces the entry name in JSON output via a new entry_name field, and falls back to the entry name as the host token for k3s entries with no host path so the colon form remains well-formed. The storage-list plugn trigger is kept for back-compat with external callers but emits a deprecation warning and now reads from the same attachment-driven source.
2026-04-29 22:51:50 -04:00
Jose Diaz-Gonzalez
3b3bc3dd39 fix: scope deploy output redirect to git-hook only
The previous condition used a bash regex `git-*` that matched git-receive-pack and git-upload-pack, interposing a tee chain on the binary git wire protocol and producing `fatal: protocol error: bad line length character: !` on every push. Restrict the redirect to the pre-receive hook, where tee passthrough is safe because git-receive-pack forwards hook output via the protocol sideband.
2026-04-29 22:48:49 -04:00
Jose Diaz-Gonzalez
6a5d568944 fix: remove the per-app property folder on app delete and rename
Switches the storage plugin's post-delete and post-app-rename-setup triggers from rewriting the attachment list as empty to removing the per-app property folder outright via PropertyDestroy. This matches the convention other plugins use on app deletion and avoids leaving an empty mounts file behind for an app that no longer exists.
2026-04-29 22:39:12 -04:00
Jose Diaz-Gonzalez
89afd09087 fix: storage plugin install setup and post-delete permissions
apps:destroy was failing in CI because the post-delete trigger called PropertyListWrite, which tried to mkdir /var/lib/dokku/config/storage/<app> as the dokku user but the parent directory had been created by the install trigger as root. The install trigger now calls PropertySetup("storage") so the per-plugin config root has the correct ownership, and post-delete / post-app-clone / post-app-rename short-circuit when the app has no attachments to begin with so they can't fail on a never-touched property tree. The entry registry and migration flag directories also moved out of config/storage (where they would have collided with the property-store path config/storage/<appName>) into a dedicated data/storage-registry tree.
2026-04-29 22:36:00 -04:00
Jose Diaz-Gonzalez
b601a626f5 docs: storage entries and migration guide for #6814
Updates persistent-storage.md to lead with the named storage entry workflow while keeping the legacy colon-form documentation intact, adds a Persistent storage section to the k3s scheduler doc, documents the storage-app-mounts, storage-create, storage-destroy, and storage-status triggers in plugin-triggers, and adds an entry to the 0.38.0 migration guide explaining the install-time migration of legacy mounts and the new DNS-1123 name validation. Bats coverage in tests/unit/storage.bats now exercises storage:create / list-entries / destroy, name validation rejections, multi-entry attachment, the destroy-while-mounted error, and the ensure-directory deprecation warning.
2026-04-29 14:54:15 -04:00
Jose Diaz-Gonzalez
1ca961251d feat: add storage:set, storage:exec, storage:wait, storage:report --global
storage:set is the in-place editor for an existing entry; size grows are passed through to a helm upgrade and Kubernetes-incompatible swaps (access-mode, storage-class) are rejected up front. storage:exec spawns a throwaway container that mounts the entry: docker run on docker-local entries, kubectl run with a Pod-spec override on k3s, falling back to bash then sh when no command is supplied. storage:wait blocks until a k3s entry's PVC reports Bound via the storage-status trigger, with a docker-local fast path that just checks the host directory. storage:report --global enumerates every registered entry and the apps that mount it, in text or JSON form.
2026-04-29 14:51:49 -04:00
Jose Diaz-Gonzalez
cfb7da8ec0 feat: scheduler-k3s renders pvc-backed volumes from storage attachments
Adds a per-entry storage helm chart that owns the PVC and (when host_path is set) the PV, and three triggers for the storage plugin to drive: storage-create installs/upgrades the chart with storage-class existence validation, storage-destroy uninstalls it, storage-status reports the PVC phase. App deployment and cron-job charts now consume storage-app-mounts and reference each PVC by name; the // todo: implement volumes blocks are gone. ProcessVolume gained sub_path, read_only, and persistent_claim fields and the deployment/cron-job templates render them.
2026-04-29 14:49:15 -04:00
Jose Diaz-Gonzalez
e1b6bdb1d4 feat: storage attachments, docker-args triggers, install-time migration
storage:mount and storage:unmount now accept the named-entry form (--container-dir, --phase, --process-type, --volume-subpath, --volume-readonly, --volume-chown), persisting attachments via the property list. The legacy host:container colon form is preserved for back-compat. Storage now emits its own docker-args-deploy and docker-args-run triggers so docker-local apps continue to receive bind mounts even after their data moves out of docker-options. The install trigger walks every app once per upgrade and converts legacy -v lines into legacy-<hash> entries plus attachments, draining the originals from docker-options last so a partial run leaves the old behavior intact. Lifecycle triggers post-delete, post-app-clone-setup, and post-app-rename-setup keep the attachment store in sync with app state.
2026-04-29 14:43:51 -04:00
Jose Diaz-Gonzalez
8a46d89181 feat: add storage:create, storage:destroy, storage:info, storage:list-entries
Wires the new entry-management commands on top of the Entry type. storage:create accepts both docker-local entries (with idempotent host-directory creation) and k3s entries (which delegate PVC provisioning to a forthcoming scheduler-side storage-create trigger). storage:destroy refuses to remove an entry that any app still mounts. storage:ensure-directory now emits a deprecation warning. storage:mount and storage:unmount keep the existing colon-form behavior so this commit is non-breaking; the named-entry mount form follows in a later commit.
2026-04-29 14:39:59 -04:00
Jose Diaz-Gonzalez
4e87d1f447 feat: add storage entry and attachment types
Introduces the Entry and Attachment types that the storage plugin will use as the source of truth for named storage volumes, replacing the colon-delimited mount strings stored under docker-options. Entries persist as JSON under config/storage/entries and validate against scheduler-specific rules; attachments persist via the property list and capture how an app uses an entry. The legacy migration name synthesizer is also added so existing colon-form mounts can converge on a deterministic legacy- entry name. Existing storage commands are unchanged in this commit.
2026-04-29 14:36:47 -04:00
Jose Diaz-Gonzalez
aa72794711 feat: redirect output in every case as appropriate 2026-04-29 13:48:50 -04:00
Jose Diaz-Gonzalez
7d00e2c422 feat: implement builds:output
This still needs tightening to ensure we don't trigger this for normal git plugin commands - as well as anything that triggers a deploy - but works in a pinch.
2026-04-29 13:48:50 -04:00
Jose Diaz-Gonzalez
99855ae9f8 fix: correct issue with cancel 2026-04-29 13:48:50 -04:00
Jose Diaz-Gonzalez
0c08aefc54 feat: implement build tracking
The DOKKU_PID now never gets overwritten except in the case that DOKKU is executed by the sudo user. If the command ends up executing a deploy, then the pid of the `dokku` owned process - which may have been executed via sudo - will be written to the file lock, allowing future commands to interact with the original process.

Additionally, the new builds plugin can be used to handle killing a build.
2026-04-29 13:48:50 -04:00
Jose Diaz-Gonzalez
4257c17eab Merge pull request #8533 from dokku/8531-split-out-imagepullsecrets-and-config-env-into-separate-helm-charts
Split env config and image pull secret into separate helm releases
2026-04-29 13:48:08 -04:00
Jose Diaz-Gonzalez
3a6ae559c4 Merge pull request #8530 from dokku/8010-docker-options-cleaning-up-arguments
Split multi-flag input in docker-options
2026-04-29 13:16:37 -04:00
Jose Diaz-Gonzalez
507df612e8 fix: tidy go.sum for plugins importing docker-options 2026-04-29 13:16:18 -04:00
Jose Diaz-Gonzalez
55d7487d66 fix: split multi-flag input in docker-options
Multi-flag inputs (e.g. `--build-arg X=Y --link a --link b`) used to be stored as a single line, which bypassed the per-line filter that drops `--link` and similar flags for dockerfile-based builders. Each `--flag [value]` group is now stored as its own entry, and a `--process` typed after the app name is lifted into the subcommand flag instead of being stored as a docker option.
2026-04-29 13:15:51 -04:00
Jose Diaz-Gonzalez
7ba453e588 fix: thread secret annotations and labels through new helm charts
The new config and pull secret helm releases need to honor user-set annotations and labels for `--resource-type secret` so existing scheduler-k3s annotation tests keep passing. The dedicated charts now render `.Values.global.annotations` and `.Values.global.labels` onto their Secret manifest, and the deploy trigger plumbs `SecretAnnotations` and `SecretLabels` from the global annotation/label config. The rollback regression bats test now uses `dokku ps:rebuild` for its second deploy because git push of an unchanged ref is rejected by the dokku remote.
2026-04-29 12:18:06 -04:00
Jose Diaz-Gonzalez
ef9bdc0379 fix: split env config and image pull secret into separate helm releases
Bundling these Secrets in the app helm chart caused two bugs in the scheduler-k3s plugin: a chart rollback could delete Secrets that older ReplicaSets still referenced by exact timestamped name (`env-{app}.{ts}` and `ims-{app}.{ts}`), hard-crashing pods until manual intervention; and the strategic-merge `patchMergeKey` on `imagePullSecrets` let stale entries leak into the live Deployment until the list pointed at many nonexistent Secrets. Each Secret now lives in its own helm release with a stable name (`config-{app}` and `pull-secret-{app}`), installed before the app chart on every deploy. The deployment trigger also prunes any leaked `imagePullSecrets` entries from the live Deployment so the next deploy lands on a clean list, and the rename and destroy paths uninstall the new releases (and the previously-leaked TLS release on rename) under the old app name.
2026-04-29 12:18:03 -04:00
Jose Diaz-Gonzalez
f06048a266 Merge pull request #8535 from dokku/dependabot/go_modules/plugins/common/github.com/onsi/gomega-1.40.0
chore(deps): bump github.com/onsi/gomega from 1.39.1 to 1.40.0 in /plugins/common
2026-04-29 12:17:08 -04:00
Jose Diaz-Gonzalez
579481e76b chore: bump go modules 2026-04-29 12:16:58 -04:00
dependabot[bot]
2f1268172b chore(deps): bump github.com/onsi/gomega in /plugins/common
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.39.1 to 1.40.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.39.1...v1.40.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-version: 1.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-29 12:16:18 -04:00
Jose Diaz-Gonzalez
abb7faa503 Merge pull request #8527 from dokku/8500-allow-format-json-with-global-on-report-subcommands
Accept --global on :report subcommands
2026-04-29 12:14:54 -04:00
Jose Diaz-Gonzalez
1a45fef839 Merge pull request #8523 from dokku/3826-extending-resource-management-to-include-build-containers
Support resource limits on the build container
2026-04-29 10:45:16 -04:00
Jose Diaz-Gonzalez
0f78f81d71 test: drop cron:set in cron:report --global test
The set step relied on scheduler-cron-write accepting `--global` as the appName, which the scheduler-k3s plugin trigger does not.
2026-04-29 10:31:02 -04:00
Jose Diaz-Gonzalez
b28e4e552b test: align git:report --global assertion with rendered key 2026-04-29 10:31:01 -04:00
Jose Diaz-Gonzalez
8282981361 feat: accept --global on :report subcommands
Every `:report` subcommand now recognizes `--global` as a scope selector that limits the report to globally-configured properties, including in JSON form via `--global --format json`. Previously this combination was rejected because `--global` was treated as an info flag, conflicting with `--format`. The shared `common.ParseReportArgs` helper now returns a `ReportArgs` struct exposing the parsed scope; each Go and bash report selects a global-only flag map when scope is global, and skips per-app verification.
2026-04-29 10:30:59 -04:00
Jose Diaz-Gonzalez
ec70e10c5d Merge pull request #8528 from dokku/6998-dokku-ps-retire-or-cron-job-trying-to-retire-running-app
Skip retiring images still in use by app containers
2026-04-29 10:28:18 -04:00
Jose Diaz-Gonzalez
63958b99ef Merge pull request #8537 from dokku/dependabot/go_modules/plugins/scheduler-k3s/github.com/traefik/traefik/v2-2.11.44
chore(deps): bump github.com/traefik/traefik/v2 from 2.11.43 to 2.11.44 in /plugins/scheduler-k3s
2026-04-29 10:26:16 -04:00
dependabot[bot]
3267cb2ac8 chore(deps): bump github.com/traefik/traefik/v2
Bumps [github.com/traefik/traefik/v2](https://github.com/traefik/traefik) from 2.11.43 to 2.11.44.
- [Release notes](https://github.com/traefik/traefik/releases)
- [Changelog](https://github.com/traefik/traefik/blob/v2.11.44/CHANGELOG.md)
- [Commits](https://github.com/traefik/traefik/compare/v2.11.43...v2.11.44)

---
updated-dependencies:
- dependency-name: github.com/traefik/traefik/v2
  dependency-version: 2.11.44
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-29 14:24:21 +00:00
Jose Diaz-Gonzalez
cf5807c157 Merge pull request #8529 from dokku/fix-netrc-bug
chore: bump dokku/netrc to v0.11.0
2026-04-29 09:02:22 -04:00