seednode: remove some files, add dockerfile and readme with instructions

This commit is contained in:
erciccione 2022-07-08 09:33:14 +02:00 committed by woodser
parent 1512ed9db3
commit 1498423b4e
10 changed files with 41 additions and 240 deletions

View file

@ -0,0 +1,29 @@
# docker run -it -p 9050 -p 2002 --restart-policy unless-stopped --name haveno-seednode haveno-seednode
# TODO: image very heavy, but it's hard to significantly reduce the size without bins
FROM openjdk:11
RUN set -ex && \
apt update && \
apt --no-install-recommends --yes install \
make \
git \
tor
RUN set -ex && adduser --system --group --disabled-password haveno && \
mkdir -p /home/haveno && \
chown -R haveno:haveno /home/haveno
USER haveno
WORKDIR /home/haveno
RUN set -ex && git clone https://github.com/haveno-dex/haveno.git && \
cd haveno && \
make skip-tests
WORKDIR /home/haveno/haveno
ENTRYPOINT [ "./haveno-seednode" ]
CMD ["--baseCurrencyNetwork=XMR_STAGENET", "--useLocalhostForP2P=false", "--useDevPrivilegeKeys=false", "--nodePort=2002", "--appName=haveno-XMR_STAGENET_Seed_2002" ]

View file

@ -1,21 +0,0 @@
# bisq-seednode docker
Both images use the same [startSeedNode.sh](startSeedNode.sh) script so inspect it to see what environment variables you can tweak.
## Production image
In order to build image:
docker build . -f docker/prod/Dockerfile -t bisq/seednode
Run:
docker run bisq/seednode
You might want to mount tor hidden service directory:
docker run -v /your/tor/dir:/root/.local/share/seednode/btc_mainnet/tor/hiddenservice/ bisq/seednode
## Development image
docker-compose build

View file

@ -1,18 +0,0 @@
###
# WARNING!!! THIS IMAGE IS FOR D E V E L O P M E N T USE ONLY!
###
FROM openjdk:8-jdk
RUN apt-get update && apt-get install -y --no-install-recommends \
openjfx && rm -rf /var/lib/apt/lists/*
WORKDIR /bisq-seednode
CMD ./docker/startSeedNode.sh
ENV APP_NAME=seednode
ENV NODE_PORT=8000
EXPOSE 8000
COPY . .

View file

@ -1,16 +0,0 @@
FROM openjdk:8-jdk
RUN apt-get update && apt-get install -y --no-install-recommends \
openjfx && rm -rf /var/lib/apt/lists/*
WORKDIR /bisq-seednode
CMD ./docker/startSeedNode.sh
ENV APP_NAME=seednode
ENV NODE_PORT=8000
EXPOSE 8000
COPY . .
RUN ./docker/setup.sh
ENV SKIP_BUILD=true

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
if [ "$SKIP_BUILD" != "true" ]; then
./gradlew build
fi

View file

@ -1,31 +0,0 @@
#!/bin/bash
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})
SETUP_SCRIPT=${SCRIPT_DIR}/setup.sh
source ${SETUP_SCRIPT}
ARGS=""
if [ ! -z "$BASE_CURRENCY_NETWORK" ]; then
ARGS="$ARGS --baseCurrencyNetwork=$BASE_CURRENCY_NETWORK"
fi
if [ ! -z "$MAX_CONNECTIONS" ]; then
ARGS="$ARGS --maxConnections=$MAX_CONNECTIONS"
fi
if [ ! -z "$NODE_PORT" ]; then
ARGS="$ARGS --nodePort=$NODE_PORT"
fi
if [ ! -z "$APP_NAME" ]; then
ARGS="$ARGS --appName=$APP_NAME"
fi
if [ ! -z "$SEED_NODES" ]; then
ARGS="$ARGS --seedNodes=$SEED_NODES"
fi
if [ ! -z "$BTC_NODES" ]; then
ARGS="$ARGS --btcNodes=$BTC_NODES"
fi
if [ ! -z "$USE_LOCALHOST_FOR_P2P" ]; then
ARGS="$ARGS --useLocalhostForP2P=$USE_LOCALHOST_FOR_P2P"
fi
JAVA_OPTS='-Xms1800m -Xmx1800m' ./build/app/bin/bisq-seednode $ARGS