Commit Graph

1513 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
24d94576a9 feat: make heroku-22/jammy the default stack for cnb/herokuish builds 2023-08-09 10:11:33 -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
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
Jose Diaz-Gonzalez
5846301a48 tests: make it possible to specify an alternative base domain for tests
When developing Dokku, it is useful to use a real domain to test actual functionality. This is impossible if the domain is hardcoded to dokku.me in testing.
2023-08-05 20:58:26 -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
6168b0c71c tests: correct assertion for dockerfile builds when a variable is eval'd 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
a84f9bca72 tests: remove assertion for unconsumed build arguments
Docker no longer outputs any logging for unconsumed build arguments with the switch to buildx.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
72e8c8d978 tests: correct assertion for dockerfile builds when a variable is eval'd 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
622548057c tests: add assertions to various bats tests
Missing these assertions didn't necessarily break tests but they are more correct and having them should help suss out bugs.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
d6468f4713 tests: use assert_output_not_exists instead of asserting output is empty string 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
1467aaea74 tests: fix issue where networks weren't being torn down during testing
Due to how the variable was assigned, there were cases where the network was specified twice with a := as a delimiter. This would result in no network being removed.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
5717e71755 tests: use an alternative curl request to ensure requests go to the local nginx
The alternative is to rely on DNS and /etc/hosts rules, which isn't quite great because it requires modifying the system.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
4bc3de5540 feat: write auto-detected port mappings during a deploy
During an app build, we now auto-detect ports based on the source code. This is usually http:80:5000, with Dockerfile-based deploys having their ports extracted from the docker image or Dockerfile. Additionally, we add an https:443 mapping for any detected http:80 mapping when there is an ssl certificate, and all http port mappings are transformed to https mappings for Dockerfile-based deploys.

While the ports aren't currently consumed, a future refactor will provide the ability to fallback to the new detected ports when there is no user-specified port mapping.
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
977b4567f8 refactor: simplify ports-configure codebase
This makes it slightly easier to reason about, at the cost of being slower.

Also ignore failure to remove image as this was flaky.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
94f4d1325c feat: export environment variables during dockerfile builds for use with value-less --build-arg flags
Exposing all config values will allow users to skip setting environment variables twice - once as a docker option and once as an env var. Docker will automatically pull the value from the environment if none is set for the --build-arg flag.

Users will still be required to specify each desired env var via --build-arg as otherwise docker builds will complain about unused build arguments.

Re-implements #5978 (lost in a rebase)
Closes #5903
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
11d9ed6724 tests: use ports:report to get the list of port mappings 2023-08-05 10:58:57 -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
798a413096 feat: re-add apps and config cli aliases
This better follows Heroku's output and is more useful to users. The subcommands will be treated as the primary, documented versions, while the aliases are there for convenience.

Closes #5362
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
Jose Diaz-Gonzalez
eb6f85f083 feat: skip scaled processes that are missing in the Procfile
This allows folks to deploy apps that don't have a web process without needing to scale that process down before/after the first deploy. Note that the formations key in the app.json or a manual scale of other processes will be necessary to start anything non-web.

Closes #5700
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
Jose Diaz-Gonzalez
ef25a9b0d8 refactor: standardize on shorthand for redirecting all output to /dev/null
The shorthand is more prevalent in this codebase, and is something that bash supports, so we should just use the same thing everywhere.

Note that we do not use shorthand redirect in Makefile as shell parsing is a bit different in Make and the shorthand redirect doesn't seem to be properly supported, causing CI errors.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
dac566e75e refactor: move all shellcheck disable definitions to .shellcheckrc file
This makes standard use of shellcheck work without needing to provide extra configuration anywhere.

Also remove use of inline 'shellcheck disable' calls that are already defined in the .shellcheckrc and don't need to be set inline.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
60b343470b feat: add support for specifying multiple networks on a given app
Closes #5314
2023-08-05 10:58:46 -04:00
Jose Diaz-Gonzalez
40b20e0c08 refactor: move herokuish app cache from the filesystem into a docker volume
This simplifies cache referencing and also paves the way for removing more from the app git directory.

Refs #1558
2023-08-05 10:35:54 -04:00
Jose Diaz-Gonzalez
a124c419ec Merge pull request #6088 from dokku/dependabot/docker/tests/apps/gogrpc/golang-1.20.7 2023-08-03 01:24:44 -04:00
Jose Diaz-Gonzalez
26be81f1bd Merge pull request #6087 from dokku/dependabot/docker/tests/apps/zombies-dockerfile-no-tini/golang-1.20.7 2023-08-03 01:24:36 -04:00
dependabot[bot]
5b7cfe906d chore(deps): bump golang from 1.20.6 to 1.20.7 in /tests/apps/gogrpc
Bumps golang from 1.20.6 to 1.20.7.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-03 05:24:26 +00:00
Jose Diaz-Gonzalez
e571e59507 Merge pull request #6086 from dokku/dependabot/go_modules/tests/apps/gogrpc/golang.org/x/net-0.13.0 2023-08-03 01:24:24 -04:00
dependabot[bot]
1fc3261be6 chore(deps): bump golang in /tests/apps/zombies-dockerfile-no-tini
Bumps golang from 1.20.6 to 1.20.7.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-03 05:24:12 +00:00
Jose Diaz-Gonzalez
20145bd631 Merge pull request #6085 from dokku/dependabot/docker/tests/apps/go-fail-postdeploy/golang-1.20.7 2023-08-03 01:24:10 -04:00
Jose Diaz-Gonzalez
03cb4691bb Merge pull request #6084 from dokku/dependabot/docker/tests/apps/go-fail-predeploy/golang-1.20.7 2023-08-03 01:23:52 -04:00
dependabot[bot]
e68780bd07 chore(deps): bump golang.org/x/net in /tests/apps/gogrpc
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.12.0 to 0.13.0.
- [Commits](https://github.com/golang/net/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 13:31:19 +00:00
dependabot[bot]
a038e99b2a chore(deps): bump golang in /tests/apps/go-fail-postdeploy
Bumps golang from 1.20.6 to 1.20.7.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 13:20:30 +00:00
dependabot[bot]
b3ec751b8c chore(deps): bump golang in /tests/apps/go-fail-predeploy
Bumps golang from 1.20.6 to 1.20.7.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 13:14:10 +00:00
dependabot[bot]
e9482e4624 chore(deps): bump golang in /tests/apps/zombies-dockerfile-tini
Bumps golang from 1.20.6 to 1.20.7.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 13:08:20 +00:00
Jose Diaz-Gonzalez
0cb68eeac5 Merge pull request #6049 from dokku/dependabot/pip/tests/apps/multi/gunicorn-21.2.0
chore(deps): bump gunicorn from 21.1.0 to 21.2.0 in /tests/apps/multi
2023-07-20 21:41:03 -04:00
dependabot[bot]
a9aea2386c chore(deps): bump gunicorn in /tests/apps/python-flask
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 21.1.0 to 21.2.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/21.1.0...21.2.0)

---
updated-dependencies:
- dependency-name: gunicorn
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 13:43:10 +00:00
dependabot[bot]
fca84b151c chore(deps): bump gunicorn from 21.1.0 to 21.2.0 in /tests/apps/multi
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 21.1.0 to 21.2.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/21.1.0...21.2.0)

---
updated-dependencies:
- dependency-name: gunicorn
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 13:13:13 +00:00
Jose Diaz-Gonzalez
ea7c02ca89 Merge pull request #6046 from dokku/dependabot/pip/tests/apps/python-flask/gunicorn-21.1.0
chore(deps): bump gunicorn from 20.1.0 to 21.1.0 in /tests/apps/python-flask
2023-07-18 12:15:10 -04:00
Jose Diaz-Gonzalez
a9fe838d86 Merge pull request #6045 from dokku/dependabot/pip/tests/apps/multi/gunicorn-21.1.0
chore(deps): bump gunicorn from 20.1.0 to 21.1.0 in /tests/apps/multi
2023-07-18 12:14:57 -04:00
Jose Diaz-Gonzalez
1ee5fbda46 Merge pull request #6036 from l3x4/fix-traefik-vhosts-templates-compose
Fix traefik vhosts compose template
2023-07-18 12:11:15 -04:00
dependabot[bot]
fc57ae329a chore(deps): bump gunicorn in /tests/apps/python-flask
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.1.0 to 21.1.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.1.0...21.1.0)

---
updated-dependencies:
- dependency-name: gunicorn
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 13:24:55 +00:00
dependabot[bot]
b904adb2b2 chore(deps): bump gunicorn from 20.1.0 to 21.1.0 in /tests/apps/multi
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.1.0 to 21.1.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.1.0...21.1.0)

---
updated-dependencies:
- dependency-name: gunicorn
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 13:10:51 +00:00
Alexey Kharchenko
687c90844d Add test for dokku traefik:show-config 2023-07-17 18:14:47 +05:30
Ronald Ip
1ffb62ac82 Test: Print docker container logs during startup. 2023-07-14 11:45:17 +08:00
Ronald Ip
204732ce39 Test plugin-list within docker-based dokku installs.
Cap docker container connectivity test iterations to 100.
2023-07-14 11:45:17 +08:00
Jose Diaz-Gonzalez
55c57d049b Merge pull request #6034 from dokku/dependabot/docker/tests/apps/zombies-dockerfile-tini/golang-1.20.6
chore(deps): bump golang from 1.20.5 to 1.20.6 in /tests/apps/zombies-dockerfile-tini
2023-07-12 13:59:52 -04:00
Jose Diaz-Gonzalez
b62038d7ca Merge pull request #6032 from dokku/dependabot/docker/tests/apps/zombies-dockerfile-no-tini/golang-1.20.6
chore(deps): bump golang from 1.20.5 to 1.20.6 in /tests/apps/zombies-dockerfile-no-tini
2023-07-12 13:59:41 -04:00