[bisq-network/bisq] [WIP] Docker containers for a DAO seednode (#3095)

Jelle Besseling notifications at github.com
Sat Aug 1 14:43:08 UTC 2020


@pingiun commented on this pull request.



> @@ -28,4 +54,14 @@ 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
+while true
+do
+
+    echo `date` "(Re)-starting node"
+
+    JAVA_OPTS='-Xms8192M -Xmx8192M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6969 -Dcom.sun.management.jmxremote.rmi.port=6969 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false' ./bin/bisq-seednode $ARGS 2>./error.log

I don't think jmx should be enabled by default

> @@ -28,4 +54,14 @@ 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
+while true

Restarting shouldn't be builtin to the container, the docker itself can be restarted if needed

> @@ -0,0 +1 @@
+/usr/lib/jvm/java-11-openjdk-amd64/lib/server

What is this used for?

> @@ -0,0 +1,7 @@
+FROM ruimarinho/bitcoin-core:0.18

I think we should prefer building the bitcoin node in the bisq source tree. It's pretty easy to make a Dockerfile for bitcoind, so this dependency is unnecessary

> -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
+# first the builder builds the executables
+###
+FROM gradle:jdk11 as builder
+ARG SEEDNODE_URL
+ARG SEEDNODE_BRANCH
+RUN git clone $SEEDNODE_URL

This is already in the same repository as the seednode code, we can use local data instead of fetching it from github

> @@ -5,7 +5,7 @@ docs/
 .travis.yml
 docker-compose.yml
 docker/development/
-docker/prod/
+#docker/prod/

I think this line and docker/development can be removed?

> @@ -28,4 +54,14 @@ 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
+while true

Instead of restarting for when bitcoind has not started yet, detect whether bitcoind has started and sleep when not

> +                    Attribute "Usage"
+                  </Value>
+                </MBean>
+
+	        <Connection>
+	        	ServiceURL "service:jmx:rmi:///jndi/rmi://172.28.1.3:6969/jmxrmi"
+	        	Collect "memory_pool"
+	        	Collect "memory"
+	        </Connection>
+
+		# See /usr/share/doc/collectd/examples/GenericJMX.conf
+		# for an example config.
+	</Plugin>
+</Plugin>
+
+#<Plugin load>

Don't comment out lines, remove them

>          volumes:
-          - m2:/root/.m2
+            - ./docker/prod/blocknotify:/home/bitcoin/.bitcoin/blocknotify
+            - ${BTC_DATA_DIR}:/home/bitcoin/.bitcoin/
+        networks:
+            bisq_net:
+                ipv4_address: 172.28.1.2
+
+    nginx:

Why is the nginx container necessary?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3095#pullrequestreview-459581925
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200801/0ee8c987/attachment.html>


More information about the bisq-github mailing list