diff --git a/README.md b/README.md index ae01c3e..0da5147 100644 --- a/README.md +++ b/README.md @@ -191,8 +191,8 @@ docker container exec lightningd-test lightning-cli --testnet summary - [x] standalone docker image for `bitcoind` - [ ] supporting signet - [x] Profile configuration to run `vls` -- [ ] Healthcheck for `txoo` -- [ ] Healthcheck for `vls` +- [x] Healthcheck for `txoo` +- [x] Healthcheck for `vls` - [ ] Lightning Storage Server Dockerfile and Compose Service - [ ] Postgres Service for Lightning Storage Server diff --git a/bitcoind/Dockerfile b/bitcoind/Dockerfile index 1663d4b..69cd2af 100644 --- a/bitcoind/Dockerfile +++ b/bitcoind/Dockerfile @@ -136,6 +136,6 @@ ENTRYPOINT ["/entrypoint.sh"] RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" HEALTHCHECK --interval=10s --timeout=20s --start-period=30s \ - CMD ["/bin/sh", "-c", "/healthcheck.sh"] + CMD ["/healthcheck.sh"] CMD ["bitcoind"] diff --git a/lightningd/Dockerfile b/lightningd/Dockerfile index 464ef33..b0de907 100644 --- a/lightningd/Dockerfile +++ b/lightningd/Dockerfile @@ -27,8 +27,8 @@ RUN apk update && \ zlib-dev \ zlib-static -ARG CORE_LIGHTNING_GIT_HASH=bd9494c65be09e6f8ecb3bc49b50a859467a65fe \ - CORE_LIGHTNING_REPO=https://github.com/lightning-signer/c-lightning.git +ARG CORE_LIGHTNING_GIT_HASH=76cd32387a400a2aee607edaf1e0a06e92e1402f \ + CORE_LIGHTNING_REPO=https://github.com/ElementsProject/lightning.git RUN git clone --recursive $CORE_LIGHTNING_REPO core-lightning RUN cd core-lightning && \ git checkout $CORE_LIGHTNING_GIT_HASH && \ @@ -37,7 +37,7 @@ RUN cd core-lightning && \ make -j $(nproc) install && \ make clean -ARG PLUGINS_GIT_HASH=ce078bb74e10b5dea779fcd9fbe77e1d3e72db7a \ +ARG PLUGINS_GIT_HASH=cf96eb63c1687644042ea85acfd3785527fd98d4 \ PLUGINS_REPO=https://github.com/lightningd/plugins.git RUN git clone $PLUGINS_REPO RUN cd plugins && \ @@ -60,7 +60,7 @@ RUN apk update && \ pkgconf \ sqlite-dev -ARG CLBOSS_GIT_HASH=9c050d61f01ffff4b7b5d295f708569dd71b55d3 \ +ARG CLBOSS_GIT_HASH=0673c50e7374ea8f5cb7e302f72b7978c6bd1794 \ CLBOSS_REPO=https://github.com/ZmnSCPxj/clboss.git RUN git clone --recurse-submodules $CLBOSS_REPO clboss RUN cd clboss && \ @@ -85,7 +85,7 @@ RUN apk update && \ protobuf-dev \ rust -ARG VLS_GIT_HASH=59544fd5b15658643acebdaf18886022db3d1071 \ +ARG VLS_GIT_HASH=f8dea081b8d3ba292285266c9b304eb1d32ceaad \ VLS_REPO=https://gitlab.com/lightning-signer/validating-lightning-signer.git RUN git clone $VLS_REPO vls RUN cd vls && \ @@ -159,7 +159,7 @@ RUN pip3 install \ packaging HEALTHCHECK --interval=5s --timeout=10s --start-period=5s \ - CMD ["/bin/sh", "-c", "/healthcheck.sh"] + CMD ["/healthcheck.sh"] ENTRYPOINT ["/entrypoint.sh"] CMD ["lightningd"] diff --git a/scripts/cleanup_regtest.sh b/scripts/cleanup_regtest.sh new file mode 100755 index 0000000..960565c --- /dev/null +++ b/scripts/cleanup_regtest.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -ex + +docker compose --profile vls down +docker volume rm vls-container_bitcoin_regtest +docker volume rm vls-container_lightning_regtest +docker volume rm vls-container_vls_regtest +docker volume rm vls-container_txoo_regtest diff --git a/txood/Dockerfile b/txood/Dockerfile index 13f003d..0a51055 100644 --- a/txood/Dockerfile +++ b/txood/Dockerfile @@ -45,7 +45,7 @@ RUN chmod +x /healthcheck.sh VOLUME ["${TXOO_DATA}"] HEALTHCHECK --interval=5s --timeout=10s --start-period=5s \ - CMD ["/bin/sh", "-c", "/healthcheck.sh"] + CMD ["/healthcheck.sh"] ENTRYPOINT ["/entrypoint.sh"] CMD ["txood"] diff --git a/txood/healthcheck.sh b/txood/healthcheck.sh old mode 100644 new mode 100755 diff --git a/vlsd/Dockerfile b/vlsd/Dockerfile index edd7e4a..e2c83ad 100644 --- a/vlsd/Dockerfile +++ b/vlsd/Dockerfile @@ -12,11 +12,12 @@ RUN apk update && \ protobuf-dev \ rust -ARG GIT_HASH=59544fd5b15658643acebdaf18886022db3d1071 +ARG GIT_HASH=f8dea081b8d3ba292285266c9b304eb1d32ceaad RUN git clone https://gitlab.com/lightning-signer/validating-lightning-signer.git vls 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 ["/healthcheck.sh"] + ENTRYPOINT ["/entrypoint.sh"] RUN vlsd2 --git-desc diff --git a/vlsd/healthcheck.sh b/vlsd/healthcheck.sh new file mode 100755 index 0000000..7bf72ec --- /dev/null +++ b/vlsd/healthcheck.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -ex + +vls-cli info \ No newline at end of file