Commit Graph

2639 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
af6267f3b5 fix: restore default domains and reset proxy ports on vhost enable
Re-enabling vhost (via `proxy:enable`, `domains:enable`, or `domains:add` with no global VHOST) was leaving the app pinned to the random high port and the empty VHOST file from the previous disabled state, so the new catch-all vhost intercepted requests for the app's domain. The `domains-enable` trigger now restores default vhosts via `domains_enable`, and `pre-enable-vhost` clears any stored proxy ports so they can be recomputed to 80/443. Also fixes the netrc lookup in the `git:auth` test to read dokku's netrc file directly.
2026-04-27 14:43:20 -04:00
Jose Diaz-Gonzalez
b2ea5406fe fix: remove sites-enabled default instead of renaming
Renaming `/etc/nginx/sites-enabled/default` to `.dokku-disabled` left a broken symlink that nginx's `include /etc/nginx/sites-enabled/*;` glob still picked up, breaking config validation. Files inside `sites-enabled/` are now removed; the real config in `sites-available/default` is still preserved via rename.
2026-04-27 14:43:20 -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
b92310c4c8 Merge pull request #8508 from dokku/8230-renaming-app-clears-the-set-domain
Preserve all domains when renaming an app
2026-04-27 07:19:48 -04:00
Jose Diaz-Gonzalez
bc603d7b9c test: drain dead-containers before scale-up assertion
The intermediate container count check raced with the existing
zero-downtime retire of the previous container, so docker ps still
saw the renamed-but-pending container until wait-to-retire elapsed.
2026-04-27 03:29:06 -04:00
Jose Diaz-Gonzalez
4927ca092d fix: retire orphaned containers when scaling down
When scaling a process type to a smaller count, the indices above the
new count had their `CONTAINER.<proctype>.<idx>` state files deleted but
the underlying Docker containers were never registered for retirement,
so they remained running indefinitely. The cleanup block now reads each
orphaned state file and registers its container id with the existing
`scheduler-register-retired` trigger before the file is removed.
2026-04-27 03:23:15 -04:00
Jose Diaz-Gonzalez
e54fcc4035 Merge pull request #6716 from dokku/1558-move-env
Move app and global ENV files to consolidated config path
2026-04-27 02:50:24 -04:00
Jose Diaz-Gonzalez
c2a07c3f1c fix: preserve all domains when renaming an app
The `post-app-rename-setup` trigger redirected `sed` output to the new
app's VHOST file inside a loop over global vhosts, so each iteration
clobbered the previous one and only the last global subdomain was
rewritten. When no global vhost was set, the loop never ran and the
new app's VHOST file was never written, leaving the renamed app with
no domains.

Copy the old app's VHOST file once as a baseline, then apply `sed -i`
in place for each global vhost so substitutions accumulate. Guard
against a missing global VHOST file and skip blank lines.
2026-04-27 01:47:50 -04:00
Jose Diaz-Gonzalez
8847fcb6b0 Merge pull request #8505 from dokku/8504-git-auth-status
Add git:auth-status to check netrc match
2026-04-27 01:25:46 -04:00
Jose Diaz-Gonzalez
38c6b180af fix: reference env from config dir 2026-04-27 01:05:41 -04:00
Jose Diaz-Gonzalez
365e300eb6 Merge pull request #8506 from dokku/8499-add-format-json-support-to-nginx-report-and-git-report
Add --format json to git:report and nginx:report
2026-04-27 01:04:52 -04:00
Jose Diaz-Gonzalez
769d029b0d fix: verify piped git:auth password via netrc get 2026-04-27 00:08:05 -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
65bdbefbea feat: add git:auth-status to check netrc match
Adds `git:auth-status HOST [USERNAME] [PASSWORD]` which exits 0 when the
configured `.netrc` entry matches the requested state and 1 otherwise,
allowing external tooling to detect whether `git:auth` would change
anything without reading `$DOKKU_ROOT/.netrc` directly. Both `git:auth`
and `git:auth-status` now also accept the password via `STDIN`.
2026-04-26 23:10:30 -04:00
Jose Diaz-Gonzalez
3ba51725be fix(tests): adapt app.json fixtures and tini test for env processing
Pre-set LOCAL_DOMAIN in the tini test so mastodon's required env var
resolves, and replace unsupported `generator: "echo 5"` with `value: "5"`
in the nodejs-express and dockerfile fixtures so WEB_CONCURRENCY no
longer aborts deploys via the new app.json env processor.
2026-04-26 22:43:32 -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
cef1e7aff5 chore: bump go version to 1.26.2 and run go mod tidy 2026-04-26 09:57:35 -04:00
Jose Diaz-Gonzalez
f5cbc51fec fix(tests): drop DOKKU_PROXY_PORT from config:show and config:export expectations now that it lives as a property rather than a config var 2026-04-26 08:53:27 -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
0a6eb14dd1 Merge pull request #8157 from dokku/7102-buildpacks-app-json
Add support for specifying buildpacks via app.json
2026-04-26 04:07:14 -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
24f460f5d3 fix: address CI failures from env var migration
- Add apps:set subcommand for managing apps properties (mirrors
  ps:set, scheduler:set, builder:set pattern)
- Update nginx-vhosts functions/pre-disable-vhost/pre-enable-vhost
  to read proxy port from properties instead of config vars
- Fix test commands to use correct property-setting approaches:
  prop binary for ports properties, apps:set for apps properties
2026-04-25 16:33:34 -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
2745e46054 fix(tests): expect 502 for cloned app without deploy
The apps:clone --skip-deploy test expected 404 for the cloned app's
domain. With the new empty nginx config, undeployed apps now correctly
return 502 Bad Gateway instead of falling through to nginx's default.
2026-04-25 00:55:55 -04:00
Jose Diaz-Gonzalez
ddf470282e fix(tests): update config and nginx tests for post-create side effects
The config:show and config:export tests now include DOKKU_PROXY_PORT
in expected output since ports-configure runs at app creation time.

Add sleep before HTTP assertion in nginx-vhosts_13 test to allow
nginx async reload to complete.
2026-04-24 05:02:49 -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
dependabot[bot]
9087d8d5d5 chore(deps-dev): bump heroku/heroku-buildpack-php in /tests/apps/php
Bumps [heroku/heroku-buildpack-php](https://github.com/heroku/heroku-buildpack-php) from 285 to 287.
- [Release notes](https://github.com/heroku/heroku-buildpack-php/releases)
- [Changelog](https://github.com/heroku/heroku-buildpack-php/blob/main/CHANGELOG.md)
- [Commits](https://github.com/heroku/heroku-buildpack-php/compare/v285...v287)

---
updated-dependencies:
- dependency-name: heroku/heroku-buildpack-php
  dependency-version: '287'
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 05:12:06 +00:00
dependabot[bot]
424ecb96dc chore(deps): bump ruby in /tests/apps/dockerfile-entrypoint
Bumps ruby from 4.0.2 to 4.0.3.

---
updated-dependencies:
- dependency-name: ruby
  dependency-version: 4.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-22 13:53:09 +00:00
dependabot[bot]
9dbaf34f99 chore(deps): bump psycopg2-binary in /tests/apps/dockerfile-release
Bumps [psycopg2-binary](https://github.com/psycopg/psycopg2) from 2.9.11 to 2.9.12.
- [Changelog](https://github.com/psycopg/psycopg2/blob/master/NEWS)
- [Commits](https://github.com/psycopg/psycopg2/compare/2.9.11...2.9.12)

---
updated-dependencies:
- dependency-name: psycopg2-binary
  dependency-version: 2.9.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-21 13:54:44 +00: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
Jose Diaz-Gonzalez
d191c1d6e9 chore: bump dependencies in tests/apps/php 2026-04-14 04:41:48 -04:00
Jose Diaz-Gonzalez
be14329b9a chore: bump dependencies in tests/apps/multi
While not in the build path, we should try and avoid unsupported dependencies where possible.
2026-04-14 03:14:11 -04:00
Jose Diaz-Gonzalez
b7c921ce32 Merge pull request #8457 from dokku/dependabot/docker/tests/apps/zombies-dockerfile-no-tini/golang-1.26.2
chore(deps): bump golang from 1.26.1 to 1.26.2 in /tests/apps/zombies-dockerfile-no-tini
2026-04-08 17:51:43 -04:00
Jose Diaz-Gonzalez
75642a9fe1 Merge pull request #8456 from dokku/dependabot/docker/tests/apps/go-fail-postdeploy/golang-1.26.2
chore(deps): bump golang from 1.26.1 to 1.26.2 in /tests/apps/go-fail-postdeploy
2026-04-08 17:51:32 -04:00
Jose Diaz-Gonzalez
f2770f6301 Merge pull request #8455 from dokku/dependabot/docker/tests/apps/gogrpc/golang-1.26.2
chore(deps): bump golang from 1.26.1 to 1.26.2 in /tests/apps/gogrpc
2026-04-08 17:49:33 -04:00
Jose Diaz-Gonzalez
6feabe15b9 Merge pull request #8454 from dokku/dependabot/docker/tests/apps/zombies-dockerfile-tini/golang-1.26.2
chore(deps): bump golang from 1.26.1 to 1.26.2 in /tests/apps/zombies-dockerfile-tini
2026-04-08 17:49:08 -04:00
Jose Diaz-Gonzalez
af03d9eb08 Merge pull request #8453 from dokku/dependabot/docker/tests/apps/go-fail-predeploy/golang-1.26.2
chore(deps): bump golang from 1.26.1 to 1.26.2 in /tests/apps/go-fail-predeploy
2026-04-08 17:48:47 -04:00
Jose Diaz-Gonzalez
96ef28539e Merge pull request #8452 from dokku/dependabot/bundler/tests/apps/ruby/rack-session-2.1.2
chore(deps): bump rack-session from 2.1.1 to 2.1.2 in /tests/apps/ruby
2026-04-08 17:48:37 -04:00
dependabot[bot]
c0644644f4 chore(deps): bump django in /tests/apps/dockerfile-release
Bumps [django](https://github.com/django/django) from 5.2.12 to 5.2.13.
- [Commits](https://github.com/django/django/compare/5.2.12...5.2.13)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 5.2.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 13:56:09 +00:00
dependabot[bot]
8a0443dc37 chore(deps): bump golang in /tests/apps/zombies-dockerfile-no-tini
Bumps golang from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.26.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 13:53:30 +00:00
dependabot[bot]
f4c224f464 chore(deps): bump golang in /tests/apps/go-fail-postdeploy
Bumps golang from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.26.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 13:53:26 +00:00
dependabot[bot]
88c25ef9fd chore(deps): bump golang from 1.26.1 to 1.26.2 in /tests/apps/gogrpc
Bumps golang from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.26.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 13:53:24 +00:00
dependabot[bot]
1735efc9ea chore(deps): bump golang in /tests/apps/zombies-dockerfile-tini
Bumps golang from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.26.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 13:53:17 +00:00
dependabot[bot]
a8e4323693 chore(deps): bump golang in /tests/apps/go-fail-predeploy
Bumps golang from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.26.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 13:53:10 +00:00
dependabot[bot]
bc9140a2fe chore(deps): bump rack-session from 2.1.1 to 2.1.2 in /tests/apps/ruby
Bumps [rack-session](https://github.com/rack/rack-session) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/rack/rack-session/releases)
- [Changelog](https://github.com/rack/rack-session/blob/main/releases.md)
- [Commits](https://github.com/rack/rack-session/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: rack-session
  dependency-version: 2.1.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 03:50:58 +00:00
Jose Diaz-Gonzalez
3140b680da Merge pull request #8444 from dokku/dependabot/bundler/tests/apps/ruby/rack-3.2.6
Some checks failed
CI / check-commit (push) Successful in -1s
CodeQL / Analyze (go) (push) Failing after 1m2s
docs / deploy (push) Failing after 15m9s
lint / hadolint (push) Successful in 39s
lint / markdown-lint (push) Successful in 11m6s
lint / packer (push) Failing after 59s
lint / shellcheck (push) Successful in 38s
lint / shfmt (push) Successful in 6m37s
lint / yamllint (push) Failing after 2s
CI / build (push) Failing after 15m46s
CI / build-image.linux/amd64 (push) Has been skipped
CI / build-image.linux/arm64 (push) Has been skipped
CI / unit.${{ matrix.index }} (push) Has been skipped
CI / docker (push) Has been skipped
CI / go.0 (push) Has been skipped
CI / go.1 (push) Has been skipped
CI / go.2 (push) Has been skipped
CI / go.3 (push) Has been skipped
CI / publish-test-results (push) Has been skipped
chore(deps): bump rack from 3.2.5 to 3.2.6 in /tests/apps/ruby
2026-04-04 06:01:15 -04:00
dependabot[bot]
c576e1cd4b chore(deps): bump werkzeug in /tests/apps/python-flask
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.1.7 to 3.1.8.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.1.7...3.1.8)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-version: 3.1.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-03 13:52:26 +00:00
dependabot[bot]
8a2b907d3b chore(deps): bump rack from 3.2.5 to 3.2.6 in /tests/apps/ruby
Bumps [rack](https://github.com/rack/rack) from 3.2.5 to 3.2.6.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v3.2.5...v3.2.6)

---
updated-dependencies:
- dependency-name: rack
  dependency-version: 3.2.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 19:00:59 +00:00
dependabot[bot]
63f339fe0e chore(deps): bump google.golang.org/grpc in /tests/apps/gogrpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.79.3 to 1.80.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.79.3...v1.80.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.80.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 17:32:07 +00:00
Jose Diaz-Gonzalez
4e6560c57c Merge pull request #8434 from dokku/dependabot/pip/tests/apps/python-flask/gunicorn-25.3.0
chore(deps): bump gunicorn from 25.2.0 to 25.3.0 in /tests/apps/python-flask
2026-03-29 02:29:13 -04:00