Skip to content

Commit

Permalink
Updated dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
shahariaazam committed Sep 1, 2024
1 parent f83b0cc commit ca3d31b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/bin/sh
set -e

./oauth-mock-server
# Start the OAuth mock server in the background
/oauth-mock-server &

# Wait for the server to be ready
for i in $(seq 1 30); do
if curl -s http://localhost:${PORT:-8080}/authorize > /dev/null; then
echo "OAuth mock server is up and running"
exit 0
fi
echo "Waiting for OAuth mock server to be ready..."
sleep 1
done

echo "Failed to start OAuth mock server"
exit 1

0 comments on commit ca3d31b

Please sign in to comment.