From d56fc005875973b3aff5b9651c468b677ea0a122 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Tue, 27 Aug 2024 16:11:00 -0300 Subject: [PATCH] fix: Docker containers healthchecks --- docker-compose.provernet.yml | 10 +++++----- yarn-project/Earthfile | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docker-compose.provernet.yml b/docker-compose.provernet.yml index a012af81230..ab9154d2c9d 100644 --- a/docker-compose.provernet.yml +++ b/docker-compose.provernet.yml @@ -38,10 +38,10 @@ services: volumes: - ./log/aztec-node/:/usr/src/yarn-project/aztec/log:rw healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost/status" ] + test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:$AZTEC_PORT/status" ] interval: 3s timeout: 30s - start_period: 10s + start_period: 120s depends_on: - ethereum command: @@ -63,7 +63,7 @@ services: L1_CHAIN_ID: 31337 AZTEC_PORT: 80 BOT_PRIVATE_KEY: 0xcafe - BOT_TX_INTERVAL_SECONDS: 300 + BOT_TX_INTERVAL_SECONDS: 5 BOT_PRIVATE_TRANSFERS_PER_TX: 1 BOT_PUBLIC_TRANSFERS_PER_TX: 0 BOT_NO_WAIT_FOR_TRANSFERS: true @@ -80,7 +80,7 @@ services: aztec-node: condition: service_healthy healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost/status" ] + test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:$AZTEC_PORT/status" ] interval: 3s timeout: 30s start_period: 10s @@ -112,7 +112,7 @@ services: aztec-node: condition: service_healthy healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost/status" ] + test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:$AZTEC_PORT/status" ] interval: 3s timeout: 30s start_period: 10s diff --git a/yarn-project/Earthfile b/yarn-project/Earthfile index 3d5f3864c43..a9b151cd7ec 100644 --- a/yarn-project/Earthfile +++ b/yarn-project/Earthfile @@ -160,8 +160,8 @@ aztec: ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/aztec/dest/bin/index.js"] LET port=8080 ENV PORT=$port - HEALTHCHECK --interval=10s --timeout=10s --retries=6 \ - CMD curl -fsSd '{\"jsonrpc\":\"2.0\",\"method\":\"pxe_getNodeInfo\",\"id\":1}' http://127.0.0.1:$port + HEALTHCHECK --interval=10s --timeout=10s --retries=6 --start-period=120s \ + CMD curl -fsS http://127.0.0.1:$port/status EXPOSE $port aztec-faucet-build: