diff --git a/README.MD b/README.MD index dcafaf6..31f78d2 100644 --- a/README.MD +++ b/README.MD @@ -56,7 +56,7 @@ docker pull daocloud.io/0xbug/hawkeye git clone https://github.com/0xbug/Hawkeye.git --depth 1 cd Hawkeye docker build -t hawkeye . -docker run -ti -p 80:80 -e MONGODB_URI=mongodb://username:password@ip:27017/hawkeye -e MONGODB_USER= -e MONGODB_PASSWORD= -d hawkeye ## mongodb 需认证 +docker run -ti -p 80:80 -e MONGODB_URI=mongodb://username:password@ip:27017/ -d hawkeye ## mongodb 需认证 docker run -ti -p 80:80 -e MONGODB_URI=mongodb://ip:27017 -d hawkeye ## mongodb 无认证 ``` diff --git a/server/config/database.py b/server/config/database.py index 109ccd0..463cb6c 100644 --- a/server/config/database.py +++ b/server/config/database.py @@ -10,11 +10,6 @@ client = MongoClient(MONGODB_URI, connect=False) db = client.get_database('hawkeye') -if os.environ.get('MONGODB_USER'): - MONGODB_USER = os.environ.get('MONGODB_USER') - MONGODB_PASSWORD = os.environ.get('MONGODB_PASSWORD') - db.authenticate(MONGODB_USER, MONGODB_PASSWORD) - result_col = db.get_collection('result') query_col = db.get_collection('query') blacklist_col = db.get_collection('blacklist')