From 86e0a964f3ac180181b184eb494c31b7109b8ba9 Mon Sep 17 00:00:00 2001 From: Blair Currey <12960453+BlairCurrey@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:30:07 -0400 Subject: [PATCH] chore: bump seed timeout (#2911) * chore: bump seed timeout - from about 4 seconds to about 30 seconds * chore: remove depth bump on callWithRetry * feat: use healthcheck instead of increasing seed timeout * feat: use more direct apollo server healthcheck * feat(localenv): fine-tune healthcheck interval * chore: bump backend healthcheck start period * fix(localenv): adjust healthcheck params --- localenv/cloud-nine-wallet/docker-compose.yml | 10 +++++++++- localenv/happy-life-bank/docker-compose.yml | 13 +++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/localenv/cloud-nine-wallet/docker-compose.yml b/localenv/cloud-nine-wallet/docker-compose.yml index 99239ccecf..b0a75933d8 100644 --- a/localenv/cloud-nine-wallet/docker-compose.yml +++ b/localenv/cloud-nine-wallet/docker-compose.yml @@ -29,7 +29,8 @@ services: - ../cloud-nine-wallet/seed.yml:/workspace/seed.yml - ../cloud-nine-wallet/private-key.pem:/workspace/private-key.pem depends_on: - - cloud-nine-backend + cloud-nine-backend: + condition: service_healthy cloud-nine-backend: hostname: cloud-nine-wallet-backend image: rafiki-backend @@ -78,6 +79,13 @@ services: depends_on: - shared-database - shared-redis + healthcheck: + test: ["CMD", "wget", "--header=apollo-require-preflight: true", "http://localhost:3001/graphql?query=%7B__typename%7D", "-O", "/dev/null"] + start_period: 60s + start_interval: 5s + interval: 30s + retries: 1 + timeout: 3s cloud-nine-auth: hostname: cloud-nine-wallet-auth image: rafiki-auth diff --git a/localenv/happy-life-bank/docker-compose.yml b/localenv/happy-life-bank/docker-compose.yml index 5a3c37daa4..e72e1654bd 100644 --- a/localenv/happy-life-bank/docker-compose.yml +++ b/localenv/happy-life-bank/docker-compose.yml @@ -25,8 +25,10 @@ services: - ../happy-life-bank/seed.yml:/workspace/seed.yml - ../happy-life-bank/private-key.pem:/workspace/private-key.pem depends_on: - - cloud-nine-mock-ase - - happy-life-backend + happy-life-backend: + condition: service_healthy + cloud-nine-mock-ase: + condition: service_started happy-life-backend: hostname: happy-life-bank-backend image: rafiki-backend @@ -69,6 +71,13 @@ services: KEY_ID: 53f2d913-e98a-40b9-b270-372d0547f23d depends_on: - cloud-nine-backend + healthcheck: + test: ["CMD", "wget", "--header=apollo-require-preflight: true", "http://localhost:3001/graphql?query=%7B__typename%7D", "-O", "/dev/null"] + start_period: 60s + start_interval: 5s + interval: 30s + retries: 1 + timeout: 3s happy-life-auth: hostname: happy-life-bank-auth image: rafiki-auth