mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
add auth to mongodb connection
This commit is contained in:
@@ -30,13 +30,13 @@ ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
|
||||
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
|
||||
|
||||
# install frontend
|
||||
RUN npm install -g yarn --registry=https://registry.npm.taobao.org \
|
||||
RUN npm install -g yarn \
|
||||
&& cd /opt/crawlab/frontend \
|
||||
&& yarn install --registry=https://registry.npm.taobao.org
|
||||
&& yarn install
|
||||
|
||||
# install backend
|
||||
RUN pip install -U setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple \
|
||||
&& pip install -r /opt/crawlab/crawlab/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
RUN pip install -U setuptools \
|
||||
&& pip install -r /opt/crawlab/crawlab/requirements.txt
|
||||
|
||||
# start backend
|
||||
EXPOSE 8080
|
||||
|
||||
@@ -25,7 +25,10 @@ MONGO_DB = 'crawlab_test'
|
||||
BROKER_URL = 'redis://127.0.0.1:6379/0'
|
||||
|
||||
# Celery后台URL
|
||||
CELERY_RESULT_BACKEND = 'mongodb://127.0.0.1:27017/'
|
||||
if MONGO_USERNAME is not None:
|
||||
CELERY_RESULT_BACKEND = f'mongodb://{MONGO_USERNAME}:{MONGO_PASSWORD}@{MONGO_HOST}:{MONGO_PORT}/'
|
||||
else:
|
||||
CELERY_RESULT_BACKEND = f'mongodb://{MONGO_HOST}:{MONGO_PORT}/'
|
||||
|
||||
# Celery MongoDB设置
|
||||
CELERY_MONGODB_BACKEND_SETTINGS = {
|
||||
@@ -42,7 +45,6 @@ CELERY_ENABLE_UTC = True
|
||||
# flower variables
|
||||
FLOWER_API_ENDPOINT = 'http://localhost:5555/api'
|
||||
|
||||
|
||||
# Flask 变量
|
||||
DEBUG = False
|
||||
FLASK_HOST = '0.0.0.0'
|
||||
|
||||
Reference in New Issue
Block a user