Skip to content

Commit

Permalink
Remove check in favor of healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
baierjan committed Oct 4, 2024
1 parent 2f132be commit a37ea37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion container/webui/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ services:
volumes:
- ./workdir/db:/var/lib/postgresql/data:Z
healthcheck:
test: ["CMD", "sh", "-c", "echo 'select * from api_keys;' | psql -U openqa -v 'ON_ERROR_STOP=1' openqa"]
test:
- CMD-SHELL
- >-
pg_isready -U openqa -d openqa
&& echo 'select * from api_keys;'
| psql -U openqa -v 'ON_ERROR_STOP=1' openqa
interval: 10s
timeout: 10s
retries: 3
Expand Down
1 change: 1 addition & 0 deletions container/webui/run_openqa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -e

function wait_for_db_creation() {
return
echo "Waiting for DB creation"
while ! su geekotest -c 'PGPASSWORD=openqa psql -h db -U openqa --list | grep -qe openqa'; do sleep .1; done
}
Expand Down

0 comments on commit a37ea37

Please sign in to comment.