Skip to content

Commit

Permalink
move the healthcheck to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius committed Jul 17, 2024
1 parent 305ff04 commit 2536a86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
13 changes: 3 additions & 10 deletions docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,9 @@ services:
- "9090:9090"
live-indexing-metadata:
image: alfresco-enterprise-search-metadata:test
healthcheck:
test:
- CMD
- curl
- -f
- http://live-indexing-metadata:8080/actuator/health
interval: 30s
timeout: 3s
retries: 3
start_period: 1m
environment:
SPRING_ELASTICSEARCH_REST_URIS: http://elastic:9200
SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616
volumes:
shared-file-store-volume:
driver_opts:
Expand Down
6 changes: 3 additions & 3 deletions search/enterprise/metadata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ FROM quay.io/alfresco/alfresco-base-java:jre17-rockylinux9
ENV PORT=8080
EXPOSE 8080

ENV SPRING_ELASTICSEARCH_REST_URIS=http://elasticsearch:9200
ENV SPRING_ACTIVEMQ_BROKERURL=nio://activemq:61616

ADD search/enterprise/metadata/*-app.jar /opt/app.jar

HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=1m \
CMD curl -f http://localhost:8080/actuator/health || exit 1

COPY search/enterprise/metadata/entrypoint.sh /entrypoint.sh
CMD ["/entrypoint.sh"]

0 comments on commit 2536a86

Please sign in to comment.