aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/mongo_db_schema_creation.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/mongo_db_schema_creation.py b/config/mongo_db_schema_creation.py
index 3e79805..dda1e2a 100644
--- a/config/mongo_db_schema_creation.py
+++ b/config/mongo_db_schema_creation.py
@@ -18,6 +18,7 @@
from pymongo import MongoClient
import argparse
+import os
parser = argparse.ArgumentParser(description='Script creates configuration in pnf simulator mongodb if it doesn\'t exists.')
args = parser.parse_args()
@@ -37,7 +38,7 @@ def init_mongo_db(client, col_list):
if __name__ == "__main__":
- client = MongoClient(host='mongo',
+ client = MongoClient(host=os.getenv('MONGO_HOSTNAME', 'mongo'),
port=27017,
username='root',
password=MONGO_DB_PASSWORD,