From 21b23fe865a84a5f3a6920692b70c6d3490b3bd6 Mon Sep 17 00:00:00 2001 From: tecnovert Date: Thu, 18 Jul 2019 20:30:12 +0200 Subject: [PATCH] Add example config files for docker. --- Dockerfile | 3 -- docker/.env | 1 + docker/coindata/.gitignore | 4 --- docker/coindata/basicswap/basicswap.json | 38 ++++++++++++++++++++++++ docker/coindata/litecoin/litecoin.conf | 3 ++ docker/coindata/particl/particl.conf | 16 ++++++++++ docker/docker-compose.yml | 2 +- docker/dockerbuild.bat | 2 ++ docker/dockerup.bat | 2 ++ 9 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 docker/.env create mode 100644 docker/coindata/basicswap/basicswap.json create mode 100644 docker/coindata/litecoin/litecoin.conf create mode 100644 docker/coindata/particl/particl.conf create mode 100755 docker/dockerbuild.bat create mode 100755 docker/dockerup.bat diff --git a/Dockerfile b/Dockerfile index eebc4ff..302000d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,9 +21,6 @@ RUN PARTICL_VERSION=0.18.0.12 PARTICL_VERSION_TAG= PARTICL_ARCH=x86_64-linux-gnu tar -xvf litecoin-0.17.1-x86_64-linux-gnu.tar.gz -C ${LITECOIN_BINDIR} --strip-components 2 litecoin-0.17.1/bin/litecoind litecoin-0.17.1/bin/litecoin-cli # TODO: move coindata dir out of src dir -#COPY . /opt/basicswap -#RUN ls /opt/basicswap; \ -# cd /opt/basicswap; \ RUN wget -O bs.zip https://github.com/tecnovert/basicswap/archive/master.zip; \ unzip bs.zip; \ cd basicswap-master; \ diff --git a/docker/.env b/docker/.env new file mode 100644 index 0000000..c0edf6b --- /dev/null +++ b/docker/.env @@ -0,0 +1 @@ +HTML_PORT=127.0.0.1:12700:12700 \ No newline at end of file diff --git a/docker/coindata/.gitignore b/docker/coindata/.gitignore index 3ac4a36..72e8ffc 100644 --- a/docker/coindata/.gitignore +++ b/docker/coindata/.gitignore @@ -1,5 +1 @@ * -!.gitignore -!basicswap/basicswap.json -!particl/particl.conf -!litecoin/litecoin.conf diff --git a/docker/coindata/basicswap/basicswap.json b/docker/coindata/basicswap/basicswap.json new file mode 100644 index 0000000..f32d104 --- /dev/null +++ b/docker/coindata/basicswap/basicswap.json @@ -0,0 +1,38 @@ +{ + "zmqhost": "tcp://127.0.0.1", + "zmqport": 20792, + "htmlhost": "localhost", + "htmlport": 12700, + "network_key": "7sW2UEcHXvuqEjkpE5mD584zRaQYs6WXYohue4jLFZPTvMSxwvgs", + "network_pubkey": "035758c4a22d7dd59165db02a56156e790224361eb3191f02197addcb3bde903d2", + "chainclients": { + "particl": { + "connection_type": "rpc", + "manage_daemon": true, + "rpcport": 19792, + "datadir": "/coindata/particl", + "bindir": "/opt/particl", + "blocks_confirmed": 2 + }, + "litecoin": { + "connection_type": "rpc", + "manage_daemon": true, + "rpcport": 19795, + "datadir": "/coindata/litecoin", + "bindir": "/opt/litecoin", + "use_segwit": true, + "blocks_confirmed": 2 + }, + "bitcoin": { + "connection_type": "none", + "manage_daemon": false, + "rpcport": 19796, + "datadir": "/coindata/bitcoin", + "bindir": "/opt/bitcoin", + "use_segwit": true + } + }, + "check_progress_seconds": 60, + "check_watched_seconds": 60, + "check_expired_seconds": 60 +} diff --git a/docker/coindata/litecoin/litecoin.conf b/docker/coindata/litecoin/litecoin.conf new file mode 100644 index 0000000..9c2375c --- /dev/null +++ b/docker/coindata/litecoin/litecoin.conf @@ -0,0 +1,3 @@ +prune=1000 +rpcport=19795 +printtoconsole=0 diff --git a/docker/coindata/particl/particl.conf b/docker/coindata/particl/particl.conf new file mode 100644 index 0000000..ad4451f --- /dev/null +++ b/docker/coindata/particl/particl.conf @@ -0,0 +1,16 @@ + +[main] +port=14792 +rpcport=19792 +daemon=0 +printtoconsole=0 +server=1 +#debug=1 +debugexclude=libevent +zmqpubsmsg=tcp://127.0.0.1:20792 +acceptnonstdtxn=0 +spentindex=1 +txindex=1 + +# Load a random initial wallet master key +createdefaultmasterkey=1 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 9b490c7..7a86ab7 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -7,7 +7,7 @@ services: volumes: - ./coindata:/coindata ports: - - "127.0.0.1:12700:12700" # Expose only to localhost + - "${HTML_PORT}" # Expose only to localhost, see .env volumes: coindata: diff --git a/docker/dockerbuild.bat b/docker/dockerbuild.bat new file mode 100755 index 0000000..af625ea --- /dev/null +++ b/docker/dockerbuild.bat @@ -0,0 +1,2 @@ +set HTML_PORT=12700:12700 +docker-compose build \ No newline at end of file diff --git a/docker/dockerup.bat b/docker/dockerup.bat new file mode 100755 index 0000000..7aea0e7 --- /dev/null +++ b/docker/dockerup.bat @@ -0,0 +1,2 @@ +set HTML_PORT=12700:12700 +docker-compose up \ No newline at end of file