From 2334483df864c173f19bc0123981b72a23330be8 Mon Sep 17 00:00:00 2001 From: Roman <11405694+rnovosad@users.noreply.github.com> Date: Thu, 16 Sep 2021 19:25:02 +0300 Subject: [PATCH 1/2] [Improvement] Modify networking + Add collator service Added `network_mode: host` mode to the services for better interaction. Added collator service into the list. --- scripts/vault/docker-compose.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/scripts/vault/docker-compose.yml b/scripts/vault/docker-compose.yml index 56702833..8ec1a657 100644 --- a/scripts/vault/docker-compose.yml +++ b/scripts/vault/docker-compose.yml @@ -1,7 +1,8 @@ version: "3.8" services: bitcoind: - image: "ruimarinho/bitcoin-core:0.20" + image: "ruimarinho/bitcoin-core:0.21" + network_mode: host command: - -testnet - -server @@ -13,17 +14,17 @@ services: - -rpcuser=rpcuser - -rpcpassword=rpcpassword - -fallbackfee=0.0002 - ports: - - "18332:18332" volumes: - ./cache:/home/bitcoin/.bitcoin/testnet3 restart: unless-stopped vault: image: "interlayhq/interbtc-clients:vault-0-8-2" + network_mode: host command: - vault + - --no-bitcoin-block-relay - --bitcoin-rpc-url - - "http://bitcoind:18332" + - "http://localhost:18332" - --bitcoin-rpc-user - rpcuser - --bitcoin-rpc-pass @@ -39,7 +40,9 @@ services: - --telemetry-url - "https://api.interlay.io/telemetry" - --btc-parachain-url - - "wss://api.interlay.io/parachain" +# "--btc-parachain-url" can be set to '- "ws://localhost:9944"' to repoint vault for accessing parachain through collator service + - "https://api.interlay.io/parachain" + - --no-api environment: RUST_LOG: info volumes: @@ -47,3 +50,18 @@ services: source: ./keyfile.json target: /keyfile.json restart: unless-stopped + collator: + image: "interlayhq/interbtc:interbtc-standalone-0.8.5" + network_mode: host + command: + - interbtc-standalone + - --base-path=/interbtc + - --chain=/interbtc/testnet.json + - --unsafe-ws-external + - --rpc-methods=Unsafe + - --rpc-cors=all + environment: + RUST_LOG: info + volumes: + - ./interbtc:/interbtc + restart: unless-stopped From 06140e97ed1528fa31078bbce80129c7c7308ba6 Mon Sep 17 00:00:00 2001 From: Roman Novosad Date: Mon, 20 Sep 2021 14:34:38 +0300 Subject: [PATCH 2/2] Create docker-compose file specifically for CentOS --- scripts/vault/docker-compose.centos.yml | 67 +++++++++++++++++++++++++ scripts/vault/docker-compose.yml | 9 ++-- 2 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 scripts/vault/docker-compose.centos.yml diff --git a/scripts/vault/docker-compose.centos.yml b/scripts/vault/docker-compose.centos.yml new file mode 100644 index 00000000..debf8c56 --- /dev/null +++ b/scripts/vault/docker-compose.centos.yml @@ -0,0 +1,67 @@ +version: "3.8" +services: + bitcoind: + image: "ruimarinho/bitcoin-core:0.21" + network_mode: host + command: + - -testnet + - -server + - -par=1 + - -maxuploadtarget=200 + - -blocksonly + - -rpcbind=0.0.0.0 + - -rpcallowip=0.0.0.0/0 + - -rpcuser=rpcuser + - -rpcpassword=rpcpassword + - -fallbackfee=0.0002 + volumes: + - ./cache:/home/bitcoin/.bitcoin/testnet3 + restart: unless-stopped + vault: + image: "interlayhq/interbtc-clients:vault-0-8-2" + network_mode: host + command: + - vault + - --no-bitcoin-block-relay + - --bitcoin-rpc-url + - "http://localhost:18332" + - --bitcoin-rpc-user + - rpcuser + - --bitcoin-rpc-pass + - rpcpassword + - --network + - testnet + - --keyfile + - /keyfile.json + - --keyname + - interbtcvault + - --auto-register-with-faucet-url + - "https://api.interlay.io/faucet" + - --telemetry-url + - "https://api.interlay.io/telemetry" + - --btc-parachain-url +# "--btc-parachain-url" can be set to '- "ws://localhost:9944"' to repoint vault for accessing parachain through collator service + - "wss://api.interlay.io/parachain" + - --no-api + environment: + RUST_LOG: info + volumes: + - type: bind + source: ./keyfile.json + target: /keyfile.json + restart: unless-stopped + collator: + image: "interlayhq/interbtc:interbtc-standalone-0.8.5" + network_mode: host + command: + - interbtc-standalone + - --base-path=/interbtc + - --chain=/interbtc/testnet.json + - --unsafe-ws-external + - --rpc-methods=Unsafe + - --rpc-cors=all + environment: + RUST_LOG: info + volumes: + - ./interbtc:/interbtc + restart: unless-stopped diff --git a/scripts/vault/docker-compose.yml b/scripts/vault/docker-compose.yml index 8ec1a657..42c43cac 100644 --- a/scripts/vault/docker-compose.yml +++ b/scripts/vault/docker-compose.yml @@ -2,7 +2,6 @@ version: "3.8" services: bitcoind: image: "ruimarinho/bitcoin-core:0.21" - network_mode: host command: - -testnet - -server @@ -14,17 +13,18 @@ services: - -rpcuser=rpcuser - -rpcpassword=rpcpassword - -fallbackfee=0.0002 + ports: + - "18332:18332" volumes: - ./cache:/home/bitcoin/.bitcoin/testnet3 restart: unless-stopped vault: image: "interlayhq/interbtc-clients:vault-0-8-2" - network_mode: host command: - vault - --no-bitcoin-block-relay - --bitcoin-rpc-url - - "http://localhost:18332" + - "http://bitcoind:18332" - --bitcoin-rpc-user - rpcuser - --bitcoin-rpc-pass @@ -41,7 +41,7 @@ services: - "https://api.interlay.io/telemetry" - --btc-parachain-url # "--btc-parachain-url" can be set to '- "ws://localhost:9944"' to repoint vault for accessing parachain through collator service - - "https://api.interlay.io/parachain" + - "wss://api.interlay.io/parachain" - --no-api environment: RUST_LOG: info @@ -52,7 +52,6 @@ services: restart: unless-stopped collator: image: "interlayhq/interbtc:interbtc-standalone-0.8.5" - network_mode: host command: - interbtc-standalone - --base-path=/interbtc