Commit Graph

12 Commits

Author SHA1 Message Date
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
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
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
2959fdd154 fix: create the data directory for an app as necessary 2022-08-09 02:11:48 -04:00
Jose Diaz-Gonzalez
2715d2a485 chore: drop extra cp statement 2022-08-08 15:14:49 -04:00
Jose Diaz-Gonzalez
951dd98f17 feat: ensure the container is routable by dokku
- Keep the container alive via DOCKER_LAMBDA_STAY_OPEN=1
- Set the default listening port to 5000 (which is what herokuish will use)
2022-08-08 15:14:49 -04:00
Jose Diaz-Gonzalez
8ca71d9ff5 fix: add com.dokku.builder-type label to built image
This will allow schedulers to make decisions when interacting with images from specific builders.
2022-08-08 15:14:49 -04:00
Jose Diaz-Gonzalez
f549934740 fix: update lambda-builder usage and write out Procfile/lambda.zip 2022-08-08 15:14:48 -04:00
Jose Diaz-Gonzalez
92790b70e8 feat: broken support for lambda-builder
It's currently broken because there are flags in there that aren't actually implemented
2022-08-08 15:14:48 -04:00
Jose Diaz-Gonzalez
02d6813209 scratch: initial implementation 2022-08-08 15:14:48 -04:00