Skip to content

Commit 19edbbb

Browse files
authored
fix: Docker containers healthchecks (#8228)
Fixes `start_period` for aztec node in provernet healtcheck, as since #8211 the startup takes much longer. Fixes the healthcheck defined in the image itself, so it works with the common `status` route and does not require the pxe to be exposed.
1 parent 24b059b commit 19edbbb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docker-compose.provernet.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ services:
3838
volumes:
3939
- ./log/aztec-node/:/usr/src/yarn-project/aztec/log:rw
4040
healthcheck:
41-
test: [ "CMD", "curl", "-f", "http://localhost/status" ]
41+
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:$AZTEC_PORT/status" ]
4242
interval: 3s
4343
timeout: 30s
44-
start_period: 10s
44+
start_period: 120s
4545
depends_on:
4646
- ethereum
4747
command:
@@ -63,7 +63,7 @@ services:
6363
L1_CHAIN_ID: 31337
6464
AZTEC_PORT: 80
6565
BOT_PRIVATE_KEY: 0xcafe
66-
BOT_TX_INTERVAL_SECONDS: 300
66+
BOT_TX_INTERVAL_SECONDS: 5
6767
BOT_PRIVATE_TRANSFERS_PER_TX: 1
6868
BOT_PUBLIC_TRANSFERS_PER_TX: 0
6969
BOT_NO_WAIT_FOR_TRANSFERS: true
@@ -80,7 +80,7 @@ services:
8080
aztec-node:
8181
condition: service_healthy
8282
healthcheck:
83-
test: [ "CMD", "curl", "-f", "http://localhost/status" ]
83+
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:$AZTEC_PORT/status" ]
8484
interval: 3s
8585
timeout: 30s
8686
start_period: 10s
@@ -112,7 +112,7 @@ services:
112112
aztec-node:
113113
condition: service_healthy
114114
healthcheck:
115-
test: [ "CMD", "curl", "-f", "http://localhost/status" ]
115+
test: [ "CMD", "curl", "-fSs", "http://127.0.0.1:$AZTEC_PORT/status" ]
116116
interval: 3s
117117
timeout: 30s
118118
start_period: 10s

yarn-project/Earthfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ aztec:
160160
ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/aztec/dest/bin/index.js"]
161161
LET port=8080
162162
ENV PORT=$port
163-
HEALTHCHECK --interval=10s --timeout=10s --retries=6 \
164-
CMD curl -fsSd '{\"jsonrpc\":\"2.0\",\"method\":\"pxe_getNodeInfo\",\"id\":1}' http://127.0.0.1:$port
163+
HEALTHCHECK --interval=10s --timeout=10s --retries=6 --start-period=120s \
164+
CMD curl -fsS http://127.0.0.1:$port/status
165165
EXPOSE $port
166166

167167
aztec-faucet-build:

0 commit comments

Comments
 (0)