Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add healthcheck in components dockerfile #104

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV PORT=${PORT}
EXPOSE ${PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
2 changes: 2 additions & 0 deletions basyx.aasrepository/basyx.aasrepository.component/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV PORT=${PORT}
EXPOSE ${PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV PORT=${PORT}
EXPOSE ${PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ basyx.backend = InMemory
#spring.data.mongodb.uri=mongodb://mongoAdmin:mongoPassword@localhost:27017/?authMechanism=DEFAULT

# Base Path for Spring Boot Actuator
management.endpoints.web.base-path=/
# management.endpoints.web.base-path=/

####################################################################################
# Cross-Site Resource Sharing (CORS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV PORT=${PORT}
EXPOSE ${PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=30s CMD curl --fail http://localhost:${PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV PORT=${PORT}
EXPOSE ${PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ server.port=8081
spring.application.name=Submodel Service

# Base Path for Spring Boot Actuator
management.endpoints.web.base-path=/
# management.endpoints.web.base-path=/

####################################################################################
# Cross-Site Resource Sharing (CORS);
Expand Down
2 changes: 1 addition & 1 deletion examples/cd-repo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ spring.data.mongodb.username=mongoAdmin
spring.data.mongodb.password=mongoPassword

# Base Path for Spring Boot Actuator
management.endpoints.web.base-path=/
# management.endpoints.web.base-path=/