24 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
5faabea3d4 feat: port vhost proxy :report subcommands to golang
The bash :report implementations for the caddy, haproxy, openresty, and traefik proxy plugins are replaced with a compiled golang binary that collects report keys in parallel and marshals json directly. The traefik dns-provider values keep their masking behaviour, remaining hidden in the default stdout report while surfacing for --format json or an explicit flag query. These four plugins previously had no unit tests, so a bats suite covering the report matrix is added for each.
2026-07-07 06:29:01 -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
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
7b515ea129 refactor: drop unused value_exists from report functions
The `value_exists` variable in the report info-flag loop is no longer read after the `not deployed` failure was removed, and was already unused in domains, haproxy-vhosts, traefik-vhosts, caddy-vhosts, and openresty-vhosts. Drop the declaration and the trailing assignment so the loop reads cleanly across all plugins.
2026-05-10 22:23:46 -04:00
Jose Diaz-Gonzalez
964c0fc4e9 fix: source property-functions where fn-plugin-property-* helpers are used
The release_and_deploy function and several proxy plugin scripts call fn-plugin-property-* helpers without sourcing `plugins/common/property-functions`, producing `command not found` errors during deploys. Source the helpers from `plugins/common/functions` and from each proxy plugin entry point that consumes them.
2026-05-04 06:11:22 -04:00
Jose Diaz-Gonzalez
e8d8b0683a fix: preserve info flag in plugin reports with --global
The argument-handling block in each plugin's report command overwrote APP with --global before checking whether $1 actually held an info flag, so `dokku <plugin>:report --global --<plugin>-foo` always emitted the full report instead of the requested value. Reorder the conditionals across the sixteen plugins that share the pattern so the info-flag check runs first, and add a regression bats case for each one.
2026-04-30 21:05:46 -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
Matt Farmer
3cf02f9904 feat(traefik-vhosts): support custom entrypoint for API/dashboard
Add two new global-only properties to configure a dedicated Traefik entrypoint
for the API and dashboard, enabling network isolation on private interfaces.
Includes comprehensive test coverage for property management and compose config.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-28 18:07:07 -05: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
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
12cc31427b refactor: split out label subcommands into distinct commands 2025-11-16 16:30:56 -05:00
dragonhunt02
4eafd3b5b7 feat: implement proxy container :label functionality 2025-11-16 02:38:36 -05:00
Jose Diaz-Gonzalez
6ce10b5be6 fix: ensure compose projects are spawned from the /tmp directory
A recent update to compose executes a stat call in the current working directory, which may have incorrect permissions for execution once the user is changed to the dokku user. This change forces all compose commands to execute in the /tmp directory by using a helper function to execute compose up/down.

Closes #7705
2025-05-24 23:31:41 -04: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
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
7f7a044a07 docs: clean up references in proxy plugins 2023-08-05 11:07:55 -04:00
Jose Diaz-Gonzalez
5fed0c45ac refactor: use the properties system instead of the data dir for tracking whether a proxy should be stopped or started 2022-11-29 01:38:36 -05:00
Jose Diaz-Gonzalez
b97a5c0c00 feat: keep track of whether proxy implementation should be stopped or started 2022-11-29 01:38:36 -05:00
Jose Diaz-Gonzalez
5c205b9e27 feat: keep track of whether caddy and traefik should be stopped/started 2022-11-29 01:38:36 -05:00
Jose Diaz-Gonzalez
e26b0ba1db feat: add ability to set a custom priority for traefik routing rules 2022-11-27 22:23:06 -05:00
Jose Diaz-Gonzalez
3ff5e0e3a6 fix: error out if commands using compose are executed
Refs #5335
2022-11-05 23:44:51 -04:00
Jose Diaz-Gonzalez
d5085d3156 feat: expose letsencrypt-server property for traefik plugin 2022-08-10 13:56:06 -04:00
Jose Diaz-Gonzalez
aeaf8e78f1 fix: run shfmt 2022-08-10 05:20:54 -04:00
Jose Diaz-Gonzalez
8fe122ffbd feat: implement the traefik plugin
This plugin uses a docker-compose based Traefik installation in conjunction with injected container labels to route requests. It only exposes the minimal necessary for routing traffic to docker containers. Users wishing to customize further labels may explore using the docker-options plugin to attach additional labels during the 'deploy' phase.
2022-08-10 05:20:54 -04:00