1
0
mirror of https://github.com/bigchaindb/bigchaindb.git synced 2024-06-24 10:16:43 +02:00

Use env var to start or not, tendermint

This commit is contained in:
Sylvain Bellemare 2017-11-15 16:34:21 +01:00
parent 6db3390b95
commit a19361cede
2 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import logging
import subprocess
import multiprocessing as mp
from os import getenv
import bigchaindb
from bigchaindb.tendermint.lib import BigchainDB
@ -36,7 +37,12 @@ def start():
# start message
logger.info(BANNER.format(bigchaindb.config['server']['bind']))
subprocess.Popen(['tendermint', 'node', '--consensus.create_empty_blocks=false'])
if int(getenv('BIGCHAINDB_START_TENDERMINT', 1)):
subprocess.Popen([
'tendermint',
'node',
'--consensus.create_empty_blocks=false',
])
# We need to import this after spawning the web server
# because import ABCIServer will monkeypatch all sockets

View File

@ -24,6 +24,7 @@ services:
BIGCHAINDB_DATABASE_PORT: 27017
BIGCHAINDB_SERVER_BIND: 0.0.0.0:9984
BIGCHAINDB_WSSERVER_HOST: 0.0.0.0
BIGCHAINDB_START_TENDERMINT: 0
TENDERMINT_HOST: tendermint
TENDERMINT_PORT: 46657
ports: