Skip to content

Commit

Permalink
add healthcheck to postgres service in docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Aug 30, 2024
1 parent 7a44123 commit 608dd1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
docker compose -f docker-compose.yaml up -d
- name: Execute tests
run: |
docker compose up -d
docker compose run paper_trail mix test test/paper_trail
docker compose run paper_trail mix test test/version
docker compose run paper_trail mix test test/uuid
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ services:
- backend_network
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 1s
timeout: 5s
retries: 10
paper_trail:
image: $REGISTRY/$REPO_OWNER/$DOCKER_TAG
build:
Expand Down

0 comments on commit 608dd1c

Please sign in to comment.