Merge branch 'refactor' of github.com:lbryio/lbry-docker into refactor
This commit is contained in:
commit
de0a21a43c
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/
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
@ -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."
|
||||
|
|
Loading…
Reference in a new issue