Skip to content

Merge pull request #36 from andreyvdl/andrey-account-extras #238

Merge pull request #36 from andreyvdl/andrey-account-extras

Merge pull request #36 from andreyvdl/andrey-account-extras #238

name: Postgres Healthy CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
echo -e "SQL_DATABASE=postgres-db\nSQL_USER=wuser\nSQL_PASSWORD=wpass\nSQL_HOST=db\nSQL_PORT=5433" > .env &&
docker compose up db -d &&
while [[ $(docker container inspect postgres -f '{{.State.Health.Status}}') == "starting" ]]; do
sleep 3
done
if [[ $(docker container inspect postgres -f '{{.State.Health.Status}}') != "healthy" ]]; then
exit 1
fi;