Adds env config flags to turn rpc server on or off

This commit is contained in:
zontreck 2025-02-09 22:12:20 -07:00
parent 140cda6075
commit 58fe36eb80
2 changed files with 10 additions and 1 deletions

View file

@ -23,8 +23,12 @@ RUN chmod +x entrypoint.sh
ENV TXINDEX 0
ENV PRUNE 953
ENV USER nan
ENV PASS nan
ENV ENABLE_RPC 0
EXPOSE 8333
EXPOSE 8332
RUN chmod +x /entrypoint.sh

View file

@ -1,3 +1,8 @@
#!/bin/bash
/app/bitcoind -datadir=/data -server=1 -txindex=$TXINDEX -prune=$PRUNE
if [ $ENABLE_RPC == 1 ]
then
/app/bitcoind -datadir=/data -server -txindex=$TXINDEX -prune=$PRUNE -rest -rpcallowip=0.0.0.0 -rpcuser=$USER -rpcpass=$PASS
else
/app/bitcoind -datadir=/data -txindex=$TXINDEX -prune=$PRUNE
fi