dockerfile: reduce interval and env config

- bitcoind and cln reduce healthcheck time interval
- cln healthcheck no need to use switch case instead use VLS_NETWORK
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
Lakshya Singh 2023-11-07 19:00:31 +05:30
parent 5f587ac475
commit f4c13e1a15
No known key found for this signature in database
GPG Key ID: D3239BA6109A2CE7
5 changed files with 3 additions and 14 deletions

View File

@ -133,7 +133,7 @@ ENTRYPOINT ["/entrypoint.sh"]
RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}"
HEALTHCHECK --interval=60s --timeout=10s --start-period=30s \ HEALTHCHECK --interval=10s --timeout=20s --start-period=30s \
CMD ["/bin/sh", "-c", "/healthcheck.sh"] CMD ["/bin/sh", "-c", "/healthcheck.sh"]
CMD ["bitcoind"] CMD ["bitcoind"]

View File

@ -19,7 +19,6 @@ services:
ports: ports:
- 19846:19846 - 19846:19846
environment: environment:
- BITCOIN_CHAIN=regtest
- VLS_NETWORK=regtest - VLS_NETWORK=regtest
- BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:38332 - BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:38332

View File

@ -35,7 +35,6 @@ services:
bitcoin-core: bitcoin-core:
condition: service_healthy condition: service_healthy
environment: environment:
- BITCOIN_CHAIN=test
- BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:18332 - BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:18332
- RUST_LOG=info - RUST_LOG=info
- VLS_NETWORK=testnet - VLS_NETWORK=testnet

View File

@ -142,7 +142,7 @@ RUN pip3 install \
requests \ requests \
packaging packaging
HEALTHCHECK --interval=10s --timeout=10s --start-period=15s \ HEALTHCHECK --interval=5s --timeout=10s --start-period=5s \
CMD ["/bin/sh", "-c", "/healthcheck.sh"] CMD ["/bin/sh", "-c", "/healthcheck.sh"]
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]

View File

@ -2,13 +2,4 @@
set -ex set -ex
LIGHTNING_NETWORK="" lightning-cli --network $VLS_NETWORK summary
case $BITCOIN_CHAIN in
"test") LIGHTNING_NETWORK=testnet ;;
"regtest") LIGHTNING_NETWORK=regtest ;;
"signet") LIGHTNING_NETWORK=signet ;;
*) echo "Invalid BITCOIN_CHAIN value: $BITCOIN_CHAIN" && exit 1 ;;
esac
lightning-cli --network $LIGHTNING_NETWORK getinfo