DOCKER_HOST_IP=$(route -n | awk '/UG[ \t]/{print $2}')

#use the correct mysql instance
if [ -z $MYSQL_PORT ]; then
    MYSQL_PORT=$DOCKER_HOST_IP:3306
fi
find $DOCKER_DIR/*/config/*.json -type f -exec sed -i "s/%%MYSQL%%/$MYSQL_PORT/g" {} \;
