Commit Graph

118 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
ed84f21c08 refactor: standardize apt-get usage
- Always put flags in same location
- Always use apt-get
- Add --no-install-recommends where possible
2021-01-17 20:19:56 -05:00
Jose Diaz-Gonzalez
2a6c411edf docs: remove extra verify_app_name call in documentation 2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
451abcf8f3 feat: add initial support for cloud native buildpacks
This change adds a new builder - builder-cnb - via the 'DOKKU_CNB_EXPERIMENTAL' environment variable. While support for customizing pack builds is not currently implemented and there may be other missing functionality, this initial implementation allows folks to start playing with CNB.

Future releases of Dokku will provide tighter CNB integration and eventually switch to CNB for default building, as well as allow users to better select builders needed for their applications.

All new code for CNB support should be considered experimental and subject to change as the support evolves over time.
2020-12-01 14:50:27 -05:00
Jose Diaz-Gonzalez
0786954d34 feat: schedule related images for cleanup when retiring containers
If the containers no longer exist and the images are unused, we should remove the images as well.

Note that images may sometimes stick around for a little while, depending on the retire schedule and the wait time specified for the container.

Closes #4104
2020-11-26 03:21:45 -05:00
Jose Diaz-Gonzalez
c343316864 Merge pull request #4198 from dokku/4083-fewer-extracts
Reference extracted Procfile
2020-11-23 01:36:53 -05:00
Jose Diaz-Gonzalez
fceb412fb1 fix: reference extracted Procfile
Rather than attempting to always extract the Procfile, reference the one that was extracted by the last deploy. This fixes issues where 'docker container cp' may fail intermittently for lord knows what reason.

Closes #4083
2020-11-22 17:14:18 -05:00
Jose Diaz-Gonzalez
ef490f0a05 feat: retire intermediate containers after use
Rather than waiting for the next deploy, take advantage of the retire system to retire these containers immediately.

Note that since the retire process happens out of band, the containers may stick around for up to 5 minutes, after which point they will be removed.

Customization of the wait time to retire - currently 60 seconds - is up for future debate. The containers ultimately haven't been useful for debugging, so keeping them around for longer won't help in most cases, and folks can disable the dokku-retire service (or cron) if that is desired.
2020-11-22 16:57:39 -05:00
Jose Diaz-Gonzalez
5b21cabff3 Merge pull request #4128 from mailformfemi/master
Added the container index to the network-compute-ports trigger
2020-11-21 23:08:06 -05:00
Jose Diaz-Gonzalez
a19efc1cfa chore: drop all references to all commands where possible. 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
f9969a0e61 refactor: drop extra args from procfile-extract
They were not necessary.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
ab1d15216c refactor: drop the last argument from procfile-get-command
No external plugin should need to know the internals of where processes are.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
696df45306 refactor: extract release_and_deploy calls to a plugin trigger
Better would be to separate the release and deploy aspects into distinct triggers - as well as have it release a specific image - but this is a good first pass.
2020-11-21 20:57:33 -05:00
Femi Omojola
81512504a7 Added the container index to the network-compute-ports trigger: useful for alternative proxy implementations. Updated the documentation for the network-compute-ports trigger to clarify the arguments 2020-09-08 09:26:35 -04:00
Jose Diaz-Gonzalez
becf7c1f86 feat: allow customizing the various nginx templates
This will let custom distributions of Dokku to override the internal templates without needing to repackage Dokku or overwrite core files.
2020-09-06 13:57:35 -04:00
Jose Diaz-Gonzalez
1ea60a16e5 refactor: move external procfile manipulation into triggers
This also cleans up the internal APIs a bit.
2020-08-30 13:41:14 -04:00
Gurpreet Atwal
8ab1342110 docs: add more details to nginx-dokku-template-source trigger
[ci skip]
2020-07-18 13:26:17 -07:00
Jose Diaz-Gonzalez
2dfb0ef3e6 fix: correct entering running containers
This functionality was broken due to a refactor of argument handling in a previous release.

In addition to the fix, all the functionality was moved to scheduler-enter, which allows scheduler plugins to implement ways of entering containers in the relevant scheduler.

Closes #3972
2020-05-12 23:06:10 -04:00
Jose Diaz-Gonzalez
962aa66965 Merge pull request #3971 from dokku/3674-customize-dokku-conf
feat: allow users to customize the source of the dokku.conf nginx template
2020-05-06 19:57:12 -04:00
Jose Diaz-Gonzalez
92621a3187 Merge pull request #3966 from dokku/domains-triggers
Move domain manipulation into triggers
2020-05-06 14:21:06 -04:00
Jose Diaz-Gonzalez
d3263a45c3 feat: allow users to customize the source of the dokku.conf nginx template
Closes #3674
2020-05-06 01:38:43 -04:00
Jose Diaz-Gonzalez
61a306664f refactor: move domain manipulation into triggers
This allows other plugins to avoid understanding the underlying details of how domains might be integrated with.
2020-05-06 00:16:51 -04:00
Jose Diaz-Gonzalez
cca008f140 feat: remove all --force-yes usage throughout the codebase
It was deprecated in a recent apt release and shouldn't be necessary for anything any longer.

Closes #3949
2020-05-05 23:34:30 -04:00
Jose Diaz-Gonzalez
a8a6d0595b refactor: deprecate git_deploy_branch in favor of plugn trigger 2020-04-18 18:21:46 -04:00
Jose Diaz-Gonzalez
38a13ecd39 feat: expose network listeners to nginx templates for all process types
This change allows users to specify a custom nginx.conf.sigil that can expose non-web process types to the outside world in addition to the web process type.

Closes #3258
2020-03-11 12:34:38 -04:00
Jose Diaz-Gonzalez
051a329873 feat: avoid deprecated functions 2020-03-10 18:19:31 -04:00
Jose Diaz-Gonzalez
aa156b2834 feat: add missing config-get triggers 2020-03-10 18:19:04 -04:00
Jose Diaz-Gonzalez
6fd4b5adb1 refactor: rewrite proxy plugin in golang 2020-02-22 06:40:24 -05:00
Jose Diaz-Gonzalez
9d3785147e docs: cleanup post-release-* trigger documentation 2020-02-18 01:32:41 -05:00
Jose Diaz-Gonzalez
2be8df1228 docs: document the new post-app-rename-setup trigger 2020-02-18 01:13:47 -05:00
Jose Diaz-Gonzalez
c2c2e2ccbd refactor: call proxy-clear-config from post-app-rename-setup 2020-02-17 06:14:48 -05:00
Jose Diaz-Gonzalez
9818cc6461 feat: implement container network attaching
Containers can be attached:

- after they are created, but before they are started
- after a successful deploy, but before the proxy reloads

This allows folks to have flexibility around when they would like a container to be made available to a network.
2020-02-08 19:55:29 -05:00
Jose Diaz-Gonzalez
4613efe191 refactor: docker-args-process rework trigger arguments
The IMAGE_TAG is not always available, while the IMAGE_SOURCE_TYPE is. Since the point of these triggers was to unify the argument passed and make it easier to interact with them, this version makes more sense.

Closes #3780
2020-02-01 16:18:13 -08:00
Jose Diaz-Gonzalez
360c587086 feat: add scheduler-post-run trigger
After a `dokku run` container is created and started, this plugin trigger will allow developers to run auxiliary commands in response to that container.
2019-10-14 04:55:07 -04:00
Jose Diaz-Gonzalez
5fb7b0a74c Merge pull request #3641 from dokku/pass-sourcecode-work-dir
Pass SOURCECODE_WORK_DIR to build-buildpack triggers
2019-08-12 16:14:51 -04:00
Jose Diaz-Gonzalez
026d04a65f feat: pass SOURCECODE_WORK_DIR to build-buildpack triggers
This will allow those triggers to insert and extract files from the sourcecode work directory. Note that changes are not committed to this directory, nor will they be reflected in the committed codebase.
2019-08-12 16:08:31 -04:00
Jose Diaz-Gonzalez
f3819a46e9 docs: add missing popd to post-extract example
[ci skip]
2019-08-12 11:10:54 -04:00
Jose Diaz-Gonzalez
a17a0e9a82 feat: add the ability to modify the DOKKU_IMAGE in use for the herokuish builder
This is a "one-shot" ability, meaning that it is highly discouraged for multiple plugins to implement the triggers.

The `builder-create-dokku-image` trigger is meant to modify the base DOKKU_IMAGE that will be used to build an application. A good use of the hook is to inject system packages by:

- calculating an image tag from the set of system packages
- checking that the image doesnt already exist
- creating the image if it does not

As the output is sent to stdout, we have to find an alternative way of fetching the new DOKKU_IMAGE. The `builder-dokku-image` trigger can output an image tag based on the calculated image tag. If no tag is output, then the DOKKU_IMAGE is used as is.

Using this pattern, users can efficiently modify the base image in use for an app without duplicating the work on every push. This is especially useful for package installation, where packages are required for app building, but may take a long time and can be error prone.
2019-07-30 14:58:49 -04:00
Jose Diaz-Gonzalez
0a8d5eb744 refactor: add initial support for builder plugins
A builder plugin implements some method for 'building' artifacts from a given source code archive. This refactor moves the majority of the image building code into separate plugins, allowing us to implement other builders, but also simplifying the common pugin codebase.

Also move the pre-build-buildpack hook from the build-env plugin to builder-herokuish.
2019-07-30 14:42:30 -04:00
Jose Diaz-Gonzalez
6836e56b24 refactor: add global docker build and run args
This reduces duplication and allows users to rely on global arguments to generate most labels needed.

The 'commit' command cannot have global arguments because the whitespace within the label change breaks string-based interpolation, and shell arrays cannot be exported.
2019-07-20 05:52:20 -04:00
Jose Diaz-Gonzalez
966afcb787 chore: add missing hooks to events plugin and plugin triggers docs 2019-06-19 13:50:29 -04:00
Jose Diaz-Gonzalez
a92687d3e8 fix: correct calls to fetch process-specific build and deploy args 2019-05-17 12:00:05 -04:00
Jose Diaz-Gonzalez
f4b96cc688 docs: Add documentation for nginx-pre-reload limitation
Closes #3533

[ci skip]
2019-05-11 20:47:41 -04:00
Jose Diaz-Gonzalez
5373cf2989 refactor: allow the scheduler to decide if an app is deployed
Without moving this to the scheduler, all applications are assumed to not be deployed unless the scheduler is set to docker-local.

Closes #3531
2019-05-10 17:47:39 -04:00
Jose Diaz-Gonzalez
277429db5a Merge pull request #3502 from dokku/3484-git-revision-trigger
Add a trigger to fetch the git revision
2019-04-17 17:20:51 -04:00
Jose Diaz-Gonzalez
9a447c16f2 feat: add a trigger to fetch the git revision
This allows other plugins to fetch the current git revision without needing to duplicate logic from the git plugin.

Closes #3484
2019-04-17 17:19:59 -04:00
Jose Diaz-Gonzalez
662c8c2831 refactor: move log retrieval to docker-local scheduler
This change will allow other schedulers to implement log retrieval as necessary for the platform specified.

Closes #3487
2019-04-17 15:03:37 -04:00
Jose Diaz-Gonzalez
243d5ecc43 feat: integrate resource plugin with scheduler-docker-local 2019-04-08 11:31:34 -04:00
Jose Diaz-Gonzalez
00c9e5a5e9 feat: first pass at implement resource limitation on a pre-process basis 2019-04-08 11:31:34 -04:00
Jose Diaz-Gonzalez
67ae374e60 lint: remove whitespaces before redirect 2019-02-02 13:49:24 -05:00
Jose Diaz-Gonzalez
0498a707c8 fix: Add a trigger to allow plugins to cleanup after a new clone is created 2018-12-27 21:31:57 -05:00