forked from LBRYCommunity/lbry-sdk
cleanup
This commit is contained in:
parent
a012c04974
commit
baf384d6e0
4 changed files with 0 additions and 120 deletions
|
@ -1,52 +0,0 @@
|
||||||
FROM ubuntu:19.10
|
|
||||||
|
|
||||||
ARG user=lbry
|
|
||||||
ARG db_dir=/database
|
|
||||||
ARG projects_dir=/home/$user
|
|
||||||
|
|
||||||
ARG DOCKER_TAG
|
|
||||||
ARG DOCKER_COMMIT=docker
|
|
||||||
ENV DOCKER_TAG=$DOCKER_TAG DOCKER_COMMIT=$DOCKER_COMMIT
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get -y --no-install-recommends install \
|
|
||||||
wget \
|
|
||||||
tar unzip \
|
|
||||||
build-essential \
|
|
||||||
python3 \
|
|
||||||
python3-dev \
|
|
||||||
python3-pip \
|
|
||||||
python3-wheel \
|
|
||||||
python3-setuptools && \
|
|
||||||
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user
|
|
||||||
RUN mkdir -p $db_dir
|
|
||||||
RUN chown -R $user:$user $db_dir
|
|
||||||
|
|
||||||
COPY . $projects_dir
|
|
||||||
RUN chown -R $user:$user $projects_dir
|
|
||||||
|
|
||||||
USER $user
|
|
||||||
WORKDIR $projects_dir
|
|
||||||
|
|
||||||
RUN pip install uvloop
|
|
||||||
RUN make install
|
|
||||||
RUN python3 docker/set_build.py
|
|
||||||
RUN rm ~/.cache -rf
|
|
||||||
|
|
||||||
# entry point
|
|
||||||
ARG host=0.0.0.0
|
|
||||||
ARG tcp_port=50001
|
|
||||||
ARG daemon_url=http://lbry:lbry@localhost:9245/
|
|
||||||
VOLUME $db_dir
|
|
||||||
ENV TCP_PORT=$tcp_port
|
|
||||||
ENV HOST=$host
|
|
||||||
ENV DAEMON_URL=$daemon_url
|
|
||||||
ENV DB_DIRECTORY=$db_dir
|
|
||||||
ENV MAX_SESSIONS=1000000000
|
|
||||||
ENV MAX_SEND=1000000000000000000
|
|
||||||
ENV EVENT_LOOP_POLICY=uvloop
|
|
||||||
COPY ./docker/wallet_server_entrypoint.sh /entrypoint.sh
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
@ -1,34 +0,0 @@
|
||||||
version: "3"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
lbrycrd:
|
|
||||||
wallet_server:
|
|
||||||
|
|
||||||
services:
|
|
||||||
lbrycrd:
|
|
||||||
image: lbry/lbrycrd:${LBRYCRD_TAG:-latest-release}
|
|
||||||
restart: always
|
|
||||||
ports: # accessible from host
|
|
||||||
- "9246:9246" # rpc port
|
|
||||||
expose: # internal to docker network. also this doesn't do anything. its for documentation only.
|
|
||||||
- "9245" # node-to-node comms port
|
|
||||||
volumes:
|
|
||||||
- "lbrycrd:/data/.lbrycrd"
|
|
||||||
environment:
|
|
||||||
- RUN_MODE=default
|
|
||||||
- SNAPSHOT_URL=${LBRYCRD_SNAPSHOT_URL-https://lbry.com/snapshot/blockchain}
|
|
||||||
- RPC_ALLOW_IP=0.0.0.0/0
|
|
||||||
wallet_server:
|
|
||||||
image: lbry/wallet-server:${WALLET_SERVER_TAG:-latest-release}
|
|
||||||
depends_on:
|
|
||||||
- lbrycrd
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- "50001:50001" # rpc port
|
|
||||||
- "50005:50005" # websocket port
|
|
||||||
#- "2112:2112" # uncomment to enable prometheus
|
|
||||||
volumes:
|
|
||||||
- "wallet_server:/database"
|
|
||||||
environment:
|
|
||||||
- SNAPSHOT_URL=${WALLET_SERVER_SNAPSHOT_URL-https://lbry.com/snapshot/wallet}
|
|
||||||
- DAEMON_URL=http://lbry:lbry@lbrycrd:9245
|
|
|
@ -1,11 +0,0 @@
|
||||||
# requires powershell and .NET 4+. see https://chocolatey.org/install for more info.
|
|
||||||
|
|
||||||
$chocoVersion = powershell choco -v
|
|
||||||
if(-not($chocoVersion)){
|
|
||||||
Write-Output "Chocolatey is not installed, installing now"
|
|
||||||
Write-Output "IF YOU KEEP GETTING THIS MESSAGE ON EVERY BUILD, TRY RESTARTING THE GITLAB RUNNER SO IT GETS CHOCO INTO IT'S ENV"
|
|
||||||
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Write-Output "Chocolatey version $chocoVersion is already installed"
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# entrypoint for wallet server Docker image
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
SNAPSHOT_URL="${SNAPSHOT_URL:-}" #off by default. latest snapshot at https://lbry.com/snapshot/wallet
|
|
||||||
|
|
||||||
if [[ -n "$SNAPSHOT_URL" ]] && [[ ! -f /database/claims.db ]]; then
|
|
||||||
files="$(ls)"
|
|
||||||
echo "Downloading wallet snapshot from $SNAPSHOT_URL"
|
|
||||||
wget --no-verbose --trust-server-names --content-disposition "$SNAPSHOT_URL"
|
|
||||||
echo "Extracting snapshot..."
|
|
||||||
filename="$(grep -vf <(echo "$files") <(ls))" # finds the file that was not there before
|
|
||||||
case "$filename" in
|
|
||||||
*.tgz|*.tar.gz|*.tar.bz2 ) tar xvf "$filename" --directory /database ;;
|
|
||||||
*.zip ) unzip "$filename" -d /database ;;
|
|
||||||
* ) echo "Don't know how to extract ${filename}. SNAPSHOT COULD NOT BE LOADED" && exit 1 ;;
|
|
||||||
esac
|
|
||||||
rm "$filename"
|
|
||||||
fi
|
|
||||||
|
|
||||||
/home/lbry/.local/bin/torba-server "$@"
|
|
Loading…
Reference in a new issue