Skip to content

Commit

Permalink
Merge pull request #3951 from alephdata/chore/wait-for-pg
Browse files Browse the repository at this point in the history
Use pg_isready in make upgrade instead of sleep
  • Loading branch information
stchris authored Oct 24, 2024
2 parents 19adc88 + 8feb82c commit c41c736
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ format-check-ui:

upgrade: build
$(COMPOSE) up -d postgres elasticsearch
sleep 10
# wait for postgres to be available
@$(COMPOSE) exec postgres pg_isready --timeout=30
# wait for elasticsearch to be available
@$(COMPOSE) exec elasticsearch timeout 30 bash -c "printf 'Waiting for elasticsearch'; until curl --silent --output /dev/null localhost:9200/_cat/health?h=st; do printf '.'; sleep 1; done; printf '\n'"
$(APPDOCKER) aleph upgrade

api: services
Expand Down

0 comments on commit c41c736

Please sign in to comment.