Make wallet server configurable via SDK_LBRYUM_SERVERS env variable

This commit is contained in:
Andrey Beletsky 2019-07-08 15:22:48 +07:00
parent d9abdf89b4
commit b33cd7c9a5
4 changed files with 19 additions and 9 deletions

View file

@ -9,6 +9,6 @@ COPY lbrynet ./
COPY conf/daemon_settings.yml ./
COPY conf/test_daemon_settings.yml ./
COPY start.sh ./start.sh
RUN chmod a+x start.sh
CMD ["./start.sh"]
COPY launcher.sh ./launcher.sh
RUN chmod a+x launcher.sh
CMD ["./launcher.sh"]

View file

@ -1,4 +1,5 @@
all:
make clean
make latest_image
make publish
make clean

View file

@ -3,6 +3,8 @@
set -o xtrace
set -e
SDK_ARGS=""
function parse_yaml {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
@ -20,11 +22,10 @@ function parse_yaml {
}'
}
if [ -z ${LBRY_DOCKER_CONFIG+x} ]; then
if [ -z ${SDK_CONFIG+x} ]; then
CONFIG="/daemon/daemon_settings.yml"
else
CONFIG=$LBRY_DOCKER_CONFIG
CONFIG=$SDK_CONFIG
fi
cat $CONFIG
@ -41,4 +42,8 @@ if [ ! -d "$LBRY_download_dir" ]; then
mkdir $LBRY_download_dir
fi
./lbrynet start --config=$CONFIG
if [ ! -z ${SDK_LBRYUM_SERVERS+x} ]; then
SDK_ARGS="${SDK_ARGS} --lbryum-servers=${SDK_LBRYUM_SERVERS}"
fi
./lbrynet start --config=$CONFIG $SDK_ARGS

View file

@ -1,15 +1,19 @@
#!/bin/bash
set -e
if [[ ${1} == "rc" ]]; then
API_URL="https://api.github.com/repos/lbryio/lbry/releases"
RC_SUFFIX="-rc"
else
API_URL="https://api.github.com/repos/lbryio/lbry/releases/latest"
RC_SUFFIX="rc"
RC_SUFFIX=""
fi
echo ${API_URL}
URL=$(
curl -si ${API_URL}|
curl -siL ${API_URL}|
grep browser_download_url|
grep linux|
head -n 1|