diff --git a/Dockerfile b/Dockerfile index 830d354..76fc559 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/Makefile b/Makefile index d8b2020..2a7fb99 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ all: + make clean make latest_image make publish make clean diff --git a/start.sh b/launcher.sh similarity index 80% rename from start.sh rename to launcher.sh index 7ff497a..ba2fb3a 100644 --- a/start.sh +++ b/launcher.sh @@ -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 diff --git a/scripts/get_release.sh b/scripts/get_release.sh index d808f2f..73aa543 100755 --- a/scripts/get_release.sh +++ b/scripts/get_release.sh @@ -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|