Skip to content

Commit

Permalink
fix for #59
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshin-samourai committed Aug 17, 2019
1 parent df25f46 commit 7d431ed
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docker/my-dojo/dojo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,30 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
source_file() {
if [ -f $1 ]; then
source $1
elif [ -f "$1.tpl" ]; then
source "$1.tpl"
else
echo "Unable to find file $1"
fi
}

# Source config files
source_file "$DIR/conf/docker-bitcoind.conf"
source_file "$DIR/conf/docker-common.conf"
source_file "$DIR/.env"

# Export some variables for compose
export BITCOIND_RPC_EXTERNAL_IP

# Select YAML files
select_yaml_files() {
source_file "$DIR/conf/docker-bitcoind.conf"

yamlFiles="-f $DIR/docker-compose.yaml"

if [ "$BITCOIND_INSTALL" == "on" ]; then
yamlFiles="$yamlFiles -f $DIR/overrides/bitcoind.install.yaml"

if [ "$BITCOIND_RPC_EXTERNAL" == "on" ]; then
yamlFiles="$yamlFiles -f $DIR/overrides/bitcoind.rpc.expose.yaml"
export BITCOIND_RPC_EXTERNAL_IP
fi
fi

Expand Down Expand Up @@ -151,6 +155,8 @@ upgrade() {
yamlFiles=$(select_yaml_files)
update_config_files
cleanup
source_file "$DIR/conf/docker-bitcoind.conf"
export BITCOIND_RPC_EXTERNAL_IP
eval "docker-compose $yamlFiles build --no-cache"
docker_up --remove-orphans
update_dojo_db
Expand Down

0 comments on commit 7d431ed

Please sign in to comment.