-
Notifications
You must be signed in to change notification settings - Fork 8
fix: improve Dockerfile healthcheck, signal handling, and slim runtime #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,7 +54,7 @@ RUN cp /app/target/$BUILD_PROFILE/ev-reth /ev-reth | |
| FROM ubuntu:24.04 AS runtime | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -y ca-certificates curl jq libssl-dev pkg-config strace tini && \ | ||
| apt-get install -y ca-certificates curl jq tini && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /app | ||
|
|
@@ -65,8 +65,10 @@ COPY LICENSE-* ./ | |
| # Expose ports: P2P, Discovery, Metrics, JSON-RPC, WebSocket, GraphQL, Engine API | ||
| EXPOSE 30303 30303/udp 9001 8545 8546 7545 8551 | ||
|
|
||
| # Add health check | ||
| HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ | ||
| CMD /usr/local/bin/ev-reth --version || exit 1 | ||
| HEALTHCHECK --interval=30s --timeout=3s --start-period=60s --retries=3 \ | ||
| CMD curl -sf http://localhost:8545/ -X POST -H "Content-Type: application/json" \ | ||
| -d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' || exit 1 | ||
|
Comment on lines
+69
to
+70
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current healthcheck only verifies that To make the healthcheck more robust, you can pipe the output to |
||
|
|
||
| STOPSIGNAL SIGTERM | ||
|
|
||
| ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/ev-reth"] | ||
Uh oh!
There was an error while loading. Please reload this page.