diff --git a/assets/regtest-config b/assets/regtest-config index 545c024..cbe65d8 100644 --- a/assets/regtest-config +++ b/assets/regtest-config @@ -6,4 +6,5 @@ log-level=info max-locktime-blocks=288 important-plugin=/usr/bin/clboss clboss-auto-close=true -bind-addr=0.0.0.0:19846 \ No newline at end of file +bind-addr=0.0.0.0:19846 +plugin=/usr/local/src/plugins/summary/summary.py \ No newline at end of file diff --git a/assets/testnet-config b/assets/testnet-config index 06f71f8..274338b 100644 --- a/assets/testnet-config +++ b/assets/testnet-config @@ -6,4 +6,5 @@ log-level=info max-locktime-blocks=288 important-plugin=/usr/bin/clboss clboss-auto-close=true -bind-addr=0.0.0.0:19735 \ No newline at end of file +bind-addr=0.0.0.0:19735 +plugin=/usr/local/src/plugins/summary/summary.py \ No newline at end of file diff --git a/lightningd/Dockerfile b/lightningd/Dockerfile index 864f67d..18fc887 100644 --- a/lightningd/Dockerfile +++ b/lightningd/Dockerfile @@ -27,10 +27,11 @@ RUN apk update && \ zlib-dev \ zlib-static -ARG GIT_HASH=bd9494c65be09e6f8ecb3bc49b50a859467a65fe -RUN git clone --recursive https://github.com/lightning-signer/c-lightning.git /repo && \ +ARG CORE_LIGHTNING_GIT_HASH=bd9494c65be09e6f8ecb3bc49b50a859467a65fe +ARG CORE_LIGHTNING_REPO=https://github.com/lightning-signer/c-lightning.git +RUN git clone --recursive $CORE_LIGHTNING_REPO /repo && \ cd /repo && \ - git checkout $GIT_HASH && \ + git checkout $CORE_LIGHTNING_GIT_HASH && \ ./configure --enable-static --prefix=/usr && \ make -j $(nproc) && \ make install @@ -44,15 +45,22 @@ RUN apk add \ pkgconf \ sqlite-dev -ARG GIT_HASH=4f37007f00f1cf41e2ead031ddc4a34ef8dbd9e5 -RUN git clone --recurse-submodules https://github.com/ZmnSCPxj/clboss.git /clboss && \ +ARG CLBOSS_GIT_HASH=4f37007f00f1cf41e2ead031ddc4a34ef8dbd9e5 +ARG CLBOSS_REPO=https://github.com/ZmnSCPxj/clboss.git +RUN git clone --recurse-submodules $CLBOSS_REPO /clboss && \ cd /clboss && \ - git checkout $GIT_HASH && \ + git checkout $CLBOSS_GIT_HASH && \ autoreconf -i && \ ./configure --prefix=/usr && \ make -j $(nproc) && \ make install +ARG PLUGINS_GIT_HASH=ce078bb74e10b5dea779fcd9fbe77e1d3e72db7a +ARG PLUGINS_REPO=https://github.com/lightningd/plugins.git +RUN git clone $PLUGINS_REPO && \ + cd plugins && \ + git checkout $PLUGINS_GIT_HASH + # final stage with runtime dependencies and pkgs FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as runner @@ -62,6 +70,7 @@ LABEL maintainer.0="Lakshya Singh (@king-11)" \ RUN apk update && \ apk add \ python3 \ + py3-pip \ postgresql \ bitcoin-cli \ pkgconf \ @@ -79,6 +88,8 @@ ENV LIGHTNINGD_DATA=${LIGHTNINGD_HOME}/.lightning \ LIGHTNINGD_PORT=9735 \ BITCOIND_HOME=/root/.bitcoin +RUN mkdir -p /usr/local/src/plugins + COPY --from=builder /usr/bin/lightningd /usr/bin/ COPY --from=builder /usr/bin/lightning-cli /usr/bin/ COPY --from=builder /usr/bin/lightning-hsmtool /usr/bin/ @@ -86,6 +97,7 @@ COPY --from=builder /usr/libexec/c-lightning /usr/libexec/c-lightning COPY --from=builder /usr/share/man/man8 /usr/share/man/man8 COPY --from=builder /usr/share/doc/c-lightning /usr/share/doc/c-lightning COPY --from=builder /usr/bin/clboss /usr/bin/clboss +COPY --from=builder /build/plugins/summary /usr/local/src/plugins/summary RUN addgroup -S lightning && adduser -S lightning -G lightning && \ mkdir -p ${LIGHTNINGD_DATA} && \ @@ -110,6 +122,11 @@ COPY assets/regtest-config /regtest-config USER lightning +RUN pip3 install \ + pyln-client \ + requests \ + packaging + HEALTHCHECK --interval=10s --timeout=10s --start-period=15s \ CMD ["/bin/sh", "-c", "/healthcheck.sh"] diff --git a/txood/Dockerfile b/txood/Dockerfile index 777b817..5a1b18b 100644 --- a/txood/Dockerfile +++ b/txood/Dockerfile @@ -10,10 +10,11 @@ RUN apk update && \ RUN apk add cargo -ARG GIT_HASH=528fa92e5def1b6cc19127f2242137bf6f13550d -RUN git clone --recurse-submodules https://gitlab.com/lightning-signer/txoo.git && \ +ARG TXOO_GIT_HASH=528fa92e5def1b6cc19127f2242137bf6f13550d +ARG TXOO_REPO=https://gitlab.com/lightning-signer/txoo.git +RUN git clone --recurse-submodules $TXOO_REPO && \ cd txoo && \ - git checkout $GIT_HASH && \ + git checkout $TXOO_GIT_HASH && \ cargo build --release -p txood # txoo runner