add health check into docker container

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2024-10-15 09:56:38 +02:00
parent 40ab141f0e
commit f367f3671e

View File

@@ -25,5 +25,7 @@ USER app
COPY --chown=app --from=build /usr/src/app/target/*.jar /usr/app/timezone.jar COPY --chown=app --from=build /usr/src/app/target/*.jar /usr/app/timezone.jar
HEALTHCHECK CMD curl --fail http://localhost:8080/actuator/health/liveness || exit 1
EXPOSE 8080 EXPOSE 8080
CMD ["java", "-jar", "/usr/app/timezone.jar"] CMD ["java", "-jar", "/usr/app/timezone.jar"]