mirror of
https://github.com/LBRYFoundation/hub.git
synced 2025-08-23 09:27:23 +00:00
Merge pull request #1 from LBRYFoundation/Update-Snapshot-to-zstd
Update snapshot to zstd
This commit is contained in:
commit
0cbd81c676
2 changed files with 4 additions and 2 deletions
|
@ -20,7 +20,8 @@ RUN apt-get update && \
|
||||||
python3.9 \
|
python3.9 \
|
||||||
python3.9-dev \
|
python3.9-dev \
|
||||||
python3-cffi \
|
python3-cffi \
|
||||||
python3-pip && \
|
python3-pip
|
||||||
|
zstd && \
|
||||||
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
|
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@ SNAPSHOT_URL="${SNAPSHOT_URL:-}" #off by default. latest snapshot at https://lbr
|
||||||
if [[ "$HUB_COMMAND" == "scribe" ]] && [[ -n "$SNAPSHOT_URL" ]] && [[ ! -d /database/lbry-rocksdb ]]; then
|
if [[ "$HUB_COMMAND" == "scribe" ]] && [[ -n "$SNAPSHOT_URL" ]] && [[ ! -d /database/lbry-rocksdb ]]; then
|
||||||
files="$(ls)"
|
files="$(ls)"
|
||||||
echo "Downloading and extracting hub snapshot from $SNAPSHOT_URL"
|
echo "Downloading and extracting hub snapshot from $SNAPSHOT_URL"
|
||||||
wget --no-verbose -c "$SNAPSHOT_URL" -O - | tar --use-compress-program=unzstd x -C /database
|
#wget --no-verbose -c "$SNAPSHOT_URL" -O - | tar x -C /database
|
||||||
|
curl "$SNAPSHOT_URL" | zstd -d | tar xf - -C /database
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$HUB_COMMAND" ]; then
|
if [ -z "$HUB_COMMAND" ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue