Skip to content

Commit

Permalink
Merge pull request #64 from alliance-genome/health_check_api
Browse files Browse the repository at this point in the history
Added Docker healthcheck for API
  • Loading branch information
christabone authored Dec 2, 2024
2 parents b82b86f + 24597be commit ca42847
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tasks/start_api_quarkus.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---

- name: Pull Java Run Image
docker_image:
name: "{{ JAVA_SOFTWARE_RUN_IMAGE }}"
source: pull

- name: Run API
- name: Run API with Health Check
docker_container:
name: "{{ API_SERVER_NAME }}"
image: "{{ JAVA_SOFTWARE_RUN_IMAGE }}"
Expand All @@ -21,3 +20,9 @@
CACHE_HOST: "{{ INFINISPAN_SERVER_NAME }}"
NEO4J_HOST: "{{ NEO_SERVER_NAME }}"
ES_HOST: "{{ ES_SERVER_NAME }}"
healthcheck:
test: ["CMD", "curl", "-f", "https://www.alliancegenome.org/api/search_autocomplete?q=p"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s

0 comments on commit ca42847

Please sign in to comment.