Skip to content

Commit

Permalink
fix: healthcheck specification in docker-compose file (#665)
Browse files Browse the repository at this point in the history
# Problem

Healthcheck was specified in docker-compose.yaml using incorrect syntax.

Also fixes an error in the CI pipeline that was not running E2E tests
when the set of "common" files changed (which would have caught this bug
in the original PR)
  • Loading branch information
JoeCap08055 authored Oct 25, 2024
1 parent eeac88c commit e3d64e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
services: >-
["account"]
# Resolves to true if it should run everything, aka when common files change
run-all: ${{ steps.determine-matrix.outputs.changes.common }}
run-all: ${{ contains(fromJson(steps.determine-matrix.outputs.changes), 'common') }}
steps:
- name: Check Out Repo
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions docker-compose-e2e.account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ services:
ipfs:
profiles:
- skip
gateway-base:
profiles:
- account
content-publishing-service-worker:
profiles:
- skip
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ services:
# such as:
# --state-pruning=archive
command: --offchain-worker=always --enable-offchain-indexing=true
options: >-
--health-cmd "bash -c '(echo >\"/dev/tcp/127.0.0.1/9944\") &>/dev/null'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
healthcheck:
test: ["CMD", "bash", "-c", "curl -X POST -H \"Content-Type: application/json\" -d '{\"jsonrpc\":\"2.0\",\"method\":\"system_health\",\"params\":[],\"id\":1}' http://127.0.0.1:9944 > /dev/null 2>&1"]
interval: 10s
timeout: 5s
retries: 5
ports:
- 9944:9944
networks:
Expand Down

0 comments on commit e3d64e7

Please sign in to comment.