Improve build config file and publishing script
This commit is contained in:
parent
717660c595
commit
71af7a68b3
6 changed files with 22 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
|||
FROM ubuntu:18.04
|
||||
EXPOSE 5279
|
||||
VOLUME /storage
|
||||
RUN apt-get update && apt-get -y install unzip ca-certificates
|
||||
RUN apt-get update && apt-get -y install ca-certificates
|
||||
RUN mkdir /daemon
|
||||
WORKDIR /daemon
|
||||
COPY lbrynet ./
|
||||
|
@ -10,7 +10,7 @@ COPY conf/test_daemon_settings.yml ./
|
|||
ENV LBRY_DATA_DIR /storage/data
|
||||
ENV LBRY_LBRYUM_WALLET_DIR /storage/lbryum
|
||||
ENV LBRY_DOWNLOAD_DIRECTORY /storage/download
|
||||
ENV LBRY_API_HOST 0.0.0.0
|
||||
ENV LBRY_API 0.0.0.0:5279
|
||||
COPY start.sh ./start.sh
|
||||
RUN chmod a+x start.sh
|
||||
CMD ["./start.sh"]
|
||||
|
|
13
Makefile
13
Makefile
|
@ -1,10 +1,15 @@
|
|||
.PHONY: get_release
|
||||
all:
|
||||
make get_release
|
||||
make image
|
||||
make publish
|
||||
make clean
|
||||
|
||||
get_release:
|
||||
scripts/get_release.sh
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
docker build -t sayplastic/lbrynet:$(VERSION) .
|
||||
.PHONY: image
|
||||
image:
|
||||
docker build -t lbryweb/lbrynet:$(VERSION) -t lbryweb/lbrynet:latest .
|
||||
|
||||
.PHONY: publish
|
||||
publish:
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
use_upnp: False
|
||||
delete_blobs_on_remove: True
|
||||
|
|
|
@ -8,6 +8,6 @@ URL=$(
|
|||
)
|
||||
|
||||
echo "Getting the latest release from $URL..."
|
||||
curl -sOL $URL
|
||||
curl -OL $URL
|
||||
unzip lbrynet-linux.zip
|
||||
rm lbrynet-linux.zip
|
||||
|
|
|
@ -4,10 +4,10 @@ set +x
|
|||
set -e
|
||||
|
||||
WAIT=5
|
||||
BASE_IMAGE_NAME=sayplastic/lbrynet
|
||||
BASE_IMAGE_NAME=lbryweb/lbrynet
|
||||
|
||||
if [ -z ${VERSION+x} ]; then
|
||||
echo "Please provide sayplastic/lbrynet version as \$VERSION variable."
|
||||
echo "Please provide ${BASE_IMAGE_NAME} version as \$VERSION variable."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -25,4 +25,5 @@ echo "Container launched successfully, stopping it"
|
|||
docker kill $ID
|
||||
|
||||
echo "Pushing to Docker Hub..."
|
||||
docker push sayplastic/lbrynet:$VERSION
|
||||
docker push lbryweb/lbrynet:$VERSION
|
||||
docker push lbryweb/lbrynet:latest
|
||||
|
|
5
start.sh
5
start.sh
|
@ -1,5 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
if [ ! -d "$LBRY_DATA_DIR" ]; then
|
||||
mkdir $LBRY_DATA_DIR
|
||||
fi
|
||||
if [ ! -d "$LBRY_LBRYUM_WALLET_DIR" ]; then
|
||||
mkdir $LBRY_LBRYUM_WALLET_DIR
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue