[bisq-network/bisq-pricenode] Docker files for starting a pricenode (#12)

Chris Beams notifications at github.com
Wed Jun 13 11:24:41 UTC 2018


cbeams approved this pull request.

utACK, but with a few things that would still be good to fix up.

I've added a link from the main README to the Docker README so it's a bit more discoverable.

I've added a couple nits inline, fix them if you have a chance. The naming stuff would be good to get right in any case. The looping / restarting stuff I'll leave to you.

I'll merge this soon in any case. Thanks.

> @@ -0,0 +1,27 @@
+###
+# The directory of the Dockerfile should contain your 'hostname' and 'private_key' files.
+# In the docker-compose.yml file you can pass the ONION_ADDRESS referenced below.
+###
+
+# pull base image
+FROM openjdk:8-jdk
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+    vim \
+    tor \
+    fakeroot \
+    sudo \
+    gradle \

Nit: It's not necessary to install `gradle` given that everything is done with the `./gradlew` wrapper script below. This is basically just a waste of time.

> @@ -0,0 +1,43 @@
+Needed information to start a priceprovider

Nit: It would be good to use the name "pricenode" consistently now. "provider" language still exists on the core / desktop side, but everywhere here in bisq-pricenode land it's "pricenode" now. 

> @@ -0,0 +1,192 @@
+## Configuration file for a typical Tor user
+## Last updated 9 October 2013 for Tor 0.2.5.2-alpha.
+## (may or may not work for much older or much newer versions of Tor.)
+##
+## Lines that begin with "## " try to explain what's going on. Lines
+## that begin with just "#" are disabled commands: you can enable them
+## by removing the "#" symbol.
+##
+## See 'man tor', or https://www.torproject.org/docs/tor-manual.html,
+## for more options you can use in this file.
+##
+## Tor will look for this file in various places based on your platform:
+## https://www.torproject.org/docs/faq#torrc

I'd prefer a minimal `torrc` with all the boilerplate comments, etc stripped out. See the top-level `torrc` in this repo for an example.

> @@ -0,0 +1,8 @@
+#!/bin/bash
+while true
+do
+echo `date`  "(Re)-starting node"
+BITCOIN_AVG_PUBKEY=$BTCAVERAGE_PUBKEY BITCOIN_AVG_PRIVKEY=$BTCAVERAGE_PRIVKEY java -jar ./build/libs/bisq-pricenode.jar 1 2 2
+echo `date` "node terminated unexpectedly!!"
+sleep 3
+done

I'm not sure what led to the need to restart price providers in the past, but this is a completely re-written app, where instances have been quite stable in production. I'm not sure we need this kind of loop script at all, and if we do, I'd like to know about it and actually root out the problem rather than just reboot stuff every so often. I won't push too hard on this, but I'd rather keep things as simple as possible for a start. Feels like we're just copying and pasting what we did prior to the rewrite here, and it's not obvious to me that we need to.

> @@ -0,0 +1,21 @@
+version: '3'
+
+# Fill in your own BTCAVERAGE public and private keys
+
+services:
+    priceprovider:
+        restart: always
+        build:
+            context: .
+        image: bisq:priceprovider

Same thing here with naming, not sure about conventions in Docker image naming. Can this be `bisq:pricenode` instead?

-- 
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-pricenode/pull/12#pullrequestreview-128329787
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20180613/9d9c62c6/attachment.html>


More information about the bisq-github mailing list