Commit Graph

9183 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
038b768585 fix: correct version 2023-08-13 21:54:25 -04:00
Jose Diaz-Gonzalez
c7c1e4ab17 Merge pull request #6116 from dokku/josegonzalez-patch-1
Remove extra newline in migration docs
2023-08-09 13:53:31 -04:00
Jose Diaz-Gonzalez
1ee0fc7dc5 docs: remove extra newline 2023-08-09 13:53:14 -04:00
Jose Diaz-Gonzalez
22cfab9912 Merge pull request #6109 from dokku/heroku-22
Make heroku-22/jammy the default stack for cnb/herokuish builds
2023-08-09 11:35:19 -04:00
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
6cdd81ca7a Merge pull request #6110 from dokku/fix-release-changelog
Correctly handle rebase when generating release notes for minor/major releases
2023-08-08 23:36:22 -04:00
Jose Diaz-Gonzalez
8d25b931dd fix: correctly handle rebase when generating release notes for minor/major releases
With the integration branch where pull requests are merged prior to a release, we require a rebase every so often to ensure there aren't any issues upon merging to master. Unfortunately, this breaks the link between the original PR and the integration PR, thus causing changelog generation to fail as it depended upon those - now removed - merge request commits.

With this change, we introduce usage of milestones in order to track what is getting merged into a release. Milestones are only used for major/minor releases, and all others will fall back to the default git log method.
2023-08-08 23:07:02 -04:00
Jose Diaz-Gonzalez
990ca04374 Merge pull request #6103 from dokku/timeout-image-builds
feat: timeout docker image builds in CI
2023-08-07 03:06:12 -04:00
Jose Diaz-Gonzalez
e09b0eb1b9 feat: timeout docker image builds in CI
ARM usually takes quite a while to build. If it takes more than ~15 minutes, then it is usually going to fail anyways, so timeout early.

AMD64 takes ~3 minutes, and ARM64 appears to take 15 minutes.
2023-08-07 03:05:47 -04:00
Jose Diaz-Gonzalez
f3114212b6 Merge pull request #6102 from dokku/josegonzalez-patch-1
Deprecate ARM as a build target
2023-08-07 01:37:55 -04:00
Jose Diaz-Gonzalez
5b738f50c3 docs: deprecated ARM as a build target
AMD64 and ARM64 continue to be supported, but ARM in CI is not currently supported and doesn't get local testing either, so deprecating it now and removing it in the future makes most sense for the project.
2023-08-07 01:37:18 -04:00
Jose Diaz-Gonzalez
a0d92469a9 Merge pull request #6100 from dokku/2760-non-web-healthchecks
Add support for non-web healthchecks via app.json
2023-08-06 18:57:47 -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
6f0b32e86b Merge pull request #6082 from dokku/openresty-docker-proxy
Add openresty proxy implementation
2023-08-05 23:53:45 -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
7f7a044a07 docs: clean up references in proxy plugins 2023-08-05 11:07:55 -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
d06f337c3c feat: upgrade traefik image from v2.8 to v2.10 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
3218a496c5 feat: upgrade caddy image from 2.7 to 2.8 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
56e18be2cf feat: upgrade vector image from 0.23.x to 0.31.x 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
aee691a5fb fix: use correct namespace for haproxy service state tracking 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
69e56fc976 fix: remove debugging code from builder-dockerfile plugin 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
c1279468d8 fix: use correct quoting in format template when fetching exposed image ports 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
04905bf553 fix: run go mod update 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
2b1e173c03 fix: do not write empty values for nginx container labels
This ensures the nginx-docker-proxy project doesn't use the empty values as explicit values.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
3f127a7cc4 feat: inject docker labels when nginx proxy implementation is in use
This will allow users to switch to a docker label-based nginx proxy server transparently without rebuilds (after the first one), which would mimic how the caddy, haproxy, and traefik proxy implementations work.

See https://github.com/dokku/nginx-docker-proxy for an example server implementation.
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
b44be8def9 refactor: rename port-map property to port 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
48d5820b8c refactor: deprecate proxy-configure-ports plugin trigger in favor of ports-configure
This also rewrites the logic to be in golang, which will make it easier to refactor portions of it to use the property system going forward.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
192f7cf768 refactor: move code for fetching an available port to the ports plugin
Also translate the code to golang.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
121e4737a8 refactor: move code that fetches raw tcp ports for dockerfile deploys to ports plugin 2023-08-05 10:58:57 -04:00
Igor Loskutov
bdf0b6c509 Add application/wasm to nginx.conf.sigil gzip 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
87c4cb7230 docs: sort the plugin triggers 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
1431724b85 feat: use ports-clear plugn trigger to manage clearing the port map
This removes any access to the underlying implementation for port map clearing, which will make it easier to refactor the actual clearing.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
fb9d77878d refactor: move CHECKS file extraction to the beginning of the deploy
This makes deploys faster for any that are built from source as the image artifact isn't involved in those cases while also unifying how the file is handled.

Refs #2760
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
b8680f7de7 fix: automatically clear the git source-image property when changing deployment methodologies
This ensures users don't have issues with cached state in regards to files pulled from the repo/image.

Also add missing docs for deploy-source-set trigger.

Closes #5963
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
914475f3e4 refactor: use ports-get plugn trigger for fetching port mappings
This removes use of ports internals from other plugins, which will make it easier to refactor the underlying property storage.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
9bd6e17903 docs: update migration guide to point out other important changes 2023-08-05 10:58:57 -04:00