File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,22 @@ RUN cargo build --release
2525# ## run the IC WS Gateway (we don't need the rust toolchain to run the binary)
2626FROM debian:bullseye-slim AS runtime
2727WORKDIR /ic-ws-gateway
28+ # install some utils
29+ RUN apt update
30+ RUN apt install -y curl
2831# copy the compiled binary
2932COPY --from=builder /ic-ws-gateway/target/release/ic_websocket_gateway .
3033
3134EXPOSE 8080
3235EXPOSE 9000
3336
37+ HEALTHCHECK --timeout=30s --interval=30s --retries=5 \
38+ CMD curl -i -N \
39+ -H "Connection: Upgrade" \
40+ -H "Upgrade: websocket" \
41+ -H "Sec-WebSocket-Version: 13" \
42+ -H "Sec-WebSocket-Key: jWPXCaHslL1epUzz0k29Qw==" \
43+ -X GET --head http://127.0.0.1:8080 | grep -q "HTTP/1.1 101 Switching Protocols" && exit 0 || exit 1
44+
3445# run the Gateway
3546ENTRYPOINT ["/ic-ws-gateway/ic_websocket_gateway" ]
You can’t perform that action at this time.
0 commit comments