Skip to content

Commit

Permalink
start-grafana: Add quick-startup support
Browse files Browse the repository at this point in the history
  • Loading branch information
amnonh committed Dec 25, 2024
1 parent 266f536 commit d85080b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions start-grafana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ for arg; do
--limit)
LIMIT="1"
;;
--quick-startup)
QUICK_STARTUP=1
;;
--alternator)
RUN_ALTERNATOR="1"
;;
Expand Down Expand Up @@ -358,11 +361,13 @@ fi
printf "Wait for Grafana container to start."
RETRIES=7
TRIES=0
until $(curl --output /dev/null -f --silent http://localhost:$GRAFANA_PORT/api/org) || [ $TRIES -eq $RETRIES ]; do
printf '.'
((TRIES = TRIES + 1))
sleep 5
done
if [ ! "$QUICK_STARTUP" = "1" ]; then
until $(curl --output /dev/null -f --silent http://localhost:$GRAFANA_PORT/api/org) || [ $TRIES -eq $RETRIES ]; do
printf '.'
((TRIES = TRIES + 1))
sleep 5
done
fi
echo
if [ ! "$(docker ps -q -f name=$GRAFANA_NAME)" ]; then
echo "Error: Grafana container failed to start"
Expand Down

0 comments on commit d85080b

Please sign in to comment.