Skip to content

Commit

Permalink
feat: add ping script
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeplotean committed Dec 29, 2024
1 parent 01ace18 commit fd924a8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-compose-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
- name: Ping services
timeout-minutes: 5
run: |
cd ./docker-compose
chmod +x ./ping.sh
./ping.sh
- name: Install node
Expand Down
24 changes: 24 additions & 0 deletions docker-compose/ping.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

set -eu pipefail
set echo off

# functions
ping()
{
local service=$1
local port=$2
shift; shift;
COMMENTS=$@
echo "Pending $service-api"
until $(nc -zv localhost "$port"); do
printf '.'
sleep 5
done
echo "$service-api livez!"
}

# main
ping wallet 7001
ping issuer 7002
ping verifier 7003

0 comments on commit fd924a8

Please sign in to comment.