Commit Graph

80 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
857d115fdd feat: add --format json support to ps:scale
The `ps:scale` command now accepts a `--format` flag that defaults to `stdout` and can be set to `json` to emit the current formation as a JSON array of process type and quantity objects, matching the JSON output the `:report` subcommands already provide. The flag only applies when displaying the current formation; it is ignored when process types are supplied for scaling. When no scale has been set for the app, the JSON output is an empty array.
2026-07-06 13:57:19 -04:00
Jose Diaz-Gonzalez
fec872711a fix: treat empty ps restart-policy as an unset
`dokku ps:set <app> restart-policy` with no value erroneously returned `Invalid restart-policy specified` instead of unsetting the property like every other ps property. The restart policy is now managed as a normal app and global property surfaced through the `--ps-restart-policy`, `--ps-global-restart-policy`, and `--ps-computed-restart-policy` report flags, with the effective value applied at deploy time and existing values migrated on install. Because it is no longer stored as a Docker option it no longer appears in `docker-options:report`, and `--ps-restart-policy` now reports the raw value with the `on-failure:10` default available via `--ps-computed-restart-policy`.
2026-05-28 03:10:03 -04:00
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
ac95225809 fix: prevent host shell injection from app.json cron commands
The docker-local scheduler wrote each app.json cron command verbatim into the dokku user's crontab, where cron's `bash -c` interpreted any shell metacharacters in the command on the host as the dokku user rather than inside the container. The crontab line is now `dokku cron:run <app> <cron-id>`, and the command is resolved from app.json and exec'd inside the container at run time. Commands containing shell operators are also rejected when app.json is validated at deploy time.
2026-05-25 02:14:21 -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
052ba1fcfc docs: split multi-flag internal property table rows
The internal-properties tables on builds.md (8 --build-* flags),
ssl.md (8 --ssl-* flags), and process-management.md (4 ps flags) each
crammed all the flags into a single comma-separated table row with one
umbrella description. Splits each into a row per flag with a specific
description and the actual code-path source (the build record write
path, the openssl x509 parse target, the ps inspection helper).
2026-05-23 16:30:10 -04:00
Jose Diaz-Gonzalez
cdcf1fc669 test: backfill raw/global/computed report triplet coverage across plugins
The bats coverage for plugin :report keys has been uneven since the raw/global/computed split landed in PR #8640. This commit adds a single combined triplet test per settable property across app-json, builder, builder-dockerfile, builder-herokuish, builder-lambda, builder-nixpacks, builder-pack, builder-railpack, buildpacks, cron (maintenance), git (keep-git-dir, rev-env-var, source-image), logs (vector-sink, vector-global-image, vector-global-networks), network (attach-post-create, attach-post-deploy, initial-network), proxy (per-app type), ps (stop-timeout-seconds), registry (image-repo, push-on-release, push-extra-tags), storage (build/deploy/run mounts), and adds a new tests/unit/scheduler.bats and tests/unit/nginx-vhosts_properties.bats. Brings ps `procfile-path` and `stop-timeout-seconds` global getters in line with the #8640 convention (raw global, default resolved in computed). Documents the read-only and internal properties that surface in `:report` (or are written by Dokku) but cannot be managed by `:set` in a new `## Internal properties` section appended to each affected plugin's docs page.
2026-05-23 00:05:33 -04:00
Jose Diaz-Gonzalez
4001f318a6 fix: support --global on cron:set
`cron:set --global` wrote the property but emitted `unknown flag: --global` because the post-set `scheduler-cron-write` trigger received `--global` as the appName arg, which pflag rejected before reaching the trigger body.

The trigger args now omit appName for global writes, and the `scheduler-k3s` cron-write trigger short-circuits when called without an app since per-app reconciliation requires a real app name. The docker-local trigger already regenerates the global crontab from all apps so global `mailfrom`/`mailto` are picked up without any further changes.
2026-05-13 12:37:14 -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
a6d65c821f feat: implement cron and one-off run task TTLs
Closes #7938
2025-11-18 16:46:31 -05:00
Jose Diaz-Gonzalez
dc8424d8a5 docs: document the concurrency_policy 2025-11-13 01:58:37 -05:00
Jose Diaz-Gonzalez
d9603af08a docs: document cron task suspension 2025-11-10 01:55:44 -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
82cab643a8 chore: standardize on cron task vs any other naming 2025-11-07 22:36:00 -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
7adeee7086 feat: add ability to list global cron tasks
Closes #7732
2025-09-14 04:38:19 -04:00
Jose Diaz-Gonzalez
3a16724fbe docs: correct commands 2025-06-09 11:39:00 -04:00
Jose Diaz-Gonzalez
9beab4d50d refactor: migrate DOKKU_DOCKER_STOP_TIMEOUT to ps setting 2025-06-09 11:39:00 -04:00
Jose Diaz-Gonzalez
d0b87936db docs: fix typo 2025-06-08 22:35:17 -04:00
Jose Diaz-Gonzalez
c0eb12f572 feat: add ability to set maintenance mode for all cron tasks running for an app
Closes #6953
2025-06-08 22:34:47 -04:00
Jose Diaz-Gonzalez
ccf693d517 Merge pull request #7422 from Tashows/fix_detached_tty
Fix detached tty for k3s
2024-12-19 00:46:49 -05:00
Tasos Maschalidis
fb4388b9e4 Slight improvement in phrasing for tty functionality 2024-12-17 22:23:02 +02:00
Tasos Maschalidis
a0dc8fd44a Update docs regarding the returned container/pod name for detached command 2024-12-17 21:53:23 +02:00
Jose Diaz-Gonzalez
b93a47c35b feat: add the ability to set a MAILFROM value for local cron emails
Closes #7419
2024-12-17 00:28:21 -05:00
Jose Diaz-Gonzalez
caa7b10091 fix: automatically select a container type if none is specified
Closes #6893
2024-09-23 21:41:02 -04:00
Jose Diaz-Gonzalez
bbd5c039b5 docs: unify path setting docs for all custom files 2024-08-11 03:52:48 -04:00
Flavio Poletti
fe9a890243 Propose doc changes for procfile-path property 2024-07-08 08:12:17 +02:00
crazehang
169d8a927e docs: fix some comments
Signed-off-by: crazehang <zhangrenzhong@outlook.com>
2024-04-03 17:28:12 +08:00
Jose Diaz-Gonzalez
c36f23b072 fix: add missing cron:set command
The code existed but somehow it wasn't exposed as a command.

Closes #6655
2024-03-06 01:56:25 -05:00
Jose Diaz-Gonzalez
798b176985 fix: correct issue where --force-tty was not properly supported by run:detached calls
Closes #6606
2024-02-25 00:02:06 -05:00
Jose Diaz-Gonzalez
c23e878e7d feat: add the ability to specify a custom mailto for all cron output 2023-10-15 20:25:09 -04:00
Jose Diaz-Gonzalez
d61d91cf87 docs: use github admonitions
These still need to be properly parsed.
2023-08-19 14:24:12 -04:00
Jose Diaz-Gonzalez
5dd78e2b86 docs: update markdownlint rules for better formatting 2023-08-19 13:46:42 -04:00
Jose Diaz-Gonzalez
26e9cc9b8c feat: add support for non-web healthchecks via app.json
This change converts existing CHECKS files into a healthchecks key that is understood by 'docker-container-healthchecker'. This tool supports a number of different types of container healthchecks - command, http, uptime - and can perform healthchecks against non-web processes.

The use of the old CHECKS file is now deprecated, and will be removed in the next minor version. Users can use the 'docker-container-healthchecker' to convert existing CHECKS files to the new format automatically.

Closes #2760
2023-08-06 17:23:13 -04:00
Jose Diaz-Gonzalez
515994c8d3 feat: add the ability to execute a cron task on the fly
Closes #4904
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
820883e60c feat: add json format output to cron:list command
This makes it easier to parse output in a machine-readable format - such as when interacting with cron tasks via jq for writing tests.
2023-08-05 10:58:57 -04:00
Kevin Leutzinger
f3724fd8cf Fix typo in scheduled-cron-tasks.md 2023-07-02 20:43:16 -07:00
Jose Diaz-Gonzalez
f465c0e221 docs: unify all Procfile-handling documentation under the process management docs
This makes it more clear as to how the various builders utilize the Procfile, and also ensures we don't have conflicting information anywhere.
2023-07-01 18:02:42 -04:00
Jose Diaz-Gonzalez
73f61b75d5 docs: update docs to mention that files are extracted from source where source code is available
Recent Dokku changes invalidate a bunch of docs around where files need to be placed in order for Dokku to respect them. This doc change clarifies where files are extracted from in cases where source code is available, which should hopefully make users less confused about how the system works.

See https://railsnotes.xyz/blog/deploying-ruby-on-rails-with-dokku-redis-sidekiq-arm-docker-hetzner for the inspiration - I was reading through it and was like 'these docs are definitely incorrect...'.
2023-07-01 08:58:43 -04:00
Gerard Paapu
d58f570295 Fix: repair malformed code-block
This code-block starts with triple-backticks  but is closed with 4 backticks, causing the documentation page to render incorrectly
2023-05-18 11:16:23 +12:00
Tyler Crumpton
8efb02827f Fix "cotainer" typo in one-off page. 2023-04-24 22:19:56 -04:00
Alejandro Akbal
ceb03d6341 docs(Scheduled Cron Tasks): remove deprecated used of --rm flag in dokku run 2022-12-09 09:33:37 +00:00
Jose Diaz-Gonzalez
d6920230db feat: implement run:logs command
Closes #5312
2022-11-02 16:49:43 -04:00
Jose Diaz-Gonzalez
aa810cda7d feat: implement run:stop command
Closes #5169
2022-10-31 10:55:17 -04:00
Jose Diaz-Gonzalez
a4554b794e Merge pull request #5320 from dokku/5171-run-json-output
Add json format output to run:list
2022-10-29 17:06:50 -04:00
Jose Diaz-Gonzalez
b5da7a08b1 docs: document that scaling via app.json will set all other processes to zero
Closes #5412
2022-10-21 21:38:30 -04:00
Jose Diaz-Gonzalez
69738abec2 feat: add json format output to run:list
Also add some unit tests to the command.

Closes #5171
2022-08-22 22:37:04 -04:00
Jose Diaz-Gonzalez
f094ea1f72 chore: move nginx docs to new proxies location 2022-08-10 04:23:05 -04:00