Parameterize db host config via env var

This commit is contained in:
Sylvain Bellemare 2016-05-13 16:21:33 +02:00
parent 3989346044
commit a05c688682

View File

@ -1,4 +1,5 @@
import copy
import os
# from functools import reduce
# PORT_NUMBER = reduce(lambda x, y: x * y, map(ord, 'BigchainDB')) % 2**16
@ -14,7 +15,7 @@ config = {
'threads': None, # if none, the value will be cpu_count * 2 + 1
},
'database': {
'host': 'localhost',
'host': os.environ.get('BIGCHAINDB_DATABASE_HOST', 'localhost'),
'port': 28015,
'name': 'bigchain',
},