Skip to content

Commit

Permalink
adjust health check
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Sep 20, 2024
1 parent 0fa166f commit 7d12b28
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generators/docker/templates/docker/app.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ _%>
- 127.0.0.1:<%= serverPort %>:<%= serverPort %>
<%_ } _%>
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:<%= serverPort %>/management/health']
test: ['CMD', '/workspace/health-check']
interval: 5s
timeout: 5s
retries: 40
5 changes: 4 additions & 1 deletion generators/spring-boot/templates/build.gradle.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions generators/spring-boot/templates/pom.xml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@
<builder>paketobuildpacks/builder-jammy-buildpackless-tiny</builder>
<buildpacks>
<buildpack>paketobuildpacks/java</buildpack>
<buildpack>paketobuildpacks/health-checker</buildpack>
</buildpacks>
<tags>
<tag><%- lowercaseBaseName %></tag>
Expand Down

0 comments on commit 7d12b28

Please sign in to comment.