Skip to content

Commit 7d12b28

Browse files
committed
adjust health check
1 parent 0fa166f commit 7d12b28

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

generators/docker/templates/docker/app.yml.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ _%>
102102
- 127.0.0.1:<%= serverPort %>:<%= serverPort %>
103103
<%_ } _%>
104104
healthcheck:
105-
test: ['CMD', 'curl', '-f', 'http://localhost:<%= serverPort %>/management/health']
105+
test: ['CMD', '/workspace/health-check']
106106
interval: 5s
107107
timeout: 5s
108108
retries: 40

generators/spring-boot/templates/build.gradle.ejs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ task cleanResources(type: Delete) {
267267
bootBuildImage {
268268
builder = "paketobuildpacks/builder-jammy-buildpackless-tiny"
269269
buildpacks = ["paketobuildpacks/java"]
270-
tags = ["<%- lowercaseBaseName %>"]
270+
tags = [
271+
"<%- lowercaseBaseName %>"
272+
"paketobuildpacks/health-checker"
273+
]
271274
environment = [
272275
"BPL_SPRING_AOT_ENABLED" : "true",
273276
"BP_JVM_CDS_ENABLED" : "false",

generators/spring-boot/templates/pom.xml.ejs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@
541541
<builder>paketobuildpacks/builder-jammy-buildpackless-tiny</builder>
542542
<buildpacks>
543543
<buildpack>paketobuildpacks/java</buildpack>
544+
<buildpack>paketobuildpacks/health-checker</buildpack>
544545
</buildpacks>
545546
<tags>
546547
<tag><%- lowercaseBaseName %></tag>

0 commit comments

Comments
 (0)