Skip to content

Commit 49ed638

Browse files
authored
Demonstrate Spring-Boot health probes in Cloudfoundry (#380)
This PR demonstrates the liveness and readiness health probes in Cloudfoundry as described here: https://docs.cloudfoundry.org/devguide/deploy-apps/healthchecks.html
1 parent 43ff622 commit 49ed638

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

mta-multi-tenant.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ modules:
1414
memory: 1024M
1515
disk-quota: 512M
1616
buildpack: sap_java_buildpack_jakarta
17+
health-check-type: http
18+
health-check-http-endpoint: /actuator/health/liveness
19+
readiness-health-check-type: http
20+
readiness-health-check-http-endpoint: /actuator/health/readiness
1721
properties:
1822
SPRING_PROFILES_ACTIVE: cloud,sandbox
1923
CDS_MULTITENANCY_APPUI_TENANTSEPARATOR: "-"

mta-single-tenant.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ modules:
1414
memory: 1024M
1515
disk-quota: 512M
1616
buildpack: sap_java_buildpack_jakarta
17+
health-check-type: http
18+
health-check-http-endpoint: /actuator/health/liveness
19+
readiness-health-check-type: http
20+
readiness-health-check-http-endpoint: /actuator/health/readiness
1721
properties:
1822
SPRING_PROFILES_ACTIVE: cloud,sandbox
1923
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"

srv/src/main/resources/application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ management:
2828
health:
2929
show-components: always
3030
show-details: always
31+
probes.enabled: true
3132
endpoints:
3233
web:
3334
exposure:

0 commit comments

Comments
 (0)