Skip to content

Commit

Permalink
Amend heartbeat check.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Jan 30, 2024
1 parent f920c6d commit cf92b53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docker-compose/orion-ld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#
version: "3.8"
services:
# Orion LD is the context broker
orion:
# Orion-LD is an NGSI-LD context broker
orion-ld:
labels:
org.fiware: 'tutorial'
image: quay.io/fiware/orion-ld:${ORION_LD_VERSION}
hostname: orion
container_name: fiware-orion
container_name: fiware-orion-ld
depends_on:
- mongo-db
networks:
Expand Down
6 changes: 3 additions & 3 deletions services
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ getHeartbeat(){
eval "response=$(docker run --network fiware_default --rm quay.io/curl/curl -s -o /dev/null -w "%{http_code}" "$1")"
}

waitForOrion () {
waitForOrionLD () {
echo -e "\n⏳ Waiting for \033[1;34mOrion-LD\033[0m to be available\n"

while ! [ `docker inspect --format='{{.State.Health.Status}}' fiware-orion` == "healthy" ]
while ! [ `docker inspect --format='{{.State.Health.Status}}' fiware-orion-ld` == "healthy" ]
do
echo -e "\nContext Broker HTTP state: ${response} (waiting for 200)"
pause 6
Expand Down Expand Up @@ -177,7 +177,7 @@ case "${command}" in
${dockerCmd} -f docker-compose/common.yml -f docker-compose/orion-ld.yml up -d --remove-orphans --renew-anon-volumes
waitForMongo
addDatabaseIndex
waitForOrion
waitForOrionLD
export CONTEXT_BROKER=orion:1026
loadData
displayServices fiware
Expand Down

0 comments on commit cf92b53

Please sign in to comment.