Skip to content

Commit

Permalink
Updates lbrycrd config file in testnet and regtest modes.
Browse files Browse the repository at this point in the history
  • Loading branch information
EnigmaCurry committed Apr 27, 2019
1 parent 10d4edc commit 2092949
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
2 changes: 2 additions & 0 deletions lbrycrd/Dockerfile-linux-x86_64-production
Original file line number Diff line number Diff line change
Expand Up @@ -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/
RUN addgroup --gid 1000 lbrycrd && \
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
VOLUME ["/data"]
WORKDIR /data
Expand Down
41 changes: 20 additions & 21 deletions lbrycrd/stuff/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ function set_config() {
else
echo "Creating a fresh config file from environment variables."
## Set config params
mkdir -p `dirname $CONFIG_PATH`
echo "rpcuser=$RPC_USER" > $CONFIG_PATH
echo "rpcpassword=$RPC_PASSWORD" >> $CONFIG_PATH
echo "rpcallowip=$RPC_ALLOW_IP" >> $CONFIG_PATH
Expand Down Expand Up @@ -48,35 +47,35 @@ case $RUN_MODE in
## Set config params
## TODO: Make this more automagic in the future.
mkdir -p `dirname $CONFIG_PATH`
echo "rpcuser=lbry" > /data/.lbrycrd/lbrycrd.conf
echo "rpcpassword=lbry" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcport=11337" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcbind=0.0.0.0" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcallowip=0.0.0.0/0" >> /data/.lbrycrd/lbrycrd.conf
echo "regtest=1" >> /data/.lbrycrd/lbrycrd.conf
echo "txindex=1" >> /data/.lbrycrd/lbrycrd.conf
echo "server=1" >> /data/.lbrycrd/lbrycrd.conf
echo "printtoconsole=1" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcuser=lbry" > $CONFIG_PATH
echo "rpcpassword=lbry" >> $CONFIG_PATH
echo "rpcport=11337" >> $CONFIG_PATH
echo "rpcbind=0.0.0.0" >> $CONFIG_PATH
echo "rpcallowip=0.0.0.0/0" >> $CONFIG_PATH
echo "regtest=1" >> $CONFIG_PATH
echo "txindex=1" >> $CONFIG_PATH
echo "server=1" >> $CONFIG_PATH
echo "printtoconsole=1" >> $CONFIG_PATH

#nohup advance &>/dev/null &
lbrycrdd -conf=/data/.lbrycrd/lbrycrd.conf $1
lbrycrdd -conf=$CONFIG_PATH $1
;;
testnet )
## Set config params
## TODO: Make this more automagic in the future.
mkdir -p `dirname $CONFIG_PATH`
echo "rpcuser=lbry" > /data/.lbrycrd/lbrycrd.conf
echo "rpcpassword=lbry" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcport=11337" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcbind=0.0.0.0" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcallowip=0.0.0.0/0" >> /data/.lbrycrd/lbrycrd.conf
echo "testnet=1" >> /data/.lbrycrd/lbrycrd.conf
echo "txindex=1" >> /data/.lbrycrd/lbrycrd.conf
echo "server=1" >> /data/.lbrycrd/lbrycrd.conf
echo "printtoconsole=1" >> /data/.lbrycrd/lbrycrd.conf
echo "rpcuser=lbry" > $CONFIG_PATH
echo "rpcpassword=lbry" >> $CONFIG_PATH
echo "rpcport=11337" >> $CONFIG_PATH
echo "rpcbind=0.0.0.0" >> $CONFIG_PATH
echo "rpcallowip=0.0.0.0/0" >> $CONFIG_PATH
echo "testnet=1" >> $CONFIG_PATH
echo "txindex=1" >> $CONFIG_PATH
echo "server=1" >> $CONFIG_PATH
echo "printtoconsole=1" >> $CONFIG_PATH

#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."
Expand Down

0 comments on commit 2092949

Please sign in to comment.