harb/podman-compose.yml
johba 3ab2d9454a 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
2025-10-02 14:37:59 +02:00

182 lines
4.6 KiB
YAML

version: "3.8"
services:
anvil:
image: ghcr.io/foundry-rs/foundry:latest
command: ["/workspace/containers/anvil-entrypoint.sh"]
volumes:
- .:/workspace:z
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
environment:
- POSTGRES_USER=ponder
- POSTGRES_PASSWORD=ponder_local
- POSTGRES_DB=ponder_local
volumes:
- postgres-data:/var/lib/postgresql/data
expose:
- "5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ponder"]
interval: 5s
timeout: 5s
retries: 5
bootstrap:
image: ghcr.io/foundry-rs/foundry:latest
user: "0:0"
command: ["/workspace/containers/bootstrap.sh"]
volumes:
- .:/workspace:z
environment:
- ANVIL_RPC=http://anvil:8545
depends_on:
anvil:
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:
context: .
dockerfile: containers/node-dev.Containerfile
entrypoint: ["/workspace/containers/ponder-dev-entrypoint.sh"]
volumes:
- .:/workspace:z
- ./kraiken-lib/dist:/workspace/kraiken-lib/dist:ro,z
- ponder-node-modules:/workspace/services/ponder/node_modules
working_dir: /workspace
environment:
- CHOKIDAR_USEPOLLING=1
depends_on:
anvil:
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:
context: .
dockerfile: containers/node-dev.Containerfile
entrypoint: ["/workspace/containers/webapp-dev-entrypoint.sh"]
volumes:
- .:/workspace:z
- ./kraiken-lib/dist:/workspace/kraiken-lib/dist:ro,z
- webapp-node-modules:/workspace/web-app/node_modules
working_dir: /workspace
environment:
- CHOKIDAR_USEPOLLING=1
depends_on:
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:
context: .
dockerfile: containers/node-dev.Containerfile
entrypoint: ["/workspace/containers/landing-dev-entrypoint.sh"]
volumes:
- .:/workspace:z
- ./kraiken-lib/dist:/workspace/kraiken-lib/dist:ro,z
- landing-node-modules:/workspace/landing/node_modules
working_dir: /workspace
environment:
- CHOKIDAR_USEPOLLING=1
depends_on:
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:
context: .
dockerfile: containers/node-dev.Containerfile
entrypoint: ["/workspace/containers/txn-bot-entrypoint.sh"]
volumes:
- .:/workspace:z
- ./kraiken-lib/dist:/workspace/kraiken-lib/dist:ro,z
- txn-node-modules:/workspace/services/txnBot/node_modules
- kraiken-node-modules:/workspace/kraiken-lib/node_modules
working_dir: /workspace
depends_on:
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
volumes:
- ./containers/Caddyfile:/etc/caddy/Caddyfile:z
ports:
- "0.0.0.0:8081:80"
depends_on:
webapp:
condition: service_healthy
landing:
condition: service_healthy
txn-bot:
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:
webapp-node-modules:
landing-node-modules:
ponder-node-modules:
txn-node-modules:
kraiken-node-modules: