Skip to content

Commit

Permalink
feat: support healthcheck for ceseal and cess-chain image (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbillw authored May 14, 2024
1 parent d214c36 commit c2478db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/docker/ceseal/gramine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,6 @@ ENV RUST_LOG=info
ENV EXTRA_OPTS=
EXPOSE 8000
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/bin/bash", "./start.sh"]
CMD ["/bin/bash", "./start.sh"]
HEALTHCHECK --start-period=8s --timeout=5s \
CMD curl -s --fail --http2-prior-knowledge http://localhost:8000 || exit 1
2 changes: 2 additions & 0 deletions scripts/docker/ceseal/gramine/handover.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ EXPOSE 8000
SHELL ["/bin/bash", "-c"]
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ${CESEAL_HOME}/start.sh
HEALTHCHECK --start-period=8s --timeout=5s \
CMD curl -s --fail --http2-prior-knowledge http://localhost:8000 || exit 1
3 changes: 3 additions & 0 deletions scripts/docker/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ WORKDIR /opt/cess
COPY --from=builder /node/target/release/cess-node .
RUN apt-get update && apt-get install -y curl && apt-get clean -y && apt-get autoremove

HEALTHCHECK --interval=30s --timeout=5s --start-period=1800s --retries=10 \
CMD bash -c 'printf "GET / HTTP/1.1\n\n" > /dev/tcp/127.0.0.1/9944 || exit 1'

ENTRYPOINT ["./cess-node"]

0 comments on commit c2478db

Please sign in to comment.