169 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
25a5bacde9 docs: note the preserved ENV file can be deleted
The preserved copy holds everything the legacy file was not allowed to import, which includes keys that had been `config:unset` on purpose, so a revoked secret can outlive its revocation in a file `dokku config:*` no longer reads. Nothing said the copy was the operator's to remove once reviewed.
2026-08-11 19:11:06 -04:00
Jose Diaz-Gonzalez
685f16e6b1 fix: do not import an already-migrated ENV file
Releases 0.38.0 through 0.38.25 recorded the ENV file migration and deliberately left the file at the old path, so 0.38.26 treating a leftover file as a hand-edit replayed the environment as it stood at that upgrade over every `config:set` and `config:unset` made since, reinstating variables and secrets that had been deliberately unset. A file found at the old path once its migration is on record is no longer imported: it is removed when it agrees with the current config, and is otherwise moved aside to `ENV.migrated` with the keys it disagrees on named in a warning. That warning now reaches the operator during an upgrade rather than being swallowed, which is why the overwrite went unreported.
2026-08-10 17:58:10 -04:00
Jose Diaz-Gonzalez
70dc921967 fix: migrate env files before reading deprecated vars
Install steps run in alphabetical order of the enabled plugin directory, so `apps`, `builder`, and `checks` read an app's environment before the `config` plugin had moved the `ENV` file to its new location. The read came back empty, so their deprecated `DOKKU_*` variables were never migrated to the matching plugin property and were never unset, with nothing reported either way: `dokku config:show` kept listing the variable while the plugin behaved as though it were unset. The relocation now runs before any deprecated variable is read, whatever the install order, and each old file is removed as soon as it has been drained rather than on a later install, which also covers the global file that was never removed at all. A file that reappears at the old path can only have been written by hand, so it is merged in with a warning naming its keys instead of being discarded.
2026-08-07 16:43:56 -04:00
Jose Diaz-Gonzalez
748b66f669 docs: clarify byte-preserving behavior of config:set --encoded
The canonical encode pipeline `echo "value" | base64` silently appends `\n` to the value, which round-trips through base64 and ends up stored in the env. Document that decoded values are stored byte-for-byte, recommend `printf '%s'` or `echo -n` for short inline values, and show `cat | base64 -w 0` for files. Adds a bats test asserting all four encoding patterns produce the expected stored bytes.

Closes #8647.
2026-05-24 15:39:28 -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
cecd07d914 fix: preserve explicit https:443 port mappings on cert update
The ports plugin's `post-certs-update` trigger was rewriting every `https:443:*` mapping from the app's `http:80:*` mappings, silently overwriting any user-defined mapping such as `https:443:443` used by apps that terminate TLS inside the container. The trigger now skips the rewrite when an `https:443:*` mapping already exists, keeping the default behavior only when the app has no explicit HTTPS mapping configured.

Closes #8619.
2026-05-12 19:02:47 -04:00
Jose Diaz-Gonzalez
2df0791fcd fix: prevent tar symlink traversal in archive extraction
Archives passed to git:from-archive and certs:add were extracted without symlink or path validation, allowing a crafted archive to write arbitrary files anywhere writable by the dokku user via symlink traversal. Extraction now pre-scans entries for absolute paths, parent traversal, and unsafe symlinks, applies the GNU tar `--no-unsafe-links` flag when available, and validates symlinks after extraction.
2026-05-09 12:54:42 -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
b8accfd463 docs: remove references to ENV file 2026-04-27 01:05:41 -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
915172c0c5 fix: move proxy-port properties to proxy plugin and fix CI failures
- Move proxy-port and proxy-ssl-port properties from ports plugin to
  proxy plugin where they conceptually belong
- Generalize proxy:set to handle any property (matching ps:set pattern)
  instead of only handling the type property
- Fix apps:set --global flag parsing (pflag treats --global as a flag,
  not an argument — must be defined explicitly like ps:set does)
- Add missing property-functions source to scheduler-docker-local
  shell scripts (scheduler-enter, scheduler-run, scheduler-deploy,
  check-deploy, bin/scheduler-deploy-process-container)
- Update nginx-vhosts property references from ports to proxy plugin
- Update tests to use proxy:set for proxy-port properties
2026-04-25 17:19:42 -04:00
Jose Diaz-Gonzalez
1308e21947 feat: migrate environment variables to plugin properties
Standardize how environment variables are migrated to properties during
install triggers and migrate all remaining DOKKU_* config vars to their
appropriate plugin properties.

Adds a reusable MigrateConfigToProperties() function in the common
package with Transform callback and ListProperty support, plus a
migrate-config-to-property subcommand for the prop binary so shell
plugins can use the same code path.

Migrated variables and their new property owners:
- DOKKU_APP_PROXY_TYPE/DOKKU_PROXY_TYPE → proxy type
- DOKKU_DISABLE_PROXY → proxy disabled
- DOKKU_PROXY_PORT → ports proxy-port
- DOKKU_PROXY_SSL_PORT → ports proxy-ssl-port
- DOKKU_APP_RESTORE → ps restore
- DOKKU_SKIP_DEPLOY → ps skip-deploy
- DOKKU_START_CMD → ps start-cmd
- DOKKU_DOCKERFILE_START_CMD → ps dockerfile-start-cmd
- DOKKU_DISABLE_APP_AUTOCREATION → apps disable-autocreation
- DOKKU_APP_SHELL → scheduler shell
- DOKKU_SKIP_CLEANUP → builder skip-cleanup
- DOKKU_CHECKS_DISABLED → checks disabled
- DOKKU_CHECKS_SKIPPED → checks skipped
- DOKKU_CHECKS_WAIT → checks wait
- DOKKU_CHECKS_TIMEOUT → checks timeout
- DOKKU_CHECKS_ATTEMPTS → checks attempts
- DOKKU_DEFAULT_CHECKS_WAIT → checks default-wait
- DOKKU_SKIP_ALL_CHECKS → checks disabled (legacy)
- DOKKU_SKIP_DEFAULT_CHECKS → checks skipped (legacy)

Also refactors existing bespoke migration loops in scheduler, ports, ps,
builder, and nginx-vhosts plugins to use the standardized utility.

Removes DOKKU_PARALLEL_ARGUMENTS from documentation (unused in core).
Deprecates fn-migrate-config-to-property bash function.

closes #1558
2026-04-25 05:11:07 -04: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
Ben Katz
12d7cde3d9 Remove incorrect documentation about --envfile flag for config:export 2025-09-26 11:33:03 -04:00
Jose Diaz-Gonzalez
5d5d56c560 refactor: remove public exposure of DOKKU_APP_TYPE in favor of builder detected property
The DOKKU_APP_TYPE has long since ceased to be the correct way to specify the builder for the application. It's only usage has been during the detection phase, specifically to ensure that the herokuish plugin injects the correct docker arguments during the build. As such, it is safe to migrate away to a property in a patch release.

Users that seek to set a specific builder should use 'dokku builder:set $APP selected' instead.

Refs #7863
2025-08-21 23:59:41 -04: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
77970a6b0d chore: revert doc change 2025-07-02 01:17:09 -04:00
Jose Diaz-Gonzalez
624acb8e18 chore: revert doc change 2025-07-02 01:12:35 -04:00
Álvaro Justen (@turicas)
67311264d7 Implement domains:reset 2025-07-01 20:11:48 -04:00
Álvaro Justen (@turicas)
b97086a8bd domains:clear now removes ALL app domains 2025-07-01 20:11:48 -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
70d2f24e1d feat: add ability to disable vhosts for all apps
Closes #6967
2025-03-10 11:51:53 -04:00
Udi Oron
dc57774f63 docs: add -w 0 to base64 for safe usage in ssh commands 2024-12-10 13:29:18 +02:00
Code Is Art
ded19d6105 Fix grammar under HSTS Header in ssl.md
Fixing grammar in HSTS header section in ssl.md
2024-07-29 23:38:17 +02: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
f8ccf52079 refactor: only use detected port mapping if override is not specified
Previously, we would always set the port mapping during a dockerfile build, making it difficult for users to override mappings. We also only _sometimes_ updated the detected port mapping, further confusing issues when users were migrating from Dockerfile to Buildpacks for builds.

Now, we always detect the port mapping during the build process, and only use that detected port mapping if an override is not specified. This greatly simplifies the experience around port mapping, as now a user can create an app, set a port mapping, and that first deploy will respect the port mapping without an additional deploy.

The builder always has the best context for what the app should be listening on, and thus we can always specify a "default" port mapping at this stage. Users can override this map as desired later.

This change also results in the removal of a ton of internal code that is now centralized in the ports plugin.

Closes #4067
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
f842869c3d refactor: move the proxy port map from config to property
Also remove all direct references to DOKKU_PROXY_PORT_MAP from outside of ports.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
64f0f2674d refactor: move all port management code to standalone ports plugin
This change makes interacting with port mappings more clear - folks might previously set the port mapping to the proxy type or vice-versa.

The existing proxy:ports* commands still exist but will show a deprecation warning for a single minor release.
2023-08-05 10:58:57 -04:00
Arad Alvand
76674ec941 Add link to X-Forwarded-* docs in ssl.md 2023-06-14 07:50:55 +03:30
Arad Alvand
f452e9af89 Improve docs about X-Forwarded-* headers and move it to nginx.md 2023-06-13 14:46:31 +03:30
Jose Diaz-Gonzalez
a2444b453d chore: remove deprecated --detach flag
This option was deprecated in Dokku 0.25.0.
2023-01-16 01:19:39 -05:00
Jose Diaz-Gonzalez
f5c3b5dc34 refactor: move DOKKU_WAIT_TO_RETIRE to a checks property
This centralizes the property and removes one more dokku-specific property from the app environment variables.

Closes #5049
2022-11-22 20:27:43 -05:00
Jose Diaz-Gonzalez
f094ea1f72 chore: move nginx docs to new proxies location 2022-08-10 04:23:05 -04:00
Jose Diaz-Gonzalez
ae10527b8a docs: clarify usage of build args to set environment variables for Dockerfile deploys
While documented under Dockerfile deploys, developers looking at docs might not know to go to those docs to find this information out.
2022-06-27 10:53:09 -04:00
Jose Diaz-Gonzalez
496488cb3e docs: reword note about env vars in nginx config templates
Refs #3686
2021-11-18 13:42:38 -05:00
Jose Diaz-Gonzalez
350a84d253 refactor: deprecate the --detach flag in favor of run:detached 2021-07-27 02:58:44 -04:00
Jose Diaz-Gonzalez
618158a0f3 refactor: deprecate the --rm and --rm-container flags
These flags are not commonly invoked by users, causing issues when cleaning up old containers. Rather than instruct users to use some random flag, just change the default to what is likely to be more common.
2021-07-27 02:58:19 -04:00
Jose Diaz-Gonzalez
539f08f627 docs: more cleanup 2021-07-09 23:06:38 -04:00
Jose Diaz-Gonzalez
c50f39b4fa docs: more cleanup 2021-07-09 22:46:52 -04:00
Matt Allan
c5d329db70 Fix typo: Remove extra space in nginx logging config example 2021-05-27 16:11:00 +10:00
John
d849a20325 Update config command to config:show
Dokku now gives `config` deprecation message, and suggests to use `config:show`
2021-03-27 23:36:52 -06:00
Jose Diaz-Gonzalez
7316b1d14c docs: add full example for custom nginx log format
Closes #4478
2021-03-21 23:26:28 -04:00
Jose Diaz-Gonzalez
75b7ae94e1 docs: use updated links for documentation
Docs are now hosted on https://dokku.com, so we can avoid the extra rewrite.
2021-02-28 01:18:33 -05:00
Allen Liu
8a4b0e16e4 View Doc redirect not working use direct link 2021-02-25 21:16:59 +08:00
Jose Diaz-Gonzalez
f7e218637e feat: add ability to specify X-Forwarded-Ssl header for proxied requests
Closes #4401
2021-02-20 00:03:25 -05:00
Leopold Talirz
73f3ce7579 replace nginx:build-config => proxy:build-config 2021-02-17 19:15:38 +01:00
Milan Vit
99336870b8 Fix spelling in Nginx documentation 2021-01-25 09:32:15 +09:00