mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-06-28 08:37:45 +02:00
Use env var to start or not, tendermint
This commit is contained in:
parent
6db3390b95
commit
a19361cede
|
@ -1,6 +1,7 @@
|
||||||
import logging
|
import logging
|
||||||
import subprocess
|
import subprocess
|
||||||
import multiprocessing as mp
|
import multiprocessing as mp
|
||||||
|
from os import getenv
|
||||||
|
|
||||||
import bigchaindb
|
import bigchaindb
|
||||||
from bigchaindb.tendermint.lib import BigchainDB
|
from bigchaindb.tendermint.lib import BigchainDB
|
||||||
|
@ -36,7 +37,12 @@ def start():
|
||||||
# start message
|
# start message
|
||||||
logger.info(BANNER.format(bigchaindb.config['server']['bind']))
|
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
|
# We need to import this after spawning the web server
|
||||||
# because import ABCIServer will monkeypatch all sockets
|
# because import ABCIServer will monkeypatch all sockets
|
||||||
|
|
|
@ -24,6 +24,7 @@ services:
|
||||||
BIGCHAINDB_DATABASE_PORT: 27017
|
BIGCHAINDB_DATABASE_PORT: 27017
|
||||||
BIGCHAINDB_SERVER_BIND: 0.0.0.0:9984
|
BIGCHAINDB_SERVER_BIND: 0.0.0.0:9984
|
||||||
BIGCHAINDB_WSSERVER_HOST: 0.0.0.0
|
BIGCHAINDB_WSSERVER_HOST: 0.0.0.0
|
||||||
|
BIGCHAINDB_START_TENDERMINT: 0
|
||||||
TENDERMINT_HOST: tendermint
|
TENDERMINT_HOST: tendermint
|
||||||
TENDERMINT_PORT: 46657
|
TENDERMINT_PORT: 46657
|
||||||
ports:
|
ports:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user