vls: add healthcheck
- use rpc server info command Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
parent
558cdd18bb
commit
af57edb828
@ -17,6 +17,7 @@ RUN git clone https://gitlab.com/lightning-signer/validating-lightning-signer.gi
|
||||
RUN cd vls && \
|
||||
git checkout $GIT_HASH && \
|
||||
cargo install --path ./vls-proxy --bin vlsd2 --profile release --root /usr/local/ && \
|
||||
cargo install --path ./vls-cli --profile release --root /usr/local/ && \
|
||||
cargo clean
|
||||
|
||||
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as runner
|
||||
@ -38,10 +39,14 @@ RUN apk update && \
|
||||
bind-tools
|
||||
|
||||
COPY --from=builder /usr/local/bin/vlsd2 /usr/local/bin/vlsd2
|
||||
COPY --from=builder /usr/local/bin/vls-cli /usr/local/bin/vls-cli
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
COPY healthcheck.sh /healthcheck.sh
|
||||
RUN chmod +x /healthcheck.sh
|
||||
|
||||
COPY vlsd2.toml /vlsd2.toml
|
||||
|
||||
ENV VLS_DATA=/home/vls/.lightning-signer
|
||||
@ -55,6 +60,9 @@ VOLUME ["${VLS_DATA}"]
|
||||
|
||||
USER vls
|
||||
|
||||
HEALTHCHECK --interval=10s --timeout=10s --start-period=10s \
|
||||
CMD ["/bin/sh", "-c", "/healthcheck.sh"]
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
RUN vlsd2 --git-desc
|
||||
|
5
vlsd/healthcheck.sh
Executable file
5
vlsd/healthcheck.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
vls-cli info
|
Loading…
x
Reference in New Issue
Block a user