Skip to content

Commit

Permalink
simplify tags and Dockerfile name
Browse files Browse the repository at this point in the history
  • Loading branch information
lyoshenka committed Nov 6, 2019
1 parent cf68868 commit 1eddbd8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ COPY ./stuff/start.sh start
COPY ./stuff/healthcheck.sh healthcheck
COPY ./stuff/advance_blocks.sh advance
COPY ./stuff/fix-permissions.c fix-permissions.c
RUN curl --progress-bar -L -o ./lbrycrd-linux.zip $(curl -s https://api.github.com/repos/lbryio/lbrycrd/releases | grep -F 'lbrycrd-linux' | grep download | head -n 1 | cut -d'"' -f4) && \
ARG release_url
# require that release_url is set
RUN test -n "$release_url"
RUN curl --progress-bar -L -o ./lbrycrd-linux.zip "$release_url" && \
unzip ./lbrycrd-linux.zip && \
gcc fix-permissions.c -o fix-permissions && \
chmod +x ./lbrycrdd ./lbrycrd-cli ./lbrycrd-tx ./start ./healthcheck ./fix-permissions ./advance
Expand Down
13 changes: 5 additions & 8 deletions lbrycrd/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# lbrycrd
# Docker image tags
`lbry/lbrycrd`
`[linux-x86_64-production](https://github.com/lbryio/lbry-docker/blob/master/lbrycrd/Dockerfile-linux-x86_64-production)` (Latest release)

# lbrycrd Docker image
`

## Configuration

Expand Down Expand Up @@ -31,18 +28,18 @@ mounted config file exists, these variables are used to create a fresh config.
Running the default configuration:

```
docker run --rm -it -e RUN_MODE=default -e SNAPSHOT_URL="https://lbry.com/snapshot/blockchain" lbry/lbrycrd:linux-x86_64-production
docker run --rm -it -e RUN_MODE=default -e SNAPSHOT_URL="https://lbry.com/snapshot/blockchain" lbry/lbrycrd:latest-release
```

Running with RPC password changed:

```
docker run --rm -it -e RUN_MODE=default -e RPC_PASSWORD=hunter2 lbry/lbrycrd:linux-x86_64-production
docker run --rm -it -e RUN_MODE=default -e RPC_PASSWORD=hunter2 lbry/lbrycrd:latest-release
```

Running with a config file but with the RPC password still overridden:

```
docker run --rm -it -v /path/to/lbrycrd.conf:/etc/lbry/lbrycrd.conf -e RUN_MODE=default -e RPC_PASSWORD=hunter2 lbry/lbrycrd:linux-x86_64-production
docker run --rm -it -v /path/to/lbrycrd.conf:/etc/lbry/lbrycrd.conf -e RUN_MODE=default -e RPC_PASSWORD=hunter2 lbry/lbrycrd:latest-release
```

2 changes: 1 addition & 1 deletion lbrycrd/compose/docker-compose.yml-regtest
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
lbrycrd:
build:
context: .
dockerfile: Dockerfile-linux-x86_64-production
dockerfile: Dockerfile
restart: always
ports:
- "11336:29246"
Expand Down
2 changes: 1 addition & 1 deletion lbrycrd/compose/docker-compose.yml-testnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
## Lbrycrd ##
#############
lbrycrd:
image: lbry/lbrycrd:linux-x86_64-production
image: lbry/lbrycrd:latest-release
restart: always
ports:
- "11336:9246"
Expand Down
4 changes: 3 additions & 1 deletion lbrycrd/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ fi

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

docker build -t "lbry/lbrycrd:${docker_tag}" -f Dockerfile-linux-x86_64-production "$DIR"
release_url=$(curl -s https://api.github.com/repos/lbryio/lbrycrd/releases | grep -F 'lbrycrd-linux' | grep download | head -n 1 | cut -d'"' -f4)

docker build --build-arg "release_url=$release_url" --tag "lbry/lbrycrd:${docker_tag}" -f Dockerfile "$DIR"
docker push "lbry/lbrycrd:${docker_tag}"
2 changes: 1 addition & 1 deletion lbrycrd/stuff/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function download_snapshot() {
local url="${SNAPSHOT_URL:-}" #off by default. latest snapshot at https://lbry.com/snapshot/blockchain
if [[ -n "$url" ]] && [[ ! -d ./.lbrycrd/blocks ]]; then
echo "Downloading blockchain snapshot from $url"
wget -O snapshot.tar.bz2 "$url"
wget --no-verbose -O snapshot.tar.bz2 "$url"
echo "Extracting snapshot..."
mkdir -p ./.lbrycrd
tar xvjf snapshot.tar.bz2 --directory ./.lbrycrd
Expand Down

0 comments on commit 1eddbd8

Please sign in to comment.