diff --git a/bigchaindb/tendermint/event_stream.py b/bigchaindb/tendermint/event_stream.py index 7398e86f..765fb190 100644 --- a/bigchaindb/tendermint/event_stream.py +++ b/bigchaindb/tendermint/event_stream.py @@ -2,6 +2,7 @@ import asyncio import json import logging import time +from os import getenv import aiohttp @@ -10,8 +11,8 @@ from bigchaindb.events import EventTypes, Event from bigchaindb.tendermint.utils import decode_transaction_base64 -HOST = 'localhost' -PORT = 46657 +HOST = getenv('TENDERMINT_HOST', 'localhost') +PORT = int(getenv('TENDERMINT_PORT', 46657)) URL = f'ws://{HOST}:{PORT}/websocket' logger = logging.getLogger(__name__)