Skip to content

Commit

Permalink
Wait for Plausible active state (#3153)
Browse files Browse the repository at this point in the history
Co-authored-by: Dhruv Bhanushali <[email protected]>
  • Loading branch information
ngken0995 and dhruvkb authored Oct 13, 2023
1 parent ac08b3b commit aa3a7f5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion frontend/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ up *flags:

# Wait for all profile services to be up
wait-up: up
echo "🚧 TODO"
just wait

# Set up user and test site in Plausible
init: wait-up
Expand All @@ -71,3 +71,19 @@ run *args:

types:
cd .. && pnpm exec vue-tsc -p frontend --noEmit

##########
# Health #
##########

# Check the health of the service
@plausible-health host="localhost:50288":
-curl -s 'http://localhost:50288/api/health' --fail | grep -v -c 'error'

# Wait for the service to be healthy
@wait host="localhost:50288":
# The just command on the second line is executed in the context of the
# parent directory and so must be prefixed with `frontend/`.
just ../_loop \
'"$(just frontend/plausible-health {{ host }})" != "1" ' \
"Waiting for Plausible to be healthy..."

0 comments on commit aa3a7f5

Please sign in to comment.