Commit Graph

199 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
1a07025e99 chore: deprecate the pre-deploy trigger in favor of the pre-release-builder trigger 2024-04-04 02:36:01 -04:00
crazehang
169d8a927e docs: fix some comments
Signed-off-by: crazehang <zhangrenzhong@outlook.com>
2024-04-03 17:28:12 +08:00
Jose Diaz-Gonzalez
c49322bd34 feat: manage vector container via compose
Using compose instead of manual docker calls allows folks to customize the vector container by using a custom compose.yml template file. This opens us up to more customizations while aligning container management with how we do other external containers (such as for the proxy plugins).

Refs #5784
2024-01-26 06:46:18 -05:00
Jose Diaz-Gonzalez
98d0a95ae6 feat: add a post-registry-login trigger
This allows other plugins to execute commands after a registry has been authenticated against.
2024-01-18 22:25:23 -05:00
Jose Diaz-Gonzalez
78d24ead09 feat: add the ability to specify the output format when listing ports 2024-01-18 22:00:53 -05:00
Pablo
7b209b01f0 docs: Fix app-exists plugin trigger description 2023-10-28 11:20:19 +02:00
Jose Diaz-Gonzalez
5e72bfabad Merge pull request #6283 from dokku/remove-deprecated-proxy-code
Remove deprecated proxy-ports functions and and plugin subcommands
2023-10-16 16:38:30 -04:00
Jose Diaz-Gonzalez
30b8a25ced feat: upgrade golang to 1.21 2023-10-16 01:10:02 -04:00
Jose Diaz-Gonzalez
126a3ed509 chore: remove deprecated proxy-ports functions and and plugin subcommands
These were deprecated in 0.31.0 in favor of the ports plugin.
2023-10-16 00:18:39 -04:00
Jose Diaz-Gonzalez
c23e878e7d feat: add the ability to specify a custom mailto for all cron output 2023-10-15 20:25:09 -04:00
Jose Diaz-Gonzalez
a433508fb1 chore: deprecate the builder-specific pre-build-* triggers in favor of a global pre-build trigger
The pre-build trigger takes a `BUILDER_TYPE` parameter, allowing folks to perform specific actions as needed.
2023-10-15 20:25:09 -04:00
Jose Diaz-Gonzalez
b19b409dd6 chore: deprecate the builder-specific post-build-* triggers in favor of a global post-build trigger
The pre-build trigger takes a `BUILDER_TYPE` parameter, allowing folks to perform specific actions as needed.
2023-10-15 20:25:09 -04:00
Jose Diaz-Gonzalez
cdd5698db9 chore: deprecate the builder-specific pre-release-* triggers in favor of a global pre-release-builder trigger
The pre-release-builder trigger takes a `BUILDER_TYPE` parameter, allowing folks to perform specific actions as needed.
2023-10-15 20:25:09 -04:00
Jose Diaz-Gonzalez
f433e008e9 Merge pull request #6129 from dokku/cleanup-markdown
Cleanup markdown and use Github Admonitions
2023-08-19 18:55:35 -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
f58cf7f87c chore: add documentation for all events 2023-08-19 11:45:31 -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
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
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
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
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
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
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
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
87828515a1 fix: respect the build-dir in app-json extraction
Because the app-json extraction happens before the build-dir is set, it doesn't end up respecting the value, and thus the user might get the wrong app.json file.

This takes advantage of path.Join()'s default of ignoring empty paths.
2023-02-14 03:56:28 -05:00
Jose Diaz-Gonzalez
f84a650849 chore: remove deprecated nginx commands 2023-02-12 13:20:45 -05:00
Jose Diaz-Gonzalez
a5fa3725e6 chore: remove deprecated builder-specific post-release hooks
This option was deprecated in Dokku 0.25.0.
2023-01-16 01:25:41 -05:00
Jose Diaz-Gonzalez
852dfc6287 feat: add json output format support to storage:list
This will allow the command to be used in a programmatic fashion.
2022-12-26 16:33:40 -05:00
Jose Diaz-Gonzalez
1e58b56ac7 feat: add git-get-property trigger 2022-12-18 17:49:47 -05:00
Jose Diaz-Gonzalez
c2ebf48524 refactor: use a single implementation for checking cnb/herokuish images
Also use a plugin trigger for testing whether an image is herokuish or not rather than trying to mess around with sourced files.
2022-12-02 15:54:48 -05:00
Jose Diaz-Gonzalez
edd6e476b3 refactor: simplify how url generation works
The URLS file is no longer necessary as urls are now generated directly from the app VHOST file.

This also moves all the url generation logic to the domains plugin.
2022-12-02 02:19:59 -05:00
Jose Diaz-Gonzalez
9eab17af11 refactor: setup app domains in the post-create hook
This is more consistent with app setup, at the cost of making it so developers must disable domains manually afterwards.
2022-12-01 22:39:38 -05:00
Jose Diaz-Gonzalez
6fed37b408 refactor: rename pre-restore trigger to scheduler-pre-restore
This better reflects what the trigger does, and allows us to use the pre-restore trigger at the beginning of the ps:restore command.
2022-11-29 01:38:36 -05:00
Jose Diaz-Gonzalez
fe4d80a82b refactor: cleanup zero'd out processes when a Procfile omitting those process types is set
This change also moves the referenced Procfile out to a host path once on deploy vs potentially several times, which should speed up deploys a small amount and simplify reasoning about the file.

Closes #5112
2022-11-25 14:50:35 -05:00
Jose Diaz-Gonzalez
f5c3b5dc34 refactor: move DOKKU_WAIT_TO_RETIRE to a checks property
This centralizes the property and removes one more dokku-specific property from the app environment variables.

Closes #5049
2022-11-22 20:27:43 -05:00
Jose Diaz-Gonzalez
d6920230db feat: implement run:logs command
Closes #5312
2022-11-02 16:49:43 -04:00
Jose Diaz-Gonzalez
69738abec2 feat: add json format output to run:list
Also add some unit tests to the command.

Closes #5171
2022-08-22 22:37:04 -04:00
Jose Diaz-Gonzalez
b605de522c refactor: split out proxy port configuration into it's own trigger
This will allow it to be called by plugins other than the nginx-vhosts one.
2022-08-10 04:23:05 -04:00
Jose Diaz-Gonzalez
70fc35c317 chore: drop unsupported operating systems
We will no longer support CentOS, Fedora, and Opensuse as installation targets. These are not actively maintained by anyone with commit rights and occasionally cause issues for users as they are not tested during the release process.

Rather than have subpar support for an untested operating system, we're removing support for them completely. Users of these operating systems should take a look migration to the docker-based installation method, which will always be tested and supported by the project.

Additionally, drop support for Debian 9 as it is now EOL.
2022-08-07 18:36:30 -04:00
Jose Diaz-Gonzalez
f87cd22340 feat: allow returning an unfiltered list of users
This is useful for upgrades or commands that _must_ perform against all apps.
2022-05-15 15:33:19 -04:00
Jose Diaz-Gonzalez
1b6861cdbb feat: add plugin trigger for checking if an app has code
This will allow us to short-circuit build processes that would otherwise be triggered due to various commands in Dokku.
2022-04-16 01:40:22 -04:00
Jose Diaz-Gonzalez
1a052969dc feat: app filtering to commands listing or iterating over apps
This increases the time to list apps from .05s to .2s~.3s on the simplest check, but the increased time is worth it for actually verifyng access to an app (should that need arise).

We'll also want to add the same to app existence checks.
2022-02-26 00:37:54 -05:00
Jose Diaz-Gonzalez
57858c1788 fix: ensure installations treat raspbian as similar to debian buster as possible 2021-10-28 02:41:10 -04:00