Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add healthchecks
  • Loading branch information
Ivan Loboda committed Mar 26, 2022
commit 54ccbbe80d0ce783247beb870738c5e1d7a9c802
5 changes: 5 additions & 0 deletions health_check_faucet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

curl --location --request POST 'http://faucet:3333/request_ping' \
--header 'X-Ping-Header' \
--data-raw 'Healthcheck-ping'
5 changes: 5 additions & 0 deletions health_check_proxy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

curl --location --request POST 'http://proxy:9090/solana' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc":"2.0", "method":"net_version", "params":[], "id":1 }'
16 changes: 14 additions & 2 deletions proxy/docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ services:
networks:
- net
entrypoint: proxy/run-test-proxy.sh
healthcheck:
test: [ CMD-SHELL, "/opt/health_check_proxy.sh" ]
interval: 5s
timeout: 10s
retries: 10
start_period: 5s

faucet:
container_name: faucet
Expand Down Expand Up @@ -139,7 +145,13 @@ services:
entrypoint: ./run-test-faucet.sh
depends_on:
proxy:
condition: service_started
condition: service_healthy
healthcheck:
test: [ CMD-SHELL, "/opt/health_check_faucet.sh" ]
interval: 5s
timeout: 10s
retries: 10
start_period: 5s

airdropper:
container_name: airdropper
Expand Down Expand Up @@ -168,7 +180,7 @@ services:
dbcreation:
condition: service_completed_successfully
faucet:
condition: service_started
condition: service_healthy

indexer:
container_name: indexer
Expand Down