194 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
3bf6c72451 fix: align Go-plugin :report JSON keys with bash-strip convention
Every Go-implemented plugin's `:report --format json` now emits keys without the redundant `<plugin>-` head segment, matching the shape bash plugins have always emitted. The CLI flag names and `:set` semantics are unchanged. For backwards compatibility during the 0.38.x patch series, the legacy `<plugin>-<property>` keys are emitted side-by-side with the new keys, and a future major release will drop the legacy keys. `common.ReportSingleApp` is refactored to accept a `ReportSingleAppInput` struct with a `Validate()` method so the input is checked before any work runs, which also catches the latent `"docker options"` reportType bug at the API boundary.
2026-05-27 07:17:00 -04:00
Jose Diaz-Gonzalez
2b5d2e10ea fix: expose remaining settable properties via :report
Adds the missing raw/global/computed report keys for ten settable properties across the ps, builder, scheduler, proxy, openresty, nginx, and scheduler-k3s plugins so external tooling can verify drift through `:report --format json`. The scheduler-k3s `token` is masked as `*******` in default stdout output and only unmasked when the report is requested via `--format json` or when the flag is queried explicitly by name; the same explicit-query unmasking rule is extended to the existing traefik `dns-provider-<env_var>` keys.
2026-05-27 04:26:12 -04:00
Jose Diaz-Gonzalez
3feedd8786 fix: align ps/cron :report --global keys with plugin convention
The `ps` and `cron` plugins emitted `:report --format json` keys that
skipped the `<plugin>-` prefix or `-global-` infix used by every other
plugin, forcing external consumers to special-case those names. Rename
the affected report flags so they match the `<plugin>-global-<property>`
and `<plugin>-computed-<property>` convention introduced in 0.38.0, and
add the previously missing `computed-` siblings to both the per-app and
`--global` reports so the shape lines up with caddy, haproxy, and
traefik.
2026-05-26 20:33:32 -04:00
Jose Diaz-Gonzalez
09c17e1653 fix: split more report global keys into raw and computed
Three plugins still leaked the built-in default through `<plugin>-global-<property>` after the broader raw/computed split in #8640. External tooling reading `:report --format json` for drift detection could not distinguish "set to default" from "never set" - after a `:set --global` followed by an unset, the JSON still reported the default value. The `<plugin>-global-<property>` keys now hold the raw stored value (empty when nothing has been set) and `<plugin>-computed-<property>` keys hold the effective value with per-app, global, and built-in default fallback. Every global property now has a computed sibling for shape consistency, including those whose default is empty. Internal callers in `scheduler-k3s` that previously read the default-applied global helpers now consume new `getComputed*` helpers, keeping deploy-time behavior unchanged.
2026-05-25 15:33:41 -04:00
Jose Diaz-Gonzalez
f9de91fc4b fix: split openresty report keys into global and computed pairs
The `openresty:report --format json` payload emitted bare property names for the four global-only properties (`image`, `letsencrypt-email`, `letsencrypt-server`, `allowed-letsencrypt-domains-func-base64`), while `hsts` already used the `global-`/`computed-` convention adopted by the other proxy plugins. External tooling consuming the report had to maintain a per-property naming map within a single plugin. The global flag map now emits `--openresty-global-<X>` (raw stored value, empty when unset) and `--openresty-computed-<X>` (effective value with the built-in default applied) for those four properties plus `hsts`, and the per-app map gains the same pair for the global-only properties. The compose template and the two non-report callers consume the `computed-` accessors so the runtime behavior is unchanged.
2026-05-25 12:45:53 -04:00
Jose Diaz-Gonzalez
f960dc5856 feat: warn on deprecated listen http2 in custom nginx templates
nginx 1.25.1 deprecated the `listen ... http2` parameter in favor of a standalone `http2 on;` directive. Apps that ship a custom `nginx.conf.sigil` forked from an old default still hardcode `listen ... ssl http2;` and trigger `nginx: [warn]` lines from `nginx -t`. Surface a deprecation warning during `nginx_build_config` whenever the active template is app- or plugin-supplied and still contains the deprecated parameter, matching the existing warnings for `DOKKU_APP_LISTENERS`, `NGINX_SSL_PORT`, and `NGINX_PORT`, and point users at the `HTTP2_DIRECTIVE_SUPPORTED` variable already used by the default template.
2026-05-25 05:32:11 -04:00
Jose Diaz-Gonzalez
8742f688e3 docs: add settable properties tables to plugin docs
Renames the existing `## Internal properties` umbrella section to `## Properties` across all plugin docs and adds a new `### Settable properties` subsection enumerating every property accepted by each plugin's `:set` command. Each row lists scope, default, the actual `:report` flag shapes that surface the value, and a one-line description. The buildpacks plugin is included even though it uses `:set-property`, with a note in the subsection clarifying the legacy command name. Property lists, scopes, and report flags were verified against plugin source and the live dokku binary.
2026-05-23 22:45:20 -04:00
Jose Diaz-Gonzalez
76b033234f fix: split report global keys into raw and computed across plugins
The `<plugin>-global-<property>` keys in `:report` output returned the resolved value with the built-in default substituted in, so external tooling could not distinguish a property that had been set globally to the default from one that had never been set. The bare keys for caddy, haproxy, and traefik global-only properties had the same shape. The `global-<property>` keys now hold the raw stored value and are empty when nothing has been set, and a new `computed-<property>` key holds the effective value used at runtime, falling back through the per-app value (where one exists), the global value, and the built-in default. The bare global-only keys for the three proxy plugins are removed in favor of the raw/computed pair. Closes #8631.
2026-05-23 00:05:33 -04:00
Jose Diaz-Gonzalez
392ac73d33 fix: gate ssl_reject_handshake behind nginx 1.19.4
The shipped catch-all default site uses `ssl_reject_handshake`, which is unsupported on nginx older than 1.19.4 and causes nginx to fail to start on Debian Bullseye. The postinst now detects the installed nginx version and installs an HTTP-only variant of the catch-all on older systems.
2026-05-09 16:32:30 -04:00
Jose Diaz-Gonzalez
cb0f729299 docs: document plugin properties migrated from env vars
Per-plugin management docs now describe the properties introduced by the env-var-to-property migration in PR #8498, and stale prose and command-output examples that still referenced the old `DOKKU_*` names have been refreshed. The deprecated env vars table moves out of `environment-variables.md` and into the 0.38.0 migration guide, where it functions as a one-time pointer for upgrading users rather than ongoing reference material.
2026-04-30 17:02:39 -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
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
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
d88e8f137f fix: skip retiring images still in use by app containers
When ps:rebuild runs against an image-based deploy via git:from-image, the resulting image often shares the same SHA as the previous deployment, so retiring the old container's image would target the live image of the new container. The retirement is now skipped when another running container of the same app still references the image, and the cron retire loop self-heals previously stuck entries the next time it encounters them.
2026-04-29 05:36:04 -04:00
Jose Diaz-Gonzalez
ec7841a07b fix: inject placeholder listener for pre-validation upstream blocks
When pre-validating a custom nginx.conf.sigil before the build phase, no app listeners exist yet on first deploys. Templates that emit `proxy_pass http://app-port` while gating the matching upstream block on `DOKKU_APP_WEB_LISTENERS` render an undefined upstream, causing `nginx -t` to fail with "host not found in upstream". Pre-validation now passes a `127.0.0.1:5000` placeholder for `DOKKU_APP_WEB_LISTENERS` so the upstream block emits a static server entry and the template can be validated for syntax without depending on live listeners.
2026-04-29 05:12:05 -04:00
Jose Diaz-Gonzalez
63b809f64c feat: pre-validate custom nginx.conf.sigil during core-post-extract
Renders the user-supplied nginx.conf.sigil via sigil into a tmp file and runs `nginx -t` against a wrapped copy as soon as the template is extracted from the source tree, so syntactically invalid templates abort the deploy before the build phase runs. Skipped when `proxy-type` is not `nginx`, when `disable-custom-config=true`, or when no custom template was extracted. Closes #7827.
2026-04-29 05:01:25 -04:00
Jose Diaz-Gonzalez
1161dda05e feat: send SIGTERM to old containers immediately on deploy
The docker-local scheduler now sends `SIGTERM` to old containers immediately after a successful deploy via `docker container kill --signal=SIGTERM`, rather than waiting `wait-to-retire` seconds before signaling. This matches Heroku's graceful-shutdown contract and lets applications begin draining in-flight work as soon as proxy traffic switches. The existing `wait-to-retire` grace period and `stop-timeout-seconds` hard-stop continue to apply unchanged as the authoritative cleanup path.
2026-04-27 18:18:39 -04:00
Jose Diaz-Gonzalez
d7c88ae298 feat: ship default catch-all site on fresh apt install
Fresh apt installs now drop a catch-all server block at `/etc/nginx/conf.d/00-default-vhost.conf` that uses `ssl_reject_handshake on` and `return 444` to drop requests with unknown Host headers. Conflicting upstream nginx default vhosts are renamed to `*.dokku-disabled` rather than deleted, preserving any local edits. The new `dokku/install_default_site` debconf flag opts out of the install. Upgrades leave existing nginx config untouched.
2026-04-27 14:43:20 -04:00
Jose Diaz-Gonzalez
d1554461ab docs: move migration note to 0.38.x doc 2026-04-27 01:07:39 -04:00
Jose Diaz-Gonzalez
bc4d3a76b9 Update docs/appendices/0.37-migration-guide.md
Co-authored-by: othercorey <corey.taylor.fl@gmail.com>
2026-04-27 01:06:32 -04:00
Jose Diaz-Gonzalez
f2f6e0b473 refactor: move the env files to the new path on upgrade
Refs #1558
2026-04-27 01:06:29 -04:00
Jose Diaz-Gonzalez
34c336c668 feat: add post-create support for env key in app.json
Closes #4498
2026-04-26 22:43:32 -04:00
Jose Diaz-Gonzalez
1158db380a Merge pull request #8493 from dokku/6760-build-empty-nginx-config-when-there-are-no-web-processes
Generate 502 config for apps without web listeners
2026-04-26 04:08:17 -04:00
Jose Diaz-Gonzalez
20f2100d46 docs: add 0.38.0 migration guide with nginx.conf.sigil update notes
Custom nginx.conf.sigil templates that reference DOKKU_APP_WEB_LISTENERS
may now receive an empty value when rendered for apps without running web
processes. The migration guide documents how to handle this with a
conditional in the template.
2026-04-24 02:54:22 -04:00
Jose Diaz-Gonzalez
b0b11bcf26 fix: remove buildpacks from dockerfile test app and add tests for app.json buildpacks
The buildpacks entry in tests/apps/dockerfile/app.json caused
the post-extract trigger to write a .buildpacks file during
Dockerfile-based deploys, breaking builder detection. Remove
the entry and add Go unit tests for getBuildpacks/validBuildpackURL,
a bats integration test for deploying with app.json buildpacks,
and documentation for the new feature.
2026-04-18 05:43:44 -04:00
Kazuhiro NISHIYAMA
b90add9e4e Fix version 2025-11-30 19:29:05 +09:00
Jose Diaz-Gonzalez
0c96c4b6de feat: allow exposing non-web processes as kubernetes services
Closes #7204
2025-11-22 19:39:56 -05:00
Jose Diaz-Gonzalez
1430c2a13e refactor: rename the scheduler-k3s:cluster-* commands to use a : instead of - for a delimiter
This standardizes the commands with the other k3s commands that use a colon delimiter as well.
2025-11-20 05:00:31 -05:00
Jose Diaz-Gonzalez
1c0ce250dc feat: support inline comments for app.json
Closes #8007
2025-11-20 00:35:17 -05:00
Jose Diaz-Gonzalez
003f6a5bd8 fix: remove not working method to change the caddy label-key
This was never actually used by caddy-docker-proxy so its better to just remove it.
2025-11-16 16:45:56 -05:00
Jose Diaz-Gonzalez
397c8f6d15 docs: add note on removal of nixpacks no-cache property 2025-11-15 23:31:00 -05:00
Jose Diaz-Gonzalez
50b2836e52 refactor: remove support for DOKKU_DOCKER_BUILD_OPTS
This replicates the docker-options functionality.
2025-11-15 23:28:44 -05:00
Jose Diaz-Gonzalez
9b75cc39b1 refactor: remove support for DOKKU_DOCKERFILE_CACHE_BUILD
This replicates the docker-options functionality.
2025-11-15 23:27:22 -05:00
Corey Taylor
983115c827 Add test for cron concurrency policy 2025-11-10 03:11:08 -05:00
Jose Diaz-Gonzalez
d72c183d9e feat: add ability to specify a concurrency policy for crons in the app.json file 2025-11-10 03:03:49 -05:00
Jose Diaz-Gonzalez
e42df29a79 feat: allow specifying maintenance mode in the file or not
If the app's cron tasks are set to maintenance mode, then the task is set to maintenance mode regardless.
2025-11-09 23:16:38 -05:00
Jose Diaz-Gonzalez
cba345025c feat: add a Railpack builder to Dokku
Closes #7615
2025-11-09 20:21:09 -05:00
Jose Diaz-Gonzalez
3915d25d84 refactor: rename cron entry to cron task
This naming better suits what it is we are fetching.
2025-11-07 22:30:54 -05:00
Jose Diaz-Gonzalez
344cb39a44 chore: drop support for Ubuntu 20.04
This is no longer supported upstream by Canonical.
2025-07-23 21:55:23 -04:00
Alessandro Rodi
3cc29ff016 Update 0.36.0-migration-guide.md 2025-07-08 14:01:03 +02:00
Jose Diaz-Gonzalez
04b2643b4f chore: remove ansi escape characters that dropped the remote: prefix in deploy output
Closes #7728
2025-07-04 02:36:42 -04:00
Jose Diaz-Gonzalez
a2ac21130a docs: add migration note 2025-07-02 01:22:05 -04:00
Jose Diaz-Gonzalez
9beab4d50d refactor: migrate DOKKU_DOCKER_STOP_TIMEOUT to ps setting 2025-06-09 11:39:00 -04:00
Dara Kharabi
fe3ef4e1f6 add correct cron key in docs 2025-04-27 14:49:02 -04:00
Jose Diaz-Gonzalez
8f3f6c49f1 docs: add documentation for all file formats dokku uses
Some files - those maintained by external organizations - have a very light treatment and solely point to the upstream documentation to reduce any issues creating examples/documentation for them that may differ in the future.

Closes #7315
2024-12-07 14:46:58 -05:00
Jose Diaz-Gonzalez
4eb9586199 docs: add a migration guide for Dokku 0.35 2024-09-23 00:55:27 -04:00
Jose Diaz-Gonzalez
76e3ef6749 docs: revert incorrect doc change 2024-09-20 21:39:47 -04:00
Jose Diaz-Gonzalez
8f5dbe61d9 feat: upgrade herokuish builder to gliderlabs/herokuish:latest-24 2024-08-26 04:20:52 -04:00
Jose Diaz-Gonzalez
1a07025e99 chore: deprecate the pre-deploy trigger in favor of the pre-release-builder trigger 2024-04-04 02:36:01 -04:00