Browse Source

add config option for ip address of whirlpool rpc api

use-env-var-docker
kenshin-samourai 5 years ago
parent
commit
61c97de9a5
  1. 8
      docker/my-dojo/conf/docker-whirlpool.conf.tpl
  2. 5
      docker/my-dojo/dojo.sh
  3. 2
      docker/my-dojo/overrides/whirlpool.install.yaml

8
docker/my-dojo/conf/docker-whirlpool.conf.tpl

@ -6,3 +6,11 @@
# Value: on | off
WHIRLPOOL_INSTALL=off
# IP address used to expose the RPC API of whirlpool-cli to external apps
# Warning: Do not expose your RPC API to internet!
# Recommended value:
# if whirlpool-gui runs on the machine hosting dojo: 172.30.1.8 (default)
# otherwise: IP address on the LAN of the machine running dojo
# Type: string
WHIRLPOOL_RPC_EXTERNAL_IP=172.30.1.8

5
docker/my-dojo/dojo.sh

@ -23,6 +23,7 @@ source_file "$DIR/.env"
# Export some variables for compose
export BITCOIND_RPC_EXTERNAL_IP
export WHIRLPOOL_RPC_EXTERNAL_IP
# Select YAML files
select_yaml_files() {
@ -314,6 +315,10 @@ upgrade() {
# Load env vars for compose files
source_file "$DIR/conf/docker-bitcoind.conf"
export BITCOIND_RPC_EXTERNAL_IP
if [ "$WHIRLPOOL_INSTALL" == "on" ]; then
source_file "$DIR/conf/docker-whirlpool.conf"
export WHIRLPOOL_RPC_EXTERNAL_IP
fi
# Rebuild the images (with or without cache)
if [ $noCache -eq 0 ]; then
eval "docker-compose $yamlFiles build --no-cache"

2
docker/my-dojo/overrides/whirlpool.install.yaml

@ -15,6 +15,8 @@ services:
command: "/wait-for-it.sh nginx:80 --timeout=720 --strict -- /restart.sh"
expose:
- "8899"
ports:
- "${WHIRLPOOL_RPC_EXTERNAL_IP}:8899:8899"
volumes:
- data-whirlpool:/home/whirlpool
depends_on:

Loading…
Cancel
Save