Compare commits
No commits in common. "master" and "regtest_support" have entirely different histories.
master
...
regtest_su
10 changed files with 92 additions and 67 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM ubuntu:latest
|
FROM ubuntu:18.04
|
||||||
EXPOSE 5279 5280
|
EXPOSE 5279 5280
|
||||||
|
|
||||||
VOLUME /storage
|
VOLUME /storage
|
||||||
|
@ -11,6 +11,5 @@ COPY conf/test_daemon_settings.yml ./
|
||||||
COPY conf/regtest_daemon_settings.yml ./
|
COPY conf/regtest_daemon_settings.yml ./
|
||||||
|
|
||||||
COPY launcher.sh ./launcher.sh
|
COPY launcher.sh ./launcher.sh
|
||||||
COPY scripts/probe.sh ./probe.sh
|
RUN chmod a+x launcher.sh
|
||||||
RUN chmod +x lbrynet ./*.sh
|
|
||||||
CMD ["./launcher.sh"]
|
CMD ["./launcher.sh"]
|
||||||
|
|
19
Makefile
19
Makefile
|
@ -1,9 +1,18 @@
|
||||||
image:
|
all:
|
||||||
scripts/build.sh ${VERSION}
|
make clean
|
||||||
|
make latest_image
|
||||||
|
make publish
|
||||||
|
make clean
|
||||||
|
|
||||||
.PHONY: push
|
latest_image:
|
||||||
push:
|
scripts/get_release.sh
|
||||||
scripts/push.sh ${VERSION}
|
|
||||||
|
latest_rc_image:
|
||||||
|
scripts/get_release.sh rc
|
||||||
|
|
||||||
|
.PHONY: publish
|
||||||
|
publish:
|
||||||
|
scripts/publish.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf lbrynet lbrynet-linux.zip
|
rm -rf lbrynet lbrynet-linux.zip
|
||||||
|
|
14
README.md
14
README.md
|
@ -32,15 +32,17 @@ You need to have the docker toolset installed on your system, as well as the abi
|
||||||
This is the preferred method because it also checks if our newly built container can actually run.
|
This is the preferred method because it also checks if our newly built container can actually run.
|
||||||
|
|
||||||
```
|
```
|
||||||
export VERSION=0.101.1
|
make latest_image
|
||||||
make image
|
# or
|
||||||
make publish
|
make latest_rc_image
|
||||||
|
make publish VERSION=0.36.0
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Manually
|
#### Manually
|
||||||
|
|
||||||
```
|
```
|
||||||
make image
|
make get_release
|
||||||
docker build -t lbry/lbrynet-tv:0.101.1
|
docker build -t lbry/lbrynet-tv:0.36.0 .
|
||||||
docker push lbry/lbrynet-tv:0.101.1
|
docker tag lbry/lbrynet-tv:0.36.0 lbry/lbrynet-tv:latest
|
||||||
|
docker push lbry/lbrynet-tv
|
||||||
```
|
```
|
||||||
|
|
|
@ -11,10 +11,13 @@ data_dir: /storage/lbrynet
|
||||||
download_dir: /storage/download
|
download_dir: /storage/download
|
||||||
wallet_dir: /storage/lbryum
|
wallet_dir: /storage/lbryum
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
save_blobs: false
|
save_blobs: false
|
||||||
save_files: false
|
save_files: false
|
||||||
share_usage_data: false
|
share_usage_data: false
|
||||||
use_upnp: false
|
use_upnp: false
|
||||||
save_resolved_claims: false
|
save_resolved_claims: false
|
||||||
|
|
||||||
reflect_streams: false
|
lbryum_servers:
|
||||||
|
- spv26.lbry.com:50001
|
||||||
|
|
|
@ -46,5 +46,4 @@ if [ ! -z ${SDK_LBRYUM_SERVERS+x} ]; then
|
||||||
SDK_ARGS="${SDK_ARGS} --lbryum-servers=${SDK_LBRYUM_SERVERS}"
|
SDK_ARGS="${SDK_ARGS} --lbryum-servers=${SDK_LBRYUM_SERVERS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf /storage/lbrynet/lbrynet.sqlite*
|
|
||||||
./lbrynet start --config=$CONFIG $SDK_ARGS
|
./lbrynet start --config=$CONFIG $SDK_ARGS
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
BASE_IMAGE_NAME=lbry/lbrynet-tv
|
|
||||||
WAIT=5
|
|
||||||
|
|
||||||
if [ -z ${1} ]; then
|
|
||||||
echo "Please provide lbrynet version as an argument."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
RELEASE_URL="https://github.com/lbryio/lbry-sdk/releases/download/v$VERSION/lbrynet-linux.zip"
|
|
||||||
|
|
||||||
echo "Getting the version ${VERSION} from ${RELEASE_URL}..."
|
|
||||||
curl -OL $RELEASE_URL
|
|
||||||
unzip lbrynet-linux.zip
|
|
||||||
rm lbrynet-linux.zip
|
|
||||||
|
|
||||||
docker build -t ${BASE_IMAGE_NAME}:${VERSION} --platform linux/amd64 .
|
|
||||||
|
|
||||||
echo "Launching container for ${BASE_IMAGE_NAME}:${VERSION} and giving it ${WAIT}s to launch..."
|
|
||||||
|
|
||||||
ID=$(docker run --detach --rm $BASE_IMAGE_NAME:$VERSION)
|
|
||||||
sleep $WAIT
|
|
||||||
|
|
||||||
if [[ -z "${ID+x}" || ! $(docker top "$ID") ]]; then
|
|
||||||
echo "Container crashed unexpectedly, aborting"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Container launched successfully, stopping it"
|
|
||||||
docker kill $ID
|
|
35
scripts/get_release.sh
Executable file
35
scripts/get_release.sh
Executable file
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
BASE_IMAGE_NAME=lbry/lbrynet-tv
|
||||||
|
|
||||||
|
if [[ ${1} == "rc" ]]; then
|
||||||
|
API_URL="https://api.github.com/repos/lbryio/lbry/releases"
|
||||||
|
RC_SUFFIX="-rc"
|
||||||
|
elif [ ${1} != "" ]; then
|
||||||
|
API_URL="https://api.github.com/repos/lbryio/lbry/releases/tags/${1}"
|
||||||
|
RC_SUFFIX=""
|
||||||
|
else
|
||||||
|
API_URL="https://api.github.com/repos/lbryio/lbry/releases/latest"
|
||||||
|
RC_SUFFIX=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "URL: ${API_URL}"
|
||||||
|
|
||||||
|
URL=$(
|
||||||
|
curl -siL ${API_URL}|
|
||||||
|
grep browser_download_url|
|
||||||
|
grep linux|
|
||||||
|
head -n 1|
|
||||||
|
sed -E 's/.*"([^"]+)".*/\1/'
|
||||||
|
)
|
||||||
|
|
||||||
|
VERSION=$(echo $URL|sed -e 's/.*download\/v\([^"]*\)\/.*/\1/')
|
||||||
|
|
||||||
|
echo "Getting the latest version ${VERSION} from ${URL}..."
|
||||||
|
curl -OL $URL
|
||||||
|
unzip lbrynet-linux.zip
|
||||||
|
rm lbrynet-linux.zip
|
||||||
|
|
||||||
|
docker build -t ${BASE_IMAGE_NAME}:${VERSION} -t ${BASE_IMAGE_NAME}:latest${RC_SUFFIX} .
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
curl -sd '{"method": "status"}' $1 |grep '"wallet": true'
|
|
29
scripts/publish.sh
Executable file
29
scripts/publish.sh
Executable file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
WAIT=5
|
||||||
|
BASE_IMAGE_NAME=lbry/lbrynet-tv
|
||||||
|
|
||||||
|
if [ -z ${VERSION+x} ]; then
|
||||||
|
echo "Please provide ${BASE_IMAGE_NAME} version as \$VERSION variable."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Launching daemon container for ${BASE_IMAGE_NAME}:${VERSION} and giving it ${WAIT} secs..."
|
||||||
|
|
||||||
|
ID=$(docker run --detach --rm $BASE_IMAGE_NAME:$VERSION)
|
||||||
|
sleep $WAIT
|
||||||
|
|
||||||
|
if [[ -z "${ID+x}" || ! $(docker top "$ID") ]]; then
|
||||||
|
echo "Container crashed unexpectedly, aborting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Container launched successfully, stopping it"
|
||||||
|
docker kill $ID
|
||||||
|
|
||||||
|
echo "Pushing to Docker Hub..."
|
||||||
|
docker push ${BASE_IMAGE_NAME}:${VERSION}
|
||||||
|
docker push ${BASE_IMAGE_NAME}:latest
|
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
BASE_IMAGE_NAME=lbry/lbrynet-tv
|
|
||||||
|
|
||||||
if [ -z ${1} ]; then
|
|
||||||
echo "Please provide ${BASE_IMAGE_NAME} version as an argument."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
echo "Pushing to Docker Hub..."
|
|
||||||
docker push ${BASE_IMAGE_NAME}:${VERSION}
|
|
Loading…
Add table
Add a link
Reference in a new issue