Skip to content

Commit

Permalink
修改配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
scydeai committed Dec 2, 2019
1 parent c2c03a7 commit 7006484
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
7 changes: 4 additions & 3 deletions api/fit2ansible/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
PACKAGE_IMAGE_NAME = 'registry.fit2cloud.com/public/nexus-helm:3.15.2-01'
PACKAGE_PATH_PREFIX = "/opt/kubeoperator/data/packages/"
PACKAGE_DIR = "/data/packages"
ELASTICSEARCH_HOST = "elasticsearch"

CONFIG = load_user_config()
# 添加离线包路径

Expand Down Expand Up @@ -236,6 +234,9 @@
'JWT_ALLOW_REFRESH': True,
}

ELASTICSEARCH_HOST = CONFIG.ELASTICSEARCH_HOST
ELASTICSEARCH_PORT = CONFIG.ELASTICSEARCH_PORT

LOGGING = {
'version': 1,
'disable_existing_loggers': False,
Expand All @@ -259,7 +260,7 @@
'elasticsearch': {
'level': 'INFO',
'class': 'cmreslogging.handlers.CMRESHandler',
'hosts': [{'host': ELASTICSEARCH_HOST, 'port': 9200}],
'hosts': [{'host': ELASTICSEARCH_HOST, 'port': ELASTICSEARCH_PORT}],
'es_index_name': 'kubeoperator',
'index_name_frequency': CMRESHandler.IndexNameFrequency.MONTHLY,
'auth_type': CMRESHandler.AuthType.NO_AUTH,
Expand Down
8 changes: 8 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DEBUG: false
DB_HOST: mysql
DB_USER: root
DB_PASSWORD: SuMk2lH20ocmvyu1p38m40
DB_NAME: kube-operator
REDIS_HOST: redis
ELASTICSEARCH_HOST: elasticsearch
ELASTICSEARCH_PORT: 9200
14 changes: 2 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
- terraform_data:/opt/kubeOperator-api/data/terraform
- celery_data:/opt/kubeOperator-api/data/celery
environment:
DB_HOST: mysql
DB_USER: root
DB_PASSWORD: SuMk2lH20ocmvyu1p38m40
DB_NAME: kube-operator
REDIS_HOST: redis
- /opt/kubeoperator/config.yml:/opt/kubeOperator-api/data/config.yml
healthcheck:
test: "curl localhost:8000"
interval: 10s
Expand All @@ -71,12 +66,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
- terraform_data:/opt/kubeOperator-api/data/terraform
- celery_data:/opt/kubeOperator-api/data/celery
environment:
DB_HOST: mysql
DB_USER: root
DB_PASSWORD: SuMk2lH20ocmvyu1p38m40
DB_NAME: kube-operator
REDIS_HOST: redis
- /opt/kubeoperator/config.yml:/opt/kubeOperator-api/data/config.yml
healthcheck:
test: "ps axu | grep 'celery worker'"
interval: 10s
Expand Down

0 comments on commit 7006484

Please sign in to comment.