health checks (#39)

resolves #35

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/39
This commit is contained in:
johba 2025-10-02 14:37:59 +02:00
parent a29ca1a26a
commit 3ab2d9454a
14 changed files with 586 additions and 611 deletions

View file

@ -9,6 +9,12 @@ services:
expose:
- "8545"
restart: unless-stopped
healthcheck:
test: ["CMD", "cast", "block-number", "--rpc-url", "http://localhost:8545"]
interval: 2s
timeout: 1s
retries: 5
start_period: 5s
postgres:
image: docker.io/library/postgres:16-alpine
@ -37,10 +43,15 @@ services:
- ANVIL_RPC=http://anvil:8545
depends_on:
anvil:
condition: service_started
condition: service_healthy
postgres:
condition: service_healthy
restart: "no"
healthcheck:
test: ["CMD", "test", "-f", "/workspace/tmp/podman/contracts.env"]
interval: 5s
retries: 18
start_period: 10s
ponder:
build:
@ -56,12 +67,20 @@ services:
- CHOKIDAR_USEPOLLING=1
depends_on:
anvil:
condition: service_started
condition: service_healthy
postgres:
condition: service_healthy
bootstrap:
condition: service_started
expose:
- "42069"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:42069/"]
interval: 5s
timeout: 3s
retries: 12
start_period: 20s
webapp:
build:
@ -76,10 +95,16 @@ services:
environment:
- CHOKIDAR_USEPOLLING=1
depends_on:
- anvil
ponder:
condition: service_healthy
expose:
- "5173"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:5173/app/"]
interval: 5s
retries: 6
start_period: 10s
landing:
build:
@ -94,10 +119,16 @@ services:
environment:
- CHOKIDAR_USEPOLLING=1
depends_on:
- anvil
ponder:
condition: service_healthy
expose:
- "5174"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:5174/"]
interval: 5s
retries: 6
start_period: 10s
txn-bot:
build:
@ -111,11 +142,16 @@ services:
- kraiken-node-modules:/workspace/kraiken-lib/node_modules
working_dir: /workspace
depends_on:
- anvil
- ponder
ponder:
condition: service_healthy
expose:
- "43069"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:43069/status"]
interval: 5s
retries: 4
start_period: 10s
caddy:
image: docker.io/library/caddy:2.8
@ -124,17 +160,18 @@ services:
ports:
- "0.0.0.0:8081:80"
depends_on:
anvil:
condition: service_started
ponder:
condition: service_started
webapp:
condition: service_started
condition: service_healthy
landing:
condition: service_started
condition: service_healthy
txn-bot:
condition: service_started
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:80"]
interval: 2s
retries: 3
start_period: 2s
volumes:
postgres-data: