Updates lbrycrd config file in testnet and regtest modes.
This commit is contained in:
parent
10d4edc77d
commit
2092949655
2 changed files with 22 additions and 21 deletions
|
@ -20,6 +20,8 @@ FROM ubuntu:18.04 as app
|
||||||
COPY --from=prep /lbrycrdd /lbrycrd-cli /lbrycrd-tx /start /healthcheck /fix-permissions /advance /usr/bin/
|
COPY --from=prep /lbrycrdd /lbrycrd-cli /lbrycrd-tx /start /healthcheck /fix-permissions /advance /usr/bin/
|
||||||
RUN addgroup --gid 1000 lbrycrd && \
|
RUN addgroup --gid 1000 lbrycrd && \
|
||||||
adduser lbrycrd --uid 1000 --gid 1000 --gecos GECOS --shell /bin/bash --disabled-password --home /data && \
|
adduser lbrycrd --uid 1000 --gid 1000 --gecos GECOS --shell /bin/bash --disabled-password --home /data && \
|
||||||
|
mkdir /etc/lbry && \
|
||||||
|
chown lbrycrd /etc/lbry && \
|
||||||
chmod a+s /usr/bin/fix-permissions
|
chmod a+s /usr/bin/fix-permissions
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
|
@ -9,7 +9,6 @@ function set_config() {
|
||||||
else
|
else
|
||||||
echo "Creating a fresh config file from environment variables."
|
echo "Creating a fresh config file from environment variables."
|
||||||
## Set config params
|
## Set config params
|
||||||
mkdir -p `dirname $CONFIG_PATH`
|
|
||||||
echo "rpcuser=$RPC_USER" > $CONFIG_PATH
|
echo "rpcuser=$RPC_USER" > $CONFIG_PATH
|
||||||
echo "rpcpassword=$RPC_PASSWORD" >> $CONFIG_PATH
|
echo "rpcpassword=$RPC_PASSWORD" >> $CONFIG_PATH
|
||||||
echo "rpcallowip=$RPC_ALLOW_IP" >> $CONFIG_PATH
|
echo "rpcallowip=$RPC_ALLOW_IP" >> $CONFIG_PATH
|
||||||
|
@ -48,35 +47,35 @@ case $RUN_MODE in
|
||||||
## Set config params
|
## Set config params
|
||||||
## TODO: Make this more automagic in the future.
|
## TODO: Make this more automagic in the future.
|
||||||
mkdir -p `dirname $CONFIG_PATH`
|
mkdir -p `dirname $CONFIG_PATH`
|
||||||
echo "rpcuser=lbry" > /data/.lbrycrd/lbrycrd.conf
|
echo "rpcuser=lbry" > $CONFIG_PATH
|
||||||
echo "rpcpassword=lbry" >> /data/.lbrycrd/lbrycrd.conf
|
echo "rpcpassword=lbry" >> $CONFIG_PATH
|
||||||
echo "rpcport=11337" >> /data/.lbrycrd/lbrycrd.conf
|
echo "rpcport=11337" >> $CONFIG_PATH
|
||||||
echo "rpcbind=0.0.0.0" >> /data/.lbrycrd/lbrycrd.conf
|
echo "rpcbind=0.0.0.0" >> $CONFIG_PATH
|
||||||
echo "rpcallowip=0.0.0.0/0" >> /data/.lbrycrd/lbrycrd.conf
|
echo "rpcallowip=0.0.0.0/0" >> $CONFIG_PATH
|
||||||
echo "regtest=1" >> /data/.lbrycrd/lbrycrd.conf
|
echo "regtest=1" >> $CONFIG_PATH
|
||||||
echo "txindex=1" >> /data/.lbrycrd/lbrycrd.conf
|
echo "txindex=1" >> $CONFIG_PATH
|
||||||
echo "server=1" >> /data/.lbrycrd/lbrycrd.conf
|
echo "server=1" >> $CONFIG_PATH
|
||||||
echo "printtoconsole=1" >> /data/.lbrycrd/lbrycrd.conf
|
echo "printtoconsole=1" >> $CONFIG_PATH
|
||||||
|
|
||||||
#nohup advance &>/dev/null &
|
#nohup advance &>/dev/null &
|
||||||
lbrycrdd -conf=/data/.lbrycrd/lbrycrd.conf $1
|
lbrycrdd -conf=$CONFIG_PATH $1
|
||||||
;;
|
;;
|
||||||
testnet )
|
testnet )
|
||||||
## Set config params
|
## Set config params
|
||||||
## TODO: Make this more automagic in the future.
|
## TODO: Make this more automagic in the future.
|
||||||
mkdir -p `dirname $CONFIG_PATH`
|
mkdir -p `dirname $CONFIG_PATH`
|
||||||
echo "rpcuser=lbry" > /data/.lbrycrd/lbrycrd.conf
|
echo "rpcuser=lbry" > $CONFIG_PATH
|
||||||
echo "rpcpassword=lbry" >> /data/.lbrycrd/lbrycrd.conf
|
echo "rpcpassword=lbry" >> $CONFIG_PATH
|
||||||
echo "rpcport=11337" >> /data/.lbrycrd/lbrycrd.conf
|
echo "rpcport=11337" >> $CONFIG_PATH
|
||||||
echo "rpcbind=0.0.0.0" >> /data/.lbrycrd/lbrycrd.conf
|
echo "rpcbind=0.0.0.0" >> $CONFIG_PATH
|
||||||
echo "rpcallowip=0.0.0.0/0" >> /data/.lbrycrd/lbrycrd.conf
|
echo "rpcallowip=0.0.0.0/0" >> $CONFIG_PATH
|
||||||
echo "testnet=1" >> /data/.lbrycrd/lbrycrd.conf
|
echo "testnet=1" >> $CONFIG_PATH
|
||||||
echo "txindex=1" >> /data/.lbrycrd/lbrycrd.conf
|
echo "txindex=1" >> $CONFIG_PATH
|
||||||
echo "server=1" >> /data/.lbrycrd/lbrycrd.conf
|
echo "server=1" >> $CONFIG_PATH
|
||||||
echo "printtoconsole=1" >> /data/.lbrycrd/lbrycrd.conf
|
echo "printtoconsole=1" >> $CONFIG_PATH
|
||||||
|
|
||||||
#nohup advance &>/dev/null &
|
#nohup advance &>/dev/null &
|
||||||
lbrycrdd -conf=/data/.lbrycrd/lbrycrd.conf $1
|
lbrycrdd -conf=$CONFIG_PATH $1
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
echo "Error, you must define a RUN_MODE environment variable."
|
echo "Error, you must define a RUN_MODE environment variable."
|
||||||
|
|
Loading…
Reference in a new issue