Skip to content

Commit

Permalink
Use port as variable in healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrimaz committed Oct 5, 2023
1 parent 84df19c commit 8f146e5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +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:8081/shells || exit 1
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${PORT}/shells || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
3 changes: 2 additions & 1 deletion basyx.aasrepository/basyx.aasrepository.component/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +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:8081/shells || exit 1
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${PORT}/shells || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +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:8081/concept-descriptions || exit 1
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=30s CMD curl --fail http://localhost:${PORT}/concept-descriptions || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +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:8081/submodels || exit 1
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${PORT}/submodels || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]

0 comments on commit 8f146e5

Please sign in to comment.