Skip to content

Commit bdd69d7

Browse files
author
thomas loubrieu
committed
add healthcheck on api and use it as a dependency for other services to start.
1 parent fd77e66 commit bdd69d7

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

docker/docker-compose.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,19 @@ services:
138138
networks:
139139
- pds
140140
command: /usr/local/registry-api-service/registry-api.sh
141+
healthcheck:
142+
test:
143+
- CMD
144+
- curl
145+
- -f
146+
- http://localhost:8080/health
147+
interval: 10s
148+
timeout: 2s
149+
retries: 50
141150
depends_on:
142151
registry-sweepers:
143152
condition: service_completed_successfully
144-
153+
145154

146155

147156
# Executes an nginx service to expose the PDS4 archive
@@ -155,6 +164,9 @@ services:
155164
- ${REG_DATA_VOLUME}:/usr/share/nginx/html/archive
156165
networks:
157166
- pds
167+
depends_on:
168+
registry-api:
169+
condition: service_healthy
158170

159171
# Executes Registry API integration test as a Postman collection with test data
160172
reg-api-integration-test:

0 commit comments

Comments
 (0)