153 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
436825b782 feat: split caddy report tls-internal into raw, computed, and global
The bare `tls-internal` key previously returned the computed value, so external tooling could not tell whether the property had been set on the app or was merely defaulting to `false`. The property is now also configurable with `--global`, the report exposes `computed-tls-internal` and `global-tls-internal` keys alongside the bare raw key, and the deploy path honors the per-app value with a fallback to the global value before the built-in default. Closes #8625.
2026-05-12 18:54:26 -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
a70728f61e fix: sanitize openresty include filenames to prevent eval injection
Add defense-in-depth sanitization for OpenResty include files to prevent
OS command injection via malicious filenames that break shell quoting in eval.

- Add filename validation in core-post-extract using regex [^a-zA-Z0-9_.-]
- Validate both http-includes and location-includes paths
- Abort deploy via dokku_log_fail on unsafe filenames
- Skip non-regular files (symlinks, directories) during extraction
- Add security regression test with unsafe filename containing space
- Keep existing guards in docker-args-process-deploy as belt-and-suspenders
- Update documentation to clarify allowed filename characters

Addresses CVSS 9.9 vulnerability where filenames like poc'$(cmd)'x.conf
could escape shell quoting and execute arbitrary commands during deploy.
2026-05-09 12:20:50 -04:00
Jose Diaz-Gonzalez
53ef8c7780 fix: deflake haproxy bats tests
The byjg/easy-haproxy image polls Docker for label changes every 10
seconds by default, which races with the haproxy bats suite and
intermittently produces curl exit 7. Expose `refresh-conf` as a
global-only haproxy property that maps to `EASYHAPROXY_REFRESH_CONF`,
lower it to 2 seconds in the bats setup, and wrap the localhost HTTP
assertions in a retry loop so checks wait for haproxy to converge
rather than failing on the first attempt.
2026-04-30 18:40:57 -04:00
Jose Diaz-Gonzalez
554fee91de docs: use explicit type property in proxy:set examples
The 0.38.0 migration documents `proxy:set <app> type <value>` as the canonical way to set the proxy implementation, but several user-facing examples still taught the legacy implicit form. Switch every example over to the explicit property syntax so the docs match the migration guide and other property-based plugin commands.
2026-04-30 17:20:16 -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
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
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
66c4b3b30e feat: add --format json to git:report and nginx:report
Mirrors the JSON output convention already used by scheduler:report, builder:report, network:report, and traefik:report. Both plugins now accept `--format json` to emit a single-line JSON object whose keys are the property names with the plugin prefix stripped. Combining `--format` with an info flag is rejected with an error message that matches the Go-based report helper.

Closes #8499
2026-04-26 23:30:22 -04:00
Jose Diaz-Gonzalez
5bf82d2585 docs: add note about when the new feature lands 2026-04-24 02:40:27 -04:00
Jose Diaz-Gonzalez
2993fa800c feat(nginx): generate 502 config for apps without web listeners
When an app has no web listeners (not yet deployed, no web process type,
or web processes not running), generate a minimal nginx config that
returns 502 Bad Gateway instead of having no config at all. This ensures
domains resolve, monitoring tools detect non-200 status codes, and SSL
certificate provisioning tools like letsencrypt can function.
2026-04-24 02:10:30 -04:00
Jose Diaz-Gonzalez
8cad6c3179 feat: configure Traefik readiness healthchecks based on app.json config
Closes #6834
2026-03-10 19:17:20 -04:00
Jose Diaz-Gonzalez
df8b725081 feat: add support for dns-01 challenge mode when using traefik
Closes #6423
2026-01-07 01:16:05 -05:00
Ostap Brehin
c84c0208a9 Nginx property proxy-keepalive must be an integer 2025-12-28 10:08:11 +00:00
Ostap Brehin
caff2e6b96 Document proxy-keepalive Nginx property 2025-12-27 20:27:29 +00:00
Jose Diaz-Gonzalez
d212fd44c7 refactor: rename functions to be plural
They are plural for the scheduler-k3s plugin.
2025-11-16 18:12:28 -05:00
Jose Diaz-Gonzalez
3a52c7d0a8 docs: add documentation for label management 2025-11-16 16:49:03 -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
othercorey
1d3276a1d7 Fix "its" in Caddy SSL configuration documentation 2025-10-16 23:37:37 -05:00
Petr Hlavicka
bf3b2d396b update docs 2025-07-23 14:49:15 -04:00
Jose Diaz-Gonzalez
a062e283fe chore: revert doc change 2025-07-02 01:14:30 -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
06de81b61b refactor: allow custom nginx command to be set as an nginx property
This avoids adding a new environment variable in favor of a script that can be called both globally as well as on a per-app basis.
2025-06-30 03:29:43 -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
binchengqu
bd1779d53d chore: fix some typos in markdown file
Signed-off-by: binchengqu <bincheng@before.tech>
2024-11-21 12:06:14 +08:00
Thiên Toán
5e740012c7 Update nginx.md
Fix typo
2024-10-30 14:27:24 +07:00
Jose Diaz-Gonzalez
4d7f779c28 feat: add support for various timeout-related functions to nginx, openresty and k3s plugins
Closes #7267
2024-10-16 00:51:01 -04:00
Jose Diaz-Gonzalez
61b7752cce fix: implement missing network:info command
Also add json format output to the network:list command.

Closes #7093
2024-09-23 20:27:13 -04:00
Jose Diaz-Gonzalez
13fb40defd docs: reference actual properties for enabling the traefik api and dashboard 2024-09-22 01:39:41 -04:00
Jose Diaz-Gonzalez
9110e2c365 chore: use python3 instead of python 2024-09-21 17:20:20 -04:00
Jose Diaz-Gonzalez
ab802cb4dd feat: ensure Ubuntu Noble is properly supported by the Dokku release process
Also update doc references to use 24.04 in examples where possible.
2024-08-25 23:31:32 -04:00
Jose Diaz-Gonzalez
bbd5c039b5 docs: unify path setting docs for all custom files 2024-08-11 03:52:48 -04:00
chrisjsimpson
0e2eaca819 Docs fix Update port-management.md RUN -> CMD 2024-05-04 16:08:58 +01:00
Coffee2CodeNL
be4c54b878 Add documentation and unit tests for custom Traefik entrypoints
These changes include updates to documentation, command functions, and related unit tests.
2024-04-08 15:25:44 +02:00
Jose Diaz-Gonzalez
77ffc27e34 Merge pull request #6788 from bumblefudge/typo-patch-in-docs
Fix typos in nginx documentation
2024-04-04 00:16:57 -04:00
crazehang
169d8a927e docs: fix some comments
Signed-off-by: crazehang <zhangrenzhong@outlook.com>
2024-04-03 17:28:12 +08:00
Bumblefudge
586d13a12f three tiny typos 2024-04-02 19:15:17 -04:00
Jose Diaz-Gonzalez
2274eeafda Merge pull request #6731 from strugee/patch-1
Clarify alternate proxy support status
2024-03-18 14:29:43 -04:00
AJ Jordan
4d22ccda78 Clarify alternate proxy support status 2024-03-17 16:34:30 -04:00
Jose Diaz-Gonzalez
ee08b8c0fd chore: remove traefik priority functionality
Setting a priority appears to cause minor outages in certain cases, so we should just avoid setting it on behalf of users and allow them to set this directly.
2024-03-12 22:21:16 -04:00
Jose Diaz-Gonzalez
b8c67329ff feat: allow limiting letsencrypt to certain domains when using openresty as a proxy 2024-03-06 03:31:51 -05:00
Jose Diaz-Gonzalez
b99c25f090 feat: add support for setting underscores-in-headers for nginx, openresty, and k3s
Closes #6627
2024-02-27 13:49:44 -05:00
Jose Diaz-Gonzalez
d4b445985b refactor: consolidate property fetching for nginx plugin into golang codebase
Also update the documentation to include docs for all properties.
2024-02-06 00:42:48 -05:00
Jose Diaz-Gonzalez
7fbb86093b feat: implement global support for setting proxy type 2024-01-19 06:31:19 -05:00
Jose Diaz-Gonzalez
6cac8d2c45 docs: add documentation on openresty includes 2023-11-03 04:17:17 -04:00
Jose Diaz-Gonzalez
f780a8a6f8 docs: fix shell output 2023-08-19 15:04:25 -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
625ea14c8f feat: add openresty proxy implementation
This plugin is mostly compatible with the nginx plugin, but runs the proxy within a docker container. Users do not have direct access to add custom openresty configuration at this time, but instead receive the ability to setup automatic ssl on first request via letsencrypt integration.
2023-08-05 20:59:01 -04:00