lightning: remote_hsmd_socket & remove env files

- build vls and copy binary in final layer
- update configs
- add vls port, network, rust log and rpc url in env
- compose: set env variable in compose only
- dont separate env files, ease of access on env vars with compose
- common across networks set in dockerfile
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
Lakshya Singh 2023-10-31 20:57:04 +05:30
parent 1731716944
commit 9cb9062ce8
No known key found for this signature in database
GPG Key ID: D3239BA6109A2CE7
7 changed files with 27 additions and 14 deletions

View File

@ -7,4 +7,5 @@ max-locktime-blocks=288
important-plugin=/usr/bin/clboss
clboss-auto-close=true
bind-addr=0.0.0.0:19846
plugin=/usr/local/src/plugins/summary/summary.py
plugin=/usr/local/src/plugins/summary/summary.py
subdaemon=hsmd:remote_hsmd_socket

View File

@ -1,4 +0,0 @@
VLS_PORT=17701
VLS_NETWORK=regtest
BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:38332
RUST_LOG=info

View File

@ -7,4 +7,5 @@ max-locktime-blocks=288
important-plugin=/usr/bin/clboss
clboss-auto-close=true
bind-addr=0.0.0.0:19735
plugin=/usr/local/src/plugins/summary/summary.py
plugin=/usr/local/src/plugins/summary/summary.py
subdaemon=hsmd:remote_hsmd_socket

View File

@ -1,4 +0,0 @@
VLS_PORT=17701
VLS_NETWORK=testnet
BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:18332
RUST_LOG=info

View File

@ -18,10 +18,10 @@ services:
- 19846
ports:
- 19846:19846
env_file:
- ./assets/regtest-env
environment:
- BITCOIN_CHAIN=regtest
- VLS_NETWORK=regtest
- BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:38332
txoo:
container_name: txoo-regtest

View File

@ -30,15 +30,19 @@ services:
- clightning:/home/lightning/.lightning
expose:
- 19735
- 7701
networks:
- LN_testing
depends_on:
bitcoin-core:
condition: service_healthy
env_file:
- ./assets/testnet-env
environment:
- BITCOIN_CHAIN=test
- BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:18332
- RUST_LOG=info
- VLS_NETWORK=testnet
- VLS_BIND=0.0.0.0
- VLS_PORT=7701
txoo:
build:

View File

@ -61,6 +61,20 @@ RUN git clone $PLUGINS_REPO && \
cd plugins && \
git checkout $PLUGINS_GIT_HASH
RUN apk add \
cargo \
rust \
grpc \
protobuf \
protobuf-dev
ARG VLS_GIT_HASH=af02dac8b855c361d74234387d288a9591fad1d5
ARG VLS_REPO=https://gitlab.com/lightning-signer/validating-lightning-signer.git
RUN git clone $VLS_REPO && \
cd validating-lightning-signer && \
git checkout $VLS_GIT_HASH && \
cargo build --bins -r
# final stage with runtime dependencies and pkgs
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as runner
@ -98,6 +112,7 @@ 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
COPY --from=builder /build/validating-lightning-signer/target/release/remote_hsmd_socket /usr/libexec/c-lightning/remote_hsmd_socket
RUN addgroup -S lightning && adduser -S lightning -G lightning && \
mkdir -p ${LIGHTNINGD_DATA} && \