diff --git a/generators/docker/templates/docker/app.yml.ejs b/generators/docker/templates/docker/app.yml.ejs index c7d90b5c61cc..4d2f90643608 100644 --- a/generators/docker/templates/docker/app.yml.ejs +++ b/generators/docker/templates/docker/app.yml.ejs @@ -102,7 +102,7 @@ _%> - 127.0.0.1:<%= serverPort %>:<%= serverPort %> <%_ } _%> healthcheck: - test: ['CMD', 'curl', '-f', 'http://localhost:<%= serverPort %>/management/health'] + test: ['CMD', '/cnb/process/health-check'] interval: 5s timeout: 5s retries: 40 diff --git a/generators/spring-boot/templates/build.gradle.ejs b/generators/spring-boot/templates/build.gradle.ejs index 68bd8d831a89..8f4a60eb9844 100644 --- a/generators/spring-boot/templates/build.gradle.ejs +++ b/generators/spring-boot/templates/build.gradle.ejs @@ -267,7 +267,10 @@ task cleanResources(type: Delete) { bootBuildImage { builder = "paketobuildpacks/builder-jammy-buildpackless-tiny" buildpacks = ["paketobuildpacks/java"] - tags = ["<%- lowercaseBaseName %>"] + tags = [ + "<%- lowercaseBaseName %>" + "paketobuildpacks/health-checker" + ] environment = [ "BPL_SPRING_AOT_ENABLED" : "true", "BP_JVM_CDS_ENABLED" : "false", diff --git a/generators/spring-boot/templates/pom.xml.ejs b/generators/spring-boot/templates/pom.xml.ejs index 329a07e7a3ef..bd465709d9af 100644 --- a/generators/spring-boot/templates/pom.xml.ejs +++ b/generators/spring-boot/templates/pom.xml.ejs @@ -541,6 +541,7 @@ paketobuildpacks/builder-jammy-buildpackless-tiny paketobuildpacks/java + paketobuildpacks/health-checker <%- lowercaseBaseName %>