Commit 9f252368 authored by 胡凯旋's avatar 胡凯旋

remove create cluster

parent a71dd087
...@@ -46,7 +46,6 @@ http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-da ...@@ -46,7 +46,6 @@ http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-da
### 安装Helm ### 安装Helm
为了之后能够使用 `gm-cli` 更方便地进行本地环境的搭建与开发,需要安装配置helm
``` ```
# 用当前目录下的可执行文件,版本2.10.0 # 用当前目录下的可执行文件,版本2.10.0
$ cp helm /usr/local/bin/helm $ cp helm /usr/local/bin/helm
...@@ -55,7 +54,8 @@ $ cp helm /usr/local/bin/helm ...@@ -55,7 +54,8 @@ $ cp helm /usr/local/bin/helm
$ mkdir -p ~/.helm/repository $ mkdir -p ~/.helm/repository
$ touch ~/.helm/repository/repositories.yaml $ touch ~/.helm/repository/repositories.yaml
$ helm init $ helm init
$ helm repo add stable https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts/
$ helm repo add incubator https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/
``` ```
...@@ -79,101 +79,6 @@ password: Gengmei123! ...@@ -79,101 +79,6 @@ password: Gengmei123!
若出现如下报错,可先不必添加,但是可能会出现日志挂载不到本地Mac的情况,可能后面需要手动更改日志目录(待验证)。 若出现如下报错,可先不必添加,但是可能会出现日志挂载不到本地Mac的情况,可能后面需要手动更改日志目录(待验证)。
![](./image/2018-10-25-13-30-29.png) ![](./image/2018-10-25-13-30-29.png)
**至此就能使用gm-cli构建本地集群了,具体使用参考 [gm-cli](http://git.igengmei.com/system/gm-cli)** **至此本地k8s基础环境搭建完成,可以使用gm-cli构建本地服务集群了,具体使用参考 [gm-cli](http://git.igengmei.com/system/gm-cli)**
----------------
----------------
下面内容是不用`gm-cli`的情况下手动搭建本地集群的步骤,直接使用`gm-cli`的话可忽略
## 手动部署集群
1. 备份之前的路由表,用当前目录下的路由表替换之前的路由表
```
mv /etc/gm-config/storage/static.dir/helios.dir/static_route_table.json /etc/gm-config/storage/static.dir/helios.dir/static_route_table.json.old
cp ./static_route_table.json /etc/gm-config/storage/static.dir/helios.dir/static_route_table.json
```
2. 创建项目目录,日志目录到指定位置
```
sudo mkdir -p /data/log /srv/apps
sudo chown 自己的用户名 /data/log /srv/apps
mkdir -p /data/log/backend/app /data/log/gaia/app /data/log/mimas/app /data/log/doris/app # ...
```
3. `clone` 项目代码
```
cd /srv/apps
git clone git@git.wanmeizhensuo.com:backend/backend.git
git clone git@git.wanmeizhensuo.com:backend/gaia.git
git clone git@git.wanmeizhensuo.com:backend/Mimas.git
git clone git@git.wanmeizhensuo.com:rank/doris.git
```
4. 每个项目`checkout``paas`分支,`build`镜像
```
cd 项目目录
git checkout paas
docker build --no-cache -t 项目名:local.latest .
```
另外需要一个`Redis`的镜像:
```
docker pull redis
```
5. 复制 `settings_local` 到项目目录下
```
cp ./settings_local/backend/settings_local.py /srv/apps/backend/gengmei
cp ./settings_local/gaia/settings_local.py /srv/apps/gaia/gaia
cp ./settings_local/mimas/settings_local.py /srv/apps/mimas/settings/settings_local.py
cp ./settings_local/doris/devel.py /srv/apps/doris/doris/devel.py
```
6. 设置`configmap`
```
kubectl create configmap static-route-table --from-file=/etc/gm-config/storage/static.dir/helios.dir/static_route_table.json
kubectl create configmap backend-settings --from-file=/srv/apps/backend/gengmei/settings_local.py
kubectl create configmap gaia-settings --from-file=/srv/apps/gaia/gaia/settings_local.py
kubectl create configmap mimas-settings --from-file=/srv/apps/mimas/settings/settings_local.py
kubectl create configmap doris-settings --from-file=/srv/apps/doris/doris/devel.py
```
7. 部署`Pod``Service`
```
# Pod
kubectl create -f deploy/backend-deploy.yml
kubectl create -f deploy/gaia-deploy.yml
kubectl create -f deploy/mimas-deploy.yml
kubectl create -f deploy/doris-deploy.yml
kubectl create -f deploy/redis-deploy.yml
# Service
kubectl create -f service/backend-service.yml
kubectl create -f service/gaia-service.yml
kubectl create -f service/mimas-service.yml
kubectl create -f service/doris-service.yml
kubectl create -f service/redis-service.yml
```
8. 测试服务是否正常
```
kubectl get service -o wide
```
找到backend-service的PORTS, 默认30001,访问 [localhost:30001](localhost:30001) 验证服务
### 服务调试(不使用gm-cli)
1. 本地开发,对`/srv/apps`的服务进行开发
2. (如果涉及依赖的更新,先切到项目目录,执行`docker build --no-cache -t 项目名:local.latest .`)
3. 更新服务
```
kubectl replace --force -f deploy/backend-service.yml # 更改了哪个服务,更新时就用deploy目录下的对应文件更新
```
4. 测试
apiVersion: apps/v1
kind: Deployment
metadata:
name: apollo-deploy-test
labels:
app: apollo
spec:
replicas: 1
selector:
matchLabels:
app: apollo
template:
metadata:
labels:
app: apollo
spec:
containers:
- name: apollo
image: harbor.test.gengmei/backend/apollo:v1.0
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
- name: resource-json
mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
- name: gm-logging-dir
mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
- name: apollo-settings
mountPath: /srv/apps/apollo/apollo/settings_local.py
subPath: settings_local.py
- name: data-dir
mountPath: /data/log/apollo/app
volumes:
- name: static-route-table
configMap:
name: static-route-table
- name: resource-json
configMap:
name: resource-json
- name: gm-logging-dir
configMap:
name: gm-logging-dir
items:
- key: global_important_sentry.json
path: global_important_sentry.json
- key: kafka.json
path: kafka.json
- name: apollo-settings
configMap:
name: apollo-settings
items:
- key: settings_local.py
path: settings_local.py
# hostPath挂载
- name: data-dir
hostPath:
path: /data/log/apollo/app
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: artemis-deploy-test
labels:
app: artemis
spec:
replicas: 1
selector:
matchLabels:
app: artemis
template:
metadata:
labels:
app: artemis
spec:
containers:
- name: artemis
image: harbor.test.gengmei/backend/artemis:v1.0
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
- name: resource-json
mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
- name: gm-logging-dir
mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
- name: artemis-settings
mountPath: /srv/apps/artemis/artemis/settings_local.py
subPath: settings_local.py
volumes:
- name: static-route-table
configMap:
name: static-route-table
- name: resource-json
configMap:
name: resource-json
- name: gm-logging-dir
configMap:
name: gm-logging-dir
items:
- key: global_important_sentry.json
path: global_important_sentry.json
- key: kafka.json
path: kafka.json
- name: artemis-settings
configMap:
name: artemis-settings
items:
- key: settings_local.py
path: settings_local.py
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend-deploy-test
labels:
app: backend
spec:
replicas: 1
selector:
matchLabels:
app: backend
template:
metadata:
labels:
app: backend
spec:
containers:
- name: backend
image: backend:local.latest
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
- name: backend-settings
mountPath: /srv/apps/backend/gengmei/settings_local.py
subPath: settings_local.py
- name: data-dir
mountPath: /data/log/backend/app
- name: work-dir
mountPath: /srv/apps/backend
volumes:
- name: static-route-table
configMap:
name: static-route-table
- name: backend-settings
configMap:
name: backend-settings
items:
- key: settings_local.py
path: settings_local.py
# hostPath挂载
- name: data-dir
hostPath:
path: /data/log/backend/app
- name: work-dir
hostPath:
path: /srv/apps/backend
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: doris-deploy-test
labels:
app: doris
spec:
replicas: 1
selector:
matchLabels:
app: doris
template:
metadata:
labels:
app: doris
spec:
containers:
- name: doris
image: doris:local.latest
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
# - name: resource-json
# mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
# - name: gm-logging-dir
# mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
# - name: doris-settings
# mountPath: /srv/apps/doris/doris/devel.py
# subPath: devel.py
# - name: doris-settings
# mountPath: /srv/apps/doris/doris/base.py
# subPath: base.py
- name: data-dir
mountPath: /data/log/doris/app
- name: work-dir
mountPath: /srv/apps/doris
volumes:
- name: static-route-table
configMap:
name: static-route-table
# - name: resource-json
# configMap:
# name: resource-json
# - name: gm-logging-dir
# configMap:
# name: gm-logging-dir
# items:
# - key: global_important_sentry.json
# path: global_important_sentry.json
# - key: kafka.json
# path: kafka.json
# - name: doris-settings
# configMap:
# name: doris-settings
# items:
# - key: devel.py
# path: devel.py
# - key: base.py
# path: base.py
# hostPath挂载
- name: data-dir
hostPath:
path: /data/log/doris/app
- name: work-dir
hostPath:
path: /srv/apps/doris
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: gaia-deploy-test
labels:
app: gaia
spec:
replicas: 1
selector:
matchLabels:
app: gaia
template:
metadata:
labels:
app: gaia
spec:
containers:
- name: gaia
image: gaia:local.latest
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
# - name: resource-json
# mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
# - name: gm-logging-dir
# mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
- name: gaia-settings
mountPath: /srv/apps/gaia/gaia/settings_local.py
subPath: settings_local.py
- name: data-dir
mountPath: /data/log/gaia/app
- name: work-dir
mountPath: /srv/apps/gaia
volumes:
- name: static-route-table
configMap:
name: static-route-table
# - name: resource-json
# configMap:
# name: resource-json
# - name: gm-logging-dir
# configMap:
# name: gm-logging-dir
# items:
# - key: global_important_sentry.json
# path: global_important_sentry.json
# - key: kafka.json
# path: kafka.json
- name: gaia-settings
configMap:
name: gaia-settings
items:
- key: settings_local.py
path: settings_local.py
- name: data-dir
hostPath:
path: /data/log/gaia/app
- name: work-dir
hostPath:
path: /srv/apps/gaia
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: gm-face-deploy-test
labels:
app: gm-face
spec:
replicas: 1
selector:
matchLabels:
app: gm-face
template:
metadata:
labels:
app: gm-face
spec:
containers:
- name: gm-face
image: harbor.test.gengmei/backend/gm-face:v1.0
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
- name: resource-json
mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
- name: gm-logging-dir
mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
- name: gm-face-settings
mountPath: /srv/apps/gm-face/gm-face/settings_local.py
subPath: settings_local.py
- name: data-dir
mountPath: /data/log/gm-face/app
volumes:
- name: static-route-table
configMap:
name: static-route-table
- name: resource-json
configMap:
name: resource-json
- name: gm-logging-dir
configMap:
name: gm-logging-dir
items:
- key: global_important_sentry.json
path: global_important_sentry.json
- key: kafka.json
path: kafka.json
- name: gm-face-settings
configMap:
name: gm-face-settings
items:
- key: settings_local.py
path: settings_local.py
- name: data-dir
hostPath:
path: /data/log/gm-face/app
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: mimas-deploy-test
labels:
app: mimas
spec:
replicas: 1
selector:
matchLabels:
app: mimas
template:
metadata:
labels:
app: mimas
spec:
containers:
- name: mimas
image: mimas:local.latest
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
# - name: resource-json
# mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
# - name: gm-logging-dir
# mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
# - name: mimas-settings
# mountPath: /srv/apps/mimas/settings/base.py
# subPath: base.py
- name: mimas-settings
mountPath: /srv/apps/mimas/settings/settings_local.py
subPath: settings_local.py
- name: data-dir
mountPath: /data/log/mimas/app
- name: work-dir
mountPath: /srv/apps/mimas
volumes:
- name: static-route-table
configMap:
name: static-route-table
# - name: resource-json
# configMap:
# name: resource-json
# - name: gm-logging-dir
# configMap:
# name: gm-logging-dir
# items:
# - key: global_important_sentry.json
# path: global_important_sentry.json
# - key: kafka.json
# path: kafka.json
- name: mimas-settings
configMap:
name: mimas-settings
items:
# - key: base.py
# path: base.py
- key: settings_local.py
path: settings_local.py
- name: data-dir
hostPath:
path: /data/log/mimas/app
- name: work-dir
hostPath:
path: /srv/apps/mimas
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: passport-deploy-test
labels:
app: passport
spec:
replicas: 1
selector:
matchLabels:
app: passport
template:
metadata:
labels:
app: passport
spec:
containers:
- name: passport
image: harbor.test.gengmei/backend/passport:v1.0
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
- name: resource-json
mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
- name: gm-logging-dir
mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
- name: passport-settings
mountPath: /srv/apps/passport/passport/settings_gaia_local.py
subPath: settings_gaia_local.py
- name: passport-settings
mountPath: /srv/apps/passport/passport/settings_redis.py
subPath: settings_redis.py
- name: data-dir
mountPath: /data/log/passport/app
volumes:
- name: static-route-table
configMap:
name: static-route-table
- name: resource-json
configMap:
name: resource-json
- name: gm-logging-dir
configMap:
name: gm-logging-dir
items:
- key: global_important_sentry.json
path: global_important_sentry.json
- key: kafka.json
path: kafka.json
- name: passport-settings
configMap:
name: passport-settings
items:
- key: settings_gaia_local.py
path: settings_gaia_local.py
- key: settings_redis.py
path: settings_redis.py
- name: data-dir
hostPath:
path: /data/log/passport/app
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: plutus-deploy-test
labels:
app: plutus
spec:
replicas: 1
selector:
matchLabels:
app: plutus
template:
metadata:
labels:
app: plutus
spec:
containers:
- name: plutus
image: harbor.test.gengmei/backend/plutus:v1.0
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
- name: resource-json
mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
- name: gm-logging-dir
mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
- name: plutus-settings
mountPath: /srv/apps/plutus/plutus/settings_local.py
subPath: settings_local.py
- name: data-dir
mountPath: /data/log/plutus/app
# plutus secret config
- name: plutus-secret
mountPath: /srv/secret/msxf_gm.private
subPath: msxf_gm.private
- name: plutus-secret
mountPath: /srv/secret/msxf_key.public
subPath: msxf_key.public
- name: plutus-secret
mountPath: /srv/secret/zhongan_private.pem
subPath: zhongan_private.pem
- name: plutus-secret
mountPath: /srv/secret/zhongan_public.pem
subPath: zhongan_public.pem
volumes:
- name: static-route-table
configMap:
name: static-route-table
- name: resource-json
configMap:
name: resource-json
- name: gm-logging-dir
configMap:
name: gm-logging-dir
items:
- key: global_important_sentry.json
path: global_important_sentry.json
- key: kafka.json
path: kafka.json
- name: plutus-settings
configMap:
name: plutus-settings
items:
- key: settings_local.py
path: settings_local.py
- name: data-dir
hostPath:
path: /data/log/plutus/app
- name: plutus-secret
configMap:
name: plutus-secret
items:
- key: msxf_gm.private
path: msxf_gm.private
- key: msxf_key.public
path: msxf_key.public
- key: zhongan_private.pem
path: zhongan_private.pem
- key: zhongan_public.pem
path: zhongan_public.pem
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: push2-deploy-test
labels:
app: push2
spec:
replicas: 1
selector:
matchLabels:
app: push2
template:
metadata:
labels:
app: push2
spec:
containers:
- name: push2
image: harbor.test.gengmei/backend/push2:v1.0
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
- name: resource-json
mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
- name: gm-logging-dir
mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
- name: push2-settings
mountPath: /srv/apps/push2/conf/settings_local.py
subPath: settings_local.py
- name: push2-settings
mountPath: /srv/apps/push2/conf/settings_jpush.py
subPath: settings_jpush.py
- name: push2-settings
mountPath: /srv/apps/push2/conf/settings_db.py
subPath: settings_db.py
- name: data-dir
mountPath: /data/log/push2/app
volumes:
- name: static-route-table
configMap:
name: static-route-table
- name: resource-json
configMap:
name: resource-json
- name: gm-logging-dir
configMap:
name: gm-logging-dir
items:
- key: global_important_sentry.json
path: global_important_sentry.json
- key: kafka.json
path: kafka.json
- name: push2-settings
configMap:
name: push2-settings
items:
- key: settings_local.py
path: settings_local.py
- key: settings_jpush.py
path: settings_jpush.py
- key: settings_db.py
path: settings_db.py
- name: data-dir
hostPath:
path: /data/log/push2/app
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-deploy-test
labels:
app: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:latest
ports:
- containerPort: 6379
apiVersion: apps/v1
kind: Deployment
metadata:
name: ship-deploy-test
labels:
app: ship
spec:
replicas: 1
selector:
matchLabels:
app: ship
template:
metadata:
labels:
app: ship
spec:
containers:
- name: ship
image: harbor.test.gengmei/backend/ship:v1.0
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
- name: resource-json
mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
- name: gm-logging-dir
mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
- name: ship-settings
mountPath: /srv/apps/ship/ship/settings_local.py
subPath: settings_local.py
- name: ship-settings
mountPath: /srv/apps/ship/ship/settings_base.py
subPath: settings_base.py
- name: data-dir
mountPath: /data/log/ship/app
volumes:
- name: static-route-table
configMap:
name: static-route-table
- name: resource-json
configMap:
name: resource-json
- name: gm-logging-dir
configMap:
name: gm-logging-dir
items:
- key: global_important_sentry.json
path: global_important_sentry.json
- key: kafka.json
path: kafka.json
- name: ship-settings
configMap:
name: ship-settings
items:
- key: settings_local.py
path: settings_local.py
- key: settings_base.py
path: settings_base.py
# hostPath挂载
- name: data-dir
hostPath:
path: /data/log/ship/app
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: uc-sms-deploy-test
labels:
app: uc-sms
spec:
replicas: 1
selector:
matchLabels:
app: uc-sms
template:
metadata:
labels:
app: uc-sms
spec:
containers:
- name: uc-sms
image: harbor.test.gengmei/backend/uc-sms:v1.0
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
- name: resource-json
mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
- name: gm-logging-dir
mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
- name: data-dir
mountPath: /data/log/uc_sms/app
volumes:
- name: static-route-table
configMap:
name: static-route-table
- name: resource-json
configMap:
name: resource-json
- name: gm-logging-dir
configMap:
name: gm-logging-dir
items:
- key: global_important_sentry.json
path: global_important_sentry.json
- key: kafka.json
path: kafka.json
- name: data-dir
hostPath:
path: /data/log/uc_sms/app
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
apiVersion: apps/v1
kind: Deployment
metadata:
name: zeus-deploy-test
labels:
app: zeus
spec:
replicas: 1
selector:
matchLabels:
app: zeus
template:
metadata:
labels:
app: zeus
spec:
containers:
- name: zeus
image: harbor.test.gengmei/backend/zeus:v1.0
ports:
- containerPort: 8000
volumeMounts:
- name: static-route-table
mountPath: /etc/gm-config/storage/static.dir/helios.dir/
- name: resource-json
mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
- name: gm-logging-dir
mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
- name: zeus-settings
mountPath: /srv/apps/zeus/zeus/settings_local.py
subPath: settings_local.py
- name: data-dir
mountPath: /data/log/zeus/app
volumes:
- name: static-route-table
configMap:
name: static-route-table
- name: resource-json
configMap:
name: resource-json
- name: gm-logging-dir
configMap:
name: gm-logging-dir
items:
- key: global_important_sentry.json
path: global_important_sentry.json
- key: kafka.json
path: kafka.json
- name: zeus-settings
configMap:
name: zeus-settings
items:
- key: settings_local.py
path: settings_local.py
# hostPath挂载
- name: data-dir
hostPath:
path: /data/log/zeus/app
# 私有仓库镜像下载认证
imagePullSecrets:
- name: harbor-secret
sudo mkdir -p /srv/apps
sudo chown -R gmei /srv/apps
cd /srv/apps
git clone git@git.wanmeizhensuo.com:backend/backend.git
git clone git@git.wanmeizhensuo.com:backend/gaia.git
git clone git@git.wanmeizhensuo.com:backend/Mimas.git
git clone git@git.wanmeizhensuo.com:rank/doris.git
kind: Service
apiVersion: v1
metadata:
name: backend-service
spec:
selector:
app: backend
ports:
- protocol: TCP
port: 80
targetPort: 8000
nodePort: 30001
type: NodePort
\ No newline at end of file
kind: Service
apiVersion: v1
metadata:
name: doris-service
spec:
selector:
app: doris
ports:
- protocol: TCP
port: 80
targetPort: 8000
\ No newline at end of file
kind: Service
apiVersion: v1
metadata:
name: gaia-service
spec:
selector:
app: gaia
ports:
- protocol: TCP
port: 80
targetPort: 8000
\ No newline at end of file
kind: Service
apiVersion: v1
metadata:
name: mimas-service
spec:
selector:
app: mimas
ports:
- protocol: TCP
port: 80
targetPort: 8000
\ No newline at end of file
kind: Service
apiVersion: v1
metadata:
name: redis-service
spec:
selector:
app: redis
ports:
- protocol: TCP
port: 6379
targetPort: 6379
\ No newline at end of file
...@@ -4,11 +4,11 @@ AUDIT_DURATION = 0 ...@@ -4,11 +4,11 @@ AUDIT_DURATION = 0
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库 'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'antispam', 'NAME': 'antispam_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3307', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情 "charset": "utf8mb4", # 为了支持emoji表情
......
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="deploy" version="1.0"/>
<config name="log_dir" value="/data/log/apollo/app"/>
</gm_rpcd_config>
...@@ -12,11 +12,11 @@ CACHES = { ...@@ -12,11 +12,11 @@ CACHES = {
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql�~U��~M��~S 'ENGINE': 'django.db.backends.mysql', # 设置为mysql�~U��~M��~S
'NAME': 'apollo', 'NAME': 'apollo_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3307', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为�~F�~T��~L~Aemoji表�~C~E "charset": "utf8mb4", # 为�~F�~T��~L~Aemoji表�~C~E
......
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="deploy" version="1.0"/>
<config name="log_dir" value="/data/log/artemis/app"/>
</gm_rpcd_config>
server {
listen 80;
server_name nginx-ascle-service;
client_max_body_size 2m;
access_log /data/log/ascle/nginx/nginx-access.log;
error_log /data/log/ascle/nginx/nginx-error.log;
root /srv/apps/ascle-frontend/dist/;
location /api {
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $http_remoteip;
proxy_set_header Host $http_host;
proxy_pass http://ascle-service;
}
location / {
try_files $uri $uri/ /index.html;
}
location /account/login {
return 301 /;
}
}
server {
listen 80 default;
server_name nginx-service
server_tokens off; # don't show the version number, a security best practice
client_max_body_size 20m;
access_log /data/log/backend/www_access.log;
error_log /data/log/backend/www_error.log;
error_page 404 /404.html;
set $gmapp_name backend;
real_ip_header X-Forwarded-For;
proxy_set_header X-Forwarded-For $http_remoteip;
root /srv/apps/phantom/phantom-release;
location /phantom/ {
try_files $uri $uri /index.html;
}
location /phantomStatic/ {
alias /srv/apps/phantom/phantom-release/phantomStatic/;
}
location = / {
return 301 http://www.igengmei.com/;
}
location / {
try_files $uri $uri/ =404;
}
location /lipstick/ {
alias /srv/apps/backend/lipstick/;
}
location /pretty {
return 301 http://www.igengmei.com;
}
location /event/download {
return 301 http://www.igengmei.com;
}
location /tuangou {
return 301 /api/order/validate/;
}
location /favicon.ico {
return 301 /static/favicon.ico;
}
location ~ ^/static/(.*)$ {
alias /srv/apps/backend/hybrid/fe-dist/static/$1;
expires 864000;
}
location /hybrid {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-GM-Request-Id $request_id;
proxy_redirect off;
proxy_pass http://backend-service;
}
location /api {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-GM-Request-Id $request_id;
proxy_redirect off;
proxy_pass http://backend-service;
}
location /api/live/danmu {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $server_name;
proxy_redirect off;
proxy_pass http://danmu-service;
}
location /api/face/query_result {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $server_name;
proxy_redirect off;
proxy_pass http://danmu-service;
}
location /pay {
proxy_set_header X-Forwarded-For $http_remoteip;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-GM-Request-Id $request_id;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://backend-service;
}
location /analytics/page/ {
return 404;
}
location /stat {
proxy_set_header X-Forwarded-For $http_remoteip;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://backend-service;
}
location /join {
proxy_set_header X-Forwarded-For $http_remoteip;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://backend-service;
}
location /contacts {
proxy_set_header X-Forwarded-For $http_remoteip;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://backend-service;
}
location /files {
proxy_set_header X-Forwarded-For $http_remoteip;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://backend-service;
}
location /accounts {
proxy_set_header X-Forwarded-For $http_remoteip;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-GM-Request-Id $request_id;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://backend-service;
}
location /xcx {
proxy_set_header X-Forwarded-For $http_remoteip;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-GM-Request-Id $request_id;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://backend-service;
}
# location ~ ^/zhengxing/static/(.*)$ {
# alias /srv/static/backend/static/$1;
# expires 864000;
# }
# location ~ ^/zhengxing/media/apk/(.*)$ {
# alias /srv/media/backend/media/apk/$1;
# }
# location ~ ^/zhengxing/media/([^-]*)(-.*)?$ {
# alias /srv/media/backend/media/$1;
# expires 864000;
# }
# location ~ ^/static/(.*)$ {
# alias /srv/static/backend/static/$1;
# expires 864000;
# }
# location ~ ^/media/apk/(.*)$ {
# alias /srv/media/backend/media/apk/$1;
# }
# location ~ ^/media/(.*)$ {
# alias /srv/media/backend/media/$1;
# expires 864000;
# }
location /wuhongfei {
return 301 /event/download/wuhongfei/;
}
location /nvqingshou{
return 301 /event/download/nvqingshou/;
}
location /guanbo{
return 301 /event/download/guanbo/;
}
location /weibo{
return 301 /event/download/weibo/;
}
location /mrlittlebush{
return 301 /event/download/mrlittlebush/;
}
location /event/bjdy{
return 301 /event/download/bjdy/;
}
location /event/bjwd{
return 301 /event/download/bjwd/;
}
location /event/love163{
return 301 /event/download/love163/;
}
location /event/cd{
return 301 /event/download/cd/;
}
location /event/guoyinxufan{
return 301 /event/download/guoyinxufan/;
}
location /event/tengxunweibo{
return 301 /event/download/tengxunweibo/;
}
location /event/book-zxsrj{
return 301 /event/download/book-zxsrj/;
}
location /event/fx{
return 301 /event/download/fx/;
}
location /event/wuhongfei {
return 301 /event/download/wuhongfei/;
}
location /event/nvqingshou{
return 301 /event/download/nvqingshou/;
}
location /event/guanbo{
return 301 /event/download/guanbo/;
}
location /event/weibo{
return 301 /event/download/weibo/;
}
location /event/mrlittlebush{
return 301 /event/download/mrlittlebush/;
}
location /app{
return 301 /event/download/mp/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
This diff is collapsed.
# coding=utf-8 # coding=utf-8
# test by wph
import datetime import datetime
from datetime import timedelta from datetime import timedelta
...@@ -15,7 +16,7 @@ IOS_UPDATE = True ...@@ -15,7 +16,7 @@ IOS_UPDATE = True
ANDROID_UPDATE = True ANDROID_UPDATE = True
RAVEN_CONFIG = { RAVEN_CONFIG = {
'dsn': 'http://97c46f2222a742a99271c70d2b9ccc67:90261dbdb8d0440d921977cd71fe170a@sentry.wanmeizhensuo.com/5', 'dsn': ''
} }
DEBUG = True DEBUG = True
...@@ -27,7 +28,7 @@ STATICFILES_DIRS = ( ...@@ -27,7 +28,7 @@ STATICFILES_DIRS = (
) )
ENCRYPT_KEY = 'Up[K+ub%pliOnsO5UavFBd)cw5VcyHSX' ENCRYPT_KEY = 'Up[K+ub%pliOnsO5UavFBd)cw5VcyHSX'
BODYPART_ALL_ICON = 'http://hera.s.gmei.com/bodypart/2016/05/25/c95f1dd609' BODYPART_ALL_ICON = 'http://hera.s.gmei.com/bodypart/2016/05/25/c95f1dd609'
SERVICE_SPECIAL_DES_ICON = 'http://hera.s.igengmei.com/2017/07/10/9950841785' SERVICE_SPECIAL_DES_ICON = 'http://hera.s.gmei.com/2017/07/10/9950841785'
HIDE_TAGS = False HIDE_TAGS = False
EVENT_DOCTOR_TITLES = [ EVENT_DOCTOR_TITLES = [
('2015-08-05', u'自体脂肪'), ('2015-08-05', u'自体脂肪'),
...@@ -51,9 +52,7 @@ RPC_URL = 'http://rpc.test.gengmei.cc/api/' ...@@ -51,9 +52,7 @@ RPC_URL = 'http://rpc.test.gengmei.cc/api/'
RPC_SECRET = 'basic:M21gQkp0vWmDxlB5wVsIGCgbjdcshCsYaTgl4Rq0E6ug6Ma2teM9tpGCf5TZHsCGGC4cGQ4as9N3KmrDPQ43gA==' RPC_SECRET = 'basic:M21gQkp0vWmDxlB5wVsIGCgbjdcshCsYaTgl4Rq0E6ug6Ma2teM9tpGCf5TZHsCGGC4cGQ4as9N3KmrDPQ43gA=='
# RPC_INVOKER = helios.rpc.RPCFactory(RPC_URL, RPC_SECRET, debug=DEBUG, debug_unwrap_checker_raise_exception=False, debug_dump_curl=True, use_batch=False).create_invoker() # RPC_INVOKER = helios.rpc.RPCFactory(RPC_URL, RPC_SECRET, debug=DEBUG, debug_unwrap_checker_raise_exception=False, debug_dump_curl=True, use_batch=False).create_invoker()
RPC_INVOKER = helios.rpc.create_default_invoker(debug=DEBUG) RPC_INVOKER = helios.rpc.create_default_invoker(debug=DEBUG)
#RPC_INVOKER = helios.rpc.create_default_invoker(
# debug=DEBUG, request_timeout_times=3.0, timeout=47.9
#).with_config(dump_curl=True)
# ==================================================================================================== # ====================================================================================================
# ============================================分期付款================================================= # ============================================分期付款=================================================
...@@ -69,24 +68,13 @@ JIKE_SERVICE_HASH = "3710f84987aaa4f455a10f8bbb5c55e1" ...@@ -69,24 +68,13 @@ JIKE_SERVICE_HASH = "3710f84987aaa4f455a10f8bbb5c55e1"
# ==================================================================================================== # ====================================================================================================
QINIU_ACCESS_KEY = "UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL" QINIU_ACCESS_KEY = "UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL"
QINIU_SECRET_KEY = "z5YvpDDSam_JE345Z8J_f3TufzelOW2VOGNoBl9e" QINIU_SECRET_KEY = "z5YvpDDSam_JE345Z8J_f3TufzelOW2VOGNoBl9e"
API_HOST = "http://backend.test.env" API_HOST = "http://backend.paas.env"
HTTPS_HOST = 'http://backend.test.env/' HTTPS_HOST = 'http://backend.paas.env/'
WEB_API_HOST = "http://m.test.env" WEB_API_HOST = "http://m.paas.env"
PCWEB_API_HOST = "http://pcweb.test.gmei.com" PCWEB_API_HOST = "http://www.paas.env"
OPBACK_URL = "http://admin.test.gmei.com" OPBACK_URL = "http://admin.test.gmei.com"
QINIU_HOST = "http://wanmeizhensuo.qiniudn.com" QINIU_HOST = "http://wanmeizhensuo.qiniudn.com"
# ====================================================================================================
# ============================================ 微 信 =================================================
# ====================================================================================================
WECHAT_APP_ID = "wx403cd28c142c7d87"
WECHAT_PARTNER_ID = "1302548401"
WECHAT_SECRET = "e821f46be6ee45e3ca80d189f989313b"
WECHAT_NOTIFY_URL = "http://backend.test.gmei.com/pay/wechat/notify"
WECHAT_KEY = "/srv/secret/apiclient_key.pem"
WECHAT_CERT = "/srv/secret/apiclient_cert.pem"
# ==================================================================================================== # ====================================================================================================
# ============================================邮件发送================================================= # ============================================邮件发送=================================================
# ==================================================================================================== # ====================================================================================================
...@@ -110,8 +98,8 @@ ALIPAY_SIGN_TYPE = 'MD5' ...@@ -110,8 +98,8 @@ ALIPAY_SIGN_TYPE = 'MD5'
# ==================================================================================================== # ====================================================================================================
# ============================================Redis=================================================== # ============================================Redis===================================================
# ==================================================================================================== # ====================================================================================================
REDIS = {'host': 'test-redis', 'port': 6379, 'db': 0} REDIS = {'host': '192.168.168.142', 'port': 6379, 'db': 0}
BROKER_URL = 'redis://test-redis:6379/3' BROKER_URL = 'redis://192.168.168.142:6379/3'
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 259200} # 72 hours BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 259200} # 72 hours
CELERY_TIMEZONE = 'Asia/Shanghai' CELERY_TIMEZONE = 'Asia/Shanghai'
CELERYBEAT_SCHEDULE = { CELERYBEAT_SCHEDULE = {
...@@ -313,9 +301,8 @@ GENGMEI_KEFU_PERSON_ID = '2b64c68727cb11e68181f45c899f3b33' ...@@ -313,9 +301,8 @@ GENGMEI_KEFU_PERSON_ID = '2b64c68727cb11e68181f45c899f3b33'
FEEDBACK_CS_GROUP = '455979578157409fab1ca83f4f824e87' FEEDBACK_CS_GROUP = '455979578157409fab1ca83f4f824e87'
#SESSION_COOKIE_DOMAIN_GENGMEI = 'backend.test.gengmei.cc' #SESSION_COOKIE_DOMAIN_GENGMEI = 'backend.test.gengmei.cc'
SESSION_COOKIE_DOMAIN_BACKEND_GENGMEI = 'backend.test.env' SESSION_COOKIE_DOMAIN_BACKEND_GENGMEI = 'backend.test.gengmei.cc'
SESSION_COOKIE_DOMAIN_IGENGMEI = '.test.env'
SESSION_COOKIE_DOMAIN = '.test.env' # since 6.0
PUSH_NOTIFICATION_AFTER_FOLLOW_USER = True PUSH_NOTIFICATION_AFTER_FOLLOW_USER = True
ORDER_COMPLETE_SHARE_COUPONGIFT_ID = 40 ORDER_COMPLETE_SHARE_COUPONGIFT_ID = 40
...@@ -421,52 +408,14 @@ INDEX_TAB_CONFIG = [ ...@@ -421,52 +408,14 @@ INDEX_TAB_CONFIG = [
# 2017.5 分享文案开关 # 2017.5 分享文案开关
NEW_SHARE_DATA = True NEW_SHARE_DATA = True
SERVICE_DETAIL_IN_TEST = False # 全量测试开关 POINT_MALL_SWITCH = True
# 美购详情页ios灰度, # SESSION_COOKIE_DOMAIN_IGENGMEI = '.test.env'
SERVICE_DETAIL_GRAY_IOS = ["0", "1", "2", "3", "5", "6", "8", "9", "A", "B", "C", "D", "E", "F"] SESSION_COOKIE_DOMAIN_IGENGMEI = None
INNER_SERVICE_DETAIL_LIST = ['864325039478033','866920039414794','864370038130912'] # 新版美购详情页,增加测试灰度 # SESSION_COOKIE_DOMAIN = '.test.env' # since 6.0
GWL = [ SESSION_COOKIE_DOMAIN = None
# 交易组 FACE_REPORT_WITH_UINFO_V1 = ['9', '3','8','6','7'] # 新版发布概率,add in 7630
"F3388187-75F7-4831-AA0C-1886FD332731", FACE_REPORT_WITH_UINFO = ['7','3','2','6']
"6A99CBB1-6738-4ED1-A042-199CA80AAB22",
"EB5AB253-6D49-4B01-943D-B9278C9F674A",
"9C2A7797-16D3-4A9C-B19C-41A9AC186E61",
# 社交组
"C504140B-FACE-453D-A61C-1A056CF47A40",
"98AAC4A9-8F69-4EBE-B8C2-39F47023DE1D",
"AE024593-B832-4B23-BA16-DCB2B403D269",
"4841C5E0-DCE8-4108-9432-9E46631AACA3",
"826D4695-5D3F-40FC-8DF3-800F03CA32FB",
"B42685C0-702F-4C54-8C9E-73AEC5F3AAEC",
"30A24968-E6E0-429F-8BC4-91054C01F0F0",
"19F592FE-A442-4372-A2AA-D873A8A870E9",
"E362248A-0AA7-4ED0-856C-CBFDE0524F88",
# 产品组
"B268AC13-8FEA-4E1A-97FD-AEF7D13CEBC8",
"03E3692A-DD9A-443C-9481-6E882EF5DEA4",
"EB8B8B98-F865-494D-8D87-C323714A6F53",
"C608EDA4-B305-4E1B-ABBD-6DDAD4EDAAF3",
"00CA20EB-2719-4518-85CC-60E765AC526F",
"androidid_4f7e1e999d5a0ad7",
"CDD0756B-2DBA-43FB-93A4-8EC32A76A7CE",
"CE5C0FF8-C830-4184-BEF6-A2F67BF9EFAA",
"E1A4F2BF-8D0A-4465-8A3E-B8F562A38E2B",
"865846039243795",
"62B3D99D-F4A2-4104-BBB1-2B803F8A6943",
"3DB03D3C-A85E-4601-A8DE-CD1757D03048",
]
IS_QA_RICHTEXT = True
# 订单尾款花呗分期开关
HOSPITAL_PAY_HUABEI_SWITCH = True
TRACE_SAMPLE_RATE = 100.0 WECHAT_SMALL_APPID = 'wx113018c998de9eaf'
# TRACE_FILTER_API_OK = False WECHAT_SMALL_APPSECRET = '328083f0cbb131c7de3b3920eed8ddaf'
# TRACE_URLPATTERN_AS_SPAN_NAME = False
DATADOG_TRACE = {
'DEFAULT_SERVICE': 'backend',
'TAGS': {'env': 'production'},
}
\ No newline at end of file
...@@ -8,11 +8,11 @@ DEBUG = False ...@@ -8,11 +8,11 @@ DEBUG = False
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库 'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'bran_prod', 'NAME': 'bran_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3307', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情 "charset": "utf8mb4", # 为了支持emoji表情
...@@ -20,7 +20,7 @@ DATABASES = { ...@@ -20,7 +20,7 @@ DATABASES = {
}, },
'gaia':{ 'gaia':{
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库 'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'zhengxing', 'NAME': 'zhengxing_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
...@@ -38,7 +38,7 @@ REDIS_URL = 'redis://192.168.168.142/2' ...@@ -38,7 +38,7 @@ REDIS_URL = 'redis://192.168.168.142/2'
REDIS = { REDIS = {
'default': {'host': '192.168.168.142', 'port': 11032, 'db': 0,} 'default': {'host': '192.168.168.142', 'port': 6379, 'db': 0,}
} }
......
...@@ -45,8 +45,8 @@ DATABASE_ROUTERS = ['common.django_tools.GaiaRouter'] ...@@ -45,8 +45,8 @@ DATABASE_ROUTERS = ['common.django_tools.GaiaRouter']
# 'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库 # 'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
# 'NAME': '', # 'NAME': '',
# 'USER': 'work', # 'USER': 'work',
# 'PASSWORD': 'workwork', # 'PASSWORD': 'Gengmei1',
# 'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com', # 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
# 'PORT': '', # 'PORT': '',
# 'OPTIONS': { # 'OPTIONS': {
# "init_command": "SET foreign_key_checks = 0;", # "init_command": "SET foreign_key_checks = 0;",
......
[redis]
hostAndPort="192.168.168.142:6379"
db=3
[server]
httpHostAndPort = 0.0.0.0:8000
[delay]
delay=2
[like_rate]
low_speed = 1
high_speed = 11
like_loop_time = 120
[debug]
is_debug=0
[redis] [redis]
hostAndPort="192.168.168.142" hostAndPort="192.168.168.142"
db=23 db=3
[server] [server]
httpHostAndPort = 0.0.0.0:8109 httpHostAndPort = 0.0.0.0:8109
......
# coding=utf-8
"""
Django settings for doris project.
Generated by 'django-admin startproject' using Django 1.10.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
from .log_settings import *
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'w%te9@t+_hgon4dq^7udy(&l=rpzkgga1ts2(fnym8cglx)v2@'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'dal',
'dal_select2',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'raven.contrib.django.raven_compat',
'json_editor',
'word',
'rank',
'search',
'recommend',
'hera',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'doris.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(BASE_DIR,'templates')
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'doris.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/
from django.contrib import admin
STATIC_URL = '/static/'
admin.site.site_header = '更美策略平台'
STATIC_ROOT = 'static'
WORD_FILE = '/srv/apps/doris/static/word/word.txt'
STOP_WORD_FILE = '/srv/apps/doris/static/word/stopword.txt'
ES_CONSTS = {
'TAG_ID_DIRECTOR_RECOMMEND': 1142, # "所长精选" tag id
'TAG_ID_POPULAR': 1202, # "热门讨论" tag id
'TAG_ID_POPULAR_RECOMMEND': 1203, # "热门推荐" tag id
'TAG_ID_DIARY_WITH_SERVICE': 1144, # "美购日记" tag id
}
ES_SEARCH_TIMEOUT = '10s'
COUNT_LIMIT = 200
ES_SCRIPT_LANG = 'groovy'
DIARY_SCORE_WEIGHT = {
'HEAT_SCORE_WEIGHT': 0.6, # 热度分权重
'AUDIT_SCORE_WEIGHT': 0.55, # 内容质量分权重
'CHOUCHENG_SCORE_WEIGHT': 0.1, # 抽成分权重
}
PENALTY_FACTOR = 1.5
RANK_EMAIL = ['doctor@gmei.com']
MAX_TAG = 3
VIDEO_TAG_ID = 4706 # 如果有小视频 就给日记本添加视频日记的tag
FEED_DIARY_NAME = "feed:{}:diaries"
FEED_QUESTION_NAME = "feed:{}:question"
FEED_ANSWER_NAME = "feed:{}:answer"
FEED_ARTICLE_NAME = "feed:{}:article"
DEVICE_PORTRAIT_NAME = "device:{}:category"
FEED_CACHE_VERSION = "v0"
DATABASE_ROUTERS = ['doris.routers.DatabaseRouter']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'doris_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
},
'gaia': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'zhengxing_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
},
'mimas': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'mimas_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
},
"gold":{
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'gold',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
}
}
# shanxi: 陕西 shannxi: 山西
NEARBY_REGION = {
"beijing": ("hebei", "tianjin"),
"tianjin": ("beijing", "hebei"),
"hebei": ("beijing", "tianjin", "shandong", "henan", "shannxi", "neimenggu"),
"shannxi": ("hebei", "shandong", "henan", "shanxi", "neimenggu"),
"neimenggu": ("hebei", "liaoning", "jilin", "heilongjiang", "shannxi", "shanxi", "ningxia", "gansu"),
"liaoning": ("hebei", "jilin", "neimenggu"),
"jilin": ("liaoning", "heilongjiang", "neimenggu"),
"heilongjiang": ("jilin", "neimenggu"),
"shanghai": ("jiangsu", "anhui", "zhejiang"),
"jiangsu": ("shandong", "anhui", "zhejiang", "shanghai"),
"zhejiang": ("shanghai", "jiangsu", "anhui", "fujian"),
"anhui": ("jiangsu", "zhejiang", "jiangxi", "hubei", "henan"),
"fujian": ("zhejiang", "jiangxi", "guangdong"),
"jiangxi": ("anhui", "zhejiang", "fujian", "guangdong", "hunan", "hubei"),
"shandong": ("hebei", "henan", "jiangsu"),
"henan": ("hebei", "shandong", "anhui", "hubei", "shanxi", "shannxi"),
"hubei": ("henan", "anhui", "jiangxi", "hunan", "chongqing", "shanxi"),
"hunan": ("hubei", "jiangxi", "guangdong", "guangxi", "guizhou", "chongqing"),
"guangdong": ("guangxi", "hunan", "jiangxi", "fujian", "hainan"),
"guangxi": ("guangdong", "hunan", "guizhou", "yunnan"),
"hainan": ("guangdong",),
"chongqing": ("shanxi", "hubei", "hunan", "guizhou"),
"sichuan": ("gansu", "shanxi", "chongqing", "guizhou", "yunnan", "xizang", "qinghai"),
"guizhou": ("chongqing", "hunan", "guangxi", "yunnan", "sichuan"),
"yunnan": ("sichuan", "guizhou", "guangxi", "xizang"),
"xizang": ("qinghai", "sichuan", "yunnan", "xinjiang"),
"shanxi": ("neimenggu", "shannxi", "henan", "hubei", "chongqing", "sichuan", "gansu", "ningxia"),
"gansu": ("ningxia", "shanxi", "sichuan", "qinghai", "xinjiang", "neimenggu"),
"qinghai": ("gansu", "sichuan", "xizang", "xinjiang"),
"ningxia": ("neimenggu", "shanxi", "gansu"),
"xinjiang": ("gansu", "qinghai", "xizang"),
"taiwan": ("fujian",),
"xianggang": ("guangdong",),
"aomen": ("guangdong",)
}
...@@ -7,19 +7,19 @@ from celery.schedules import crontab ...@@ -7,19 +7,19 @@ from celery.schedules import crontab
import pyssdb import pyssdb
CELERY_BROKER_URL = 'redis://:123456@redis-service:6379/0' CELERY_BROKER_URL = 'redis://192.168.168.142/0'
REDIS_URL = 'redis://redis-service:6379/1' REDIS_URL = 'redis://192.168.168.142/1'
ES_V2_HOSTS = [ ES_V2_HOSTS = [
{'host': '10.30.57.94', 'port': 9200}, {'host': '192.168.168.142', 'port': 9200},
] ]
ES_INDEX_PREFIX = 'gm_test' ES_INDEX_PREFIX = 'gm_test'
COUNT_LIMIT = 100 COUNT_LIMIT = 50
REDIS = { REDIS = {
'doctor': {'host': 'redis-service', 'port': 6379, 'db': 1}, 'doctor': {'host': '192.168.168.142', 'port': 6379, 'db': 1,},
} }
...@@ -48,17 +48,4 @@ CELERYBEAT_SCHEDULE = { ...@@ -48,17 +48,4 @@ CELERYBEAT_SCHEDULE = {
SSDB_CLIENT = pyssdb.Client(host='10.173.24.179', port=8888) SSDB_CLIENT = pyssdb.Client(host='192.168.168.143', port=8888)
GM_KV_HOSTS = [
{
"host":"192.168.15.11",
"port":5379,
"db":2
},
{
"host":"192.168.15.12",
"port":5379,
"db":2
}
]
# coding=utf-8
from doris.base import *
from .log_settings import *
from celery import *
from celery.schedules import crontab
import pyssdb
CELERY_BROKER_URL = 'redis://192.168.168.142/0'
REDIS_URL = 'redis://192.168.168.142/1'
ES_V2_HOSTS = [
{'host': '192.168.168.142', 'port': 9200},
]
ES_INDEX_PREFIX = 'gm_test'
COUNT_LIMIT = 50
REDIS = {
'doctor': {'host': '192.168.168.142', 'port': 6379, 'db': 1,},
}
RAVEN_CONFIG = {
'dsn': 'http://29e77782db3c4429857cb1b6d69d9463:d55eafe28ae64f6e8c4a82fa3bc50fdd@sentry.gengmei.cc/80',
}
CELERYBEAT_SCHEDULE = {
'doris_ trans2es': {
'task': 'rank.tasks.doctor_statdata_2_cache',
# 'schedule': timedelta(seconds=1),
'schedule': crontab(hour=2, minute=0),
},
'doris_cal_device_interest': {
'task': 'recommend.tasks.cal_userinterest_rank',
# 'schedule': timedelta(seconds=1),
'schedule': crontab(hour=2, minute=0),
},
'doris_cal_servicehot_rank': {
'task': 'recommend.tasks.cal_servicehot_rank',
# 'schedule': timedelta(seconds=1),
'schedule': crontab(hour=2, minute=0),
}
}
SSDB_CLIENT = pyssdb.Client(host='192.168.168.143', port=8888)
# from base
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'doris_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
},
'gaia': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'zhengxing_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
},
'mimas': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'mimas_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
},
"gold":{
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'gold',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
}
}
# coding=utf-8
from doris.base import *
from .log_settings import *
from celery import *
from celery.schedules import crontab
import pyssdb
CELERY_BROKER_URL = 'redis://192.168.168.142/0'
REDIS_URL = 'redis://192.168.168.142/1'
ES_V2_HOSTS = [
{'host': '192.168.168.142', 'port': 9200},
]
ES_INDEX_PREFIX = 'gm_test'
COUNT_LIMIT = 50
REDIS = {
'doctor': {'host': '192.168.168.142', 'port': 6379, 'db': 1,},
}
RAVEN_CONFIG = {
'dsn': 'http://29e77782db3c4429857cb1b6d69d9463:d55eafe28ae64f6e8c4a82fa3bc50fdd@sentry.gengmei.cc/80',
}
CELERYBEAT_SCHEDULE = {
'doris_ trans2es': {
'task': 'rank.tasks.doctor_statdata_2_cache',
# 'schedule': timedelta(seconds=1),
'schedule': crontab(hour=2, minute=0),
},
'doris_cal_device_interest': {
'task': 'recommend.tasks.cal_userinterest_rank',
# 'schedule': timedelta(seconds=1),
'schedule': crontab(hour=2, minute=0),
},
'doris_cal_servicehot_rank': {
'task': 'recommend.tasks.cal_servicehot_rank',
# 'schedule': timedelta(seconds=1),
'schedule': crontab(hour=2, minute=0),
}
}
SSDB_CLIENT = pyssdb.Client(host='192.168.168.143', port=8888)
# from base
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'doris_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
},
'gaia': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'zhengxing_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
},
'mimas': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'mimas_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
},
"gold":{
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'gold',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
}
}
...@@ -4,11 +4,11 @@ import pyssdb ...@@ -4,11 +4,11 @@ import pyssdb
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库 'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'feed_prod', 'NAME': 'feed_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3407', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情 "charset": "utf8mb4", # 为了支持emoji表情
...@@ -16,7 +16,7 @@ DATABASES = { ...@@ -16,7 +16,7 @@ DATABASES = {
}, },
'gaia': { 'gaia': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': 'zhengxing', 'NAME': 'zhengxing_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
...@@ -28,11 +28,11 @@ DATABASES = { ...@@ -28,11 +28,11 @@ DATABASES = {
}, },
'mimas': { 'mimas': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': 'mimas_prod', 'NAME': 'mimas_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3308', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", "charset": "utf8mb4",
......
...@@ -4,11 +4,11 @@ import pyssdb ...@@ -4,11 +4,11 @@ import pyssdb
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库 'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'feed_prod', 'NAME': 'feed_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3407', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情 "charset": "utf8mb4", # 为了支持emoji表情
...@@ -16,7 +16,7 @@ DATABASES = { ...@@ -16,7 +16,7 @@ DATABASES = {
}, },
'gaia': { 'gaia': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': 'zhengxing', 'NAME': 'zhengxing_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
...@@ -28,11 +28,11 @@ DATABASES = { ...@@ -28,11 +28,11 @@ DATABASES = {
}, },
'mimas': { 'mimas': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': 'mimas_prod', 'NAME': 'mimas_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3308', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", "charset": "utf8mb4",
......
# coding: utf-8
import os
import raven
from celery.schedules import crontab
import helios
import helios.rpc
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'zng=%a*!bokrd#=%%rawhyp0)1qr15i#x7m@hetqd%z_+kv599'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
TEMPLATE_DEBUG = DEBUG
RAVEN_CONFIG = {}
# 顶部导航Tabs
TAB_INDEX = '/'
TAB_LIVE = '/live_list/'
TAB_TAGS = '/diary_list/'
TAB_PROMOTION = '/promotion_list/'
TAB_WIKI = '/wiki_list/'
TAB_EXPERT = '/expert_list/'
TAB_POST = '/post_list/'
TAB_HOSPITAL = '/hospital_list/'
TAB_TOPIC = '/topic_list/'
TAB_SEOCATEGORY = '/seocategory/list/'
TABS = [
{'name': u'首页', 'url': TAB_INDEX},
{'name': u'直播', 'url': TAB_LIVE},
{'name': u'日记', 'url': TAB_TAGS},
{'name': u'美购', 'url': TAB_PROMOTION},
{'name': u'百科', 'url': TAB_WIKI},
{'name': u'专家', 'url': TAB_EXPERT},
{'name': u'医院', 'url': TAB_HOSPITAL},
# {'name': u'问答', 'url': TAB_TOPIC},
{'name': u'健康资讯', 'url': TAB_POST},
# {'name': u'项目专题', 'url': TAB_SEOCATEGORY}, # 6.0没有该入口
]
SEARCH_TABS = [
{'name': u'日记', 'url': TAB_TAGS},
{'name': u'美购', 'url': TAB_PROMOTION},
{'name': u'专家', 'url': TAB_EXPERT},
{'name': u'医院', 'url': TAB_HOSPITAL},
]
# 医生机构tags显示的个数
DOCTOR_SHOW_TAGS_NUM = 6
# 首页默认显示的Tag
FRONT_DEFAULT_TAGS = [{'id': 1, 'color': '#ffd34e', 'position': 1, 'icon': 'http://hera.s.gengmei.cc/2014/12/24/b3076876ff'},
{'id': 2, 'color': '#ffae5e', 'position': 2, 'icon': 'http://hera.s.gengmei.cc/2014/12/24/2624935b91'},
# {'id': 13, 'color': '#ff877b', 'position': 3, 'icon': 'http://hera.s.gengmei.cc/2014/12/24/aef2541110'},
{'id': 3, 'color': '#ff6c8f', 'position': 4, 'icon': 'http://hera.s.gengmei.cc/2014/12/24/e7f379e88f'},
{'id': 7, 'color': '#9290f6', 'position': 5, 'icon': 'http://hera.s.gengmei.cc/2014/12/24/0ef5dafde4'},
{'id': 4, 'color': '#5e9bff', 'position': 6, 'icon': 'http://hera.s.gengmei.cc/2014/12/24/1eea8df935'},
{'id': 5, 'color': '#5dcdfc', 'position': 7, 'icon': 'http://hera.s.gengmei.cc/2014/12/24/85df448756'}]
# 医生默认头像
DEFAULT_EXPERT_PORTRAIT = 'http://pic.gmei.com/2015/03/13/fbde86be25-web'
# TDK
TDK = {
'title': u'更美APP官网—微整形_整形美购_整形美容_微整形社区与微整形特卖平台',
'keywords': u'更美,更美APP,更美APP官网,更美网,整形,整容,微整形',
'description': u'更美APP原名完美诊所,拥有超过10000位三甲及知名民营医院的整形外科医生。为用户提供免费的整形咨询,还有知名整形医生的护肤、瘦脸、齿科、双眼皮等整形特价团购!'
}
# 百度阿拉丁KEY
ALADING_KEY = 't7bu89c9ys4ix5u7o6t7v8kuxbtos1qy'
SUOZHANG_UID = 22
DOCTOR_REGISTER_URL = 'http://doctor.gmei.com/doctor/register'
HOSPITAL_REGISTER_URL = 'http://doctor.gmei.com/hospital/register'
# gmei.com 域名对应的公司名称和备案号
COMPANY_NAME = '北京完美创意科技有限公司'
ICP_DOC = '2016-京ICP备13053291号-3 ©2016-京ICP证150877号'
RPC_INVOKER = helios.rpc.create_default_invoker(debug=DEBUG)
COUNTRY_CHINA_ID = 'china'
HOSPITAL_LIMIT_COUNT = 2
TAB_DEFAULT_ORDERING = 100
# SENTINEL相关配置
SENTINEL = {
# sentinel开关(非线上环境建议关闭)
'enable': False,
# sentinel服务器地址列表
'sentinels': [
('192.168.168.142', 26379), ('192.168.168.142', 26380), ('192.168.168.142', 26381),
],
# redis-master的地址,与master-name的映射
'masters': {
('192.168.168.142', '6379'): "ac1e0876_18eb",
},
}
BROKER_URL = 'redis://192.168.168.142:6379/4'
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 259200} # 72 hours
CELERY_TIMEZONE = 'Asia/Shanghai'
CELERYBEAT_SCHEDULE = {
'doctors2redis': {
'task': 'app.tasks.doctors2redis',
'schedule': crontab(minute=0, hour=3),
'args': ()
},
'hospital2redis': {
'task': 'app.tasks.hospital2redis',
'schedule': crontab(minute=0, hour=3),
'args': ()
},
}
GMTRACER_PARSER = 'app.utils.setup_tracer'
# 采样率
TRACE_SAMPLE_RATE = 10.0
# coding: utf-8
import os
from flag_ship.settings_base import *
ALLOWED_HOSTS = ['*']
# Application definition
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.staticfiles',
'django_jinja',
'helios',
'viewbase',
'app',
'raven.contrib.django.raven_compat',
)
MIDDLEWARE_CLASSES = (
'gm_tracer.middleware.TracerMiddleware',
'gm_tracer.middleware.TracerExtraMiddleware',
'app.middlewares.logger.LoggingMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'gm_logging.django.middleware.LoggingMiddleware',
'app.middlewares.rpc.HeliosMiddleware',
'gm_shield.django.middleware.GMShield',
)
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
SESSION_COOKIE_AGE = 60*60*24
ROOT_URLCONF = 'flag_ship.urls'
WSGI_APPLICATION = 'flag_ship.wsgi.application'
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = '/srv/apps/flag-ship/local/build/static'
STATICFILES_DIRS = (
('', os.path.join(BASE_DIR, '..', 'frontend', 'static')),
('', os.path.join(BASE_DIR, '..', 'fe', 'dist', 'static')),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
TEMPLATE_LOADERS = (
'django_jinja.loaders.FileSystemLoader',
'django_jinja.loaders.AppLoader',
)
# TEMPLATE_DIRS = (
# os.path.join(BASE_DIR, '..', 'frontend', 'templates'),
# os.path.join(BASE_DIR, '..', 'fe', 'dist'),
# )
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, '..', 'local', 'build', 'templates'),
os.path.join(BASE_DIR, '..', 'fe', 'dist'),
)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.jinja2.Jinja2',
'DIRS': TEMPLATE_DIRS,
'APP_DIRS': True,
'OPTIONS': {
'environment': 'app.utils.environment',
},
}
]
DEFAULT_JINJA2_TEMPLATE_EXTENSION = ''
# Captcha 验证码图片样式(1:数字运算;2.四位字符或者数字)
CAPTCHA_STYLE = 2
...@@ -49,6 +49,9 @@ CACHES = { ...@@ -49,6 +49,9 @@ CACHES = {
} }
} }
REDIS = {'host': '192.168.168.142/1', 'port': 6379, 'db': 1}
# Database # Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
# NOTE:django # NOTE:django
...@@ -62,25 +65,26 @@ DATABASES = { ...@@ -62,25 +65,26 @@ DATABASES = {
APPEND_SLASH = False APPEND_SLASH = False
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) BASE_DIR = os.path.dirname(os.path.dirname(__file__))
TEMPLATE_DIRS = ( # TEMPLATE_DIRS = (
os.path.join(BASE_DIR, '..', 'frontend', 'templates'), # os.path.join(BASE_DIR, '..', 'frontend', 'templates'),
) # )
TEMPLATES = [ # TEMPLATES = [
{ # {
'BACKEND': 'django.template.backends.jinja2.Jinja2', # 'BACKEND': 'django.template.backends.jinja2.Jinja2',
'DIRS': ( # 'DIRS': (
TEMPLATE_DIRS # TEMPLATE_DIRS
), # ),
'APP_DIRS': True, # 'APP_DIRS': True,
'OPTIONS': { # 'OPTIONS': {
'environment': 'app.utils.environment', # 'environment': 'app.utils.environment',
}, # },
} # }
] # ]
STATICFILES_DIRS = ( # STATICFILES_DIRS = (
os.path.join(BASE_DIR, '..', 'frontend', 'static'), # os.path.join(BASE_DIR, '..', 'frontend', 'static'),
) # )
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATIC_ROOT = '' STATIC_ROOT = '/srv/apps/flag-ship/local/build/static'
# STATIC_ROOT = ''
# STATIC_ROOT = os.path.join(BASE_DIR, '..', 'frontend', 'static') # STATIC_ROOT = os.path.join(BASE_DIR, '..', 'frontend', 'static')
# STATIC_ROOT = '/srv/apps/flag-ship/frontend/static' # STATIC_ROOT = '/srv/apps/flag-ship/frontend/static'
This diff is collapsed.
DATABASES = { # 设置为线上的数据库地址,用户名,密码 DATABASES = { # 设置为线上的数据库地址,用户名,密码
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库 'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'gm_face', 'NAME': 'gm_face_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3307', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情 "charset": "utf8mb4", # 为了支持emoji表情
...@@ -16,5 +16,5 @@ DATABASES = { # 设置为线上的数据库地址,用户名,密码 ...@@ -16,5 +16,5 @@ DATABASES = { # 设置为线上的数据库地址,用户名,密码
FACEPP_API_KEY = 'VFZ80NNdS-zIqnlFJClzlM8iq4ZVHqa3' FACEPP_API_KEY = 'VFZ80NNdS-zIqnlFJClzlM8iq4ZVHqa3'
FACEPP_API_SECRET = 'BxIeNVw26xas1KbcWGzL8zlF1kMy0gdj' FACEPP_API_SECRET = 'BxIeNVw26xas1KbcWGzL8zlF1kMy0gdj'
BROKER_URL = ['redis://192.168.168.142:6379/18', 'redis://192.168.168.142:6379/22'] # 线上redis BROKER_URL = ['redis://192.168.168.142:6379/8', 'redis://192.168.168.142:6379/2'] # 线上redis
REDIS = {'host': '192.168.168.142', 'port': 6379, 'db': 23, } # 线上redis REDIS = {'host': '192.168.168.142', 'port': 6379, 'db': 3, } # 线上redis
This diff is collapsed.
...@@ -5,7 +5,8 @@ from .base_settings import * ...@@ -5,7 +5,8 @@ from .base_settings import *
import helios.rpc import helios.rpc
DEBUG = True DEBUG = True
STATIC_ROOT = '/srv/static/hera' STATIC_URL = '/static/'
STATIC_ROOT = '/srv/apps/hera/static/'
CACHES = { CACHES = {
'default': { 'default': {
'BACKEND': 'django_redis.cache.RedisCache', 'BACKEND': 'django_redis.cache.RedisCache',
...@@ -19,7 +20,7 @@ SESSION_ENGINE = 'django.contrib.sessions.backends.cache' ...@@ -19,7 +20,7 @@ SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
RPC_URL = 'http://rpc.test.gengmei.cc/api/' RPC_URL = 'http://rpc.test.gengmei.cc/api/'
RPC_KEY = 'basic:6o9sVEB6+H5U61rfZpVMioWcRRoU32uazNE3h18kwcAqOMPVdjmvQ72XxZVNLNl6RSACrgLeD7xrKYsxL1iZ6A==' RPC_KEY = 'basic:6o9sVEB6+H5U61rfZpVMioWcRRoU32uazNE3h18kwcAqOMPVdjmvQ72XxZVNLNl6RSACrgLeD7xrKYsxL1iZ6A=='
BACKEND = 'http://backend-service.default' BACKEND = 'http://backend-service'
QINIU_ACCESS_KEY = "UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL" QINIU_ACCESS_KEY = "UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL"
...@@ -30,7 +31,7 @@ QINIU_SCOPE = 'wanmeizhensuo' ...@@ -30,7 +31,7 @@ QINIU_SCOPE = 'wanmeizhensuo'
DOCTOR_URL = 'http://doctor.test.gengmei.cc' DOCTOR_URL = 'http://doctor.test.gengmei.cc'
ASCLE = 'http://doctor.test.gengmei.cc' ASCLE = 'http://doctor.test.gengmei.cc'
ES_HOSTS = [{'host': '192.168.168.142', 'port': 19200}] # [{'host':'','port': }] ES_HOSTS = [{'host': '192.168.168.142', 'port': 9200}] # [{'host':'','port': }]
ES_INDEX = 'gm_hades_test_write' # es index ES_INDEX = 'gm_hades_test_write' # es index
ES_TYPE = 'doctor' # es type ES_TYPE = 'doctor' # es type
ES_SEARCH_TIMEOUT = 60 ES_SEARCH_TIMEOUT = 60
...@@ -42,7 +43,7 @@ DOCTOR_BUSINESS_CHANNAL_ID = 51 ...@@ -42,7 +43,7 @@ DOCTOR_BUSINESS_CHANNAL_ID = 51
EMAIL_USER = 'doctor@wanmeizhensuo.com' EMAIL_USER = 'doctor@wanmeizhensuo.com'
EMAIL_PSWD = 'xl60QkFtwJq6ziswn2a4r4pkFNozI13g' EMAIL_PSWD = 'xl60QkFtwJq6ziswn2a4r4pkFNozI13g'
BROKER_URL = 'redis://192.168.168.142:6379' BROKER_URL = 'redis://192.168.168.142:6379/1'
# BROKER_URL = 'redis://127.0.0.1:6379' # BROKER_URL = 'redis://127.0.0.1:6379'
EXPORT_LOG = {'host': '192.168.168.142', 'port': 6379, 'db': 7} EXPORT_LOG = {'host': '192.168.168.142', 'port': 6379, 'db': 7}
...@@ -58,3 +59,6 @@ PUSH_COUPON_CHANNAL_ID = 93 ...@@ -58,3 +59,6 @@ PUSH_COUPON_CHANNAL_ID = 93
RAVEN_CONFIG = { RAVEN_CONFIG = {
'dsn': '' 'dsn': ''
} }
# move from base
ALLOWED_HOSTS = ['*']
...@@ -10,7 +10,7 @@ QINIU_SECRET_KEY = "z5YvpDDSam_JE345Z8J_f3TufzelOW2VOGNoBl9e" ...@@ -10,7 +10,7 @@ QINIU_SECRET_KEY = "z5YvpDDSam_JE345Z8J_f3TufzelOW2VOGNoBl9e"
CACHES = { CACHES = {
'default': { 'default': {
'BACKEND': 'django_redis.cache.RedisCache', 'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'redis://192.168.168.142:6379/80', 'LOCATION': 'redis://192.168.168.142:6379/8',
'KEY_PREFIX': 'kefu', 'KEY_PREFIX': 'kefu',
'TIMEOUT': 86400, #one day 'TIMEOUT': 86400, #one day
}, },
......
...@@ -22,11 +22,11 @@ RAVEN_CONFIG = { ...@@ -22,11 +22,11 @@ RAVEN_CONFIG = {
DATABASES = { DATABASES = {
'default': { # mysql 'default': { # mysql
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': 'mars', 'NAME': 'mars_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3506', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", "charset": "utf8mb4",
...@@ -34,7 +34,7 @@ DATABASES = { ...@@ -34,7 +34,7 @@ DATABASES = {
}, },
'gaia': { 'gaia': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': 'zhengxing', 'NAME': 'zhengxing_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
...@@ -46,11 +46,11 @@ DATABASES = { ...@@ -46,11 +46,11 @@ DATABASES = {
}, },
'mars-master': { # mysql 'mars-master': { # mysql
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': 'mars', 'NAME': 'mars_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3506', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", "charset": "utf8mb4",
...@@ -58,7 +58,7 @@ DATABASES = { ...@@ -58,7 +58,7 @@ DATABASES = {
}, },
'gaia-master': { # mysql 'gaia-master': { # mysql
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': 'zhengxing', 'NAME': 'zhengxing_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
...@@ -70,11 +70,11 @@ DATABASES = { ...@@ -70,11 +70,11 @@ DATABASES = {
}, },
'zeus': { 'zeus': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库 'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'zeus', 'NAME': 'zeus_test',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3506', 'PORT': '3306',
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情 "charset": "utf8mb4", # 为了支持emoji表情
......
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="deploy" version="1.0"/>
<config name="log_dir" value="/data/log/mimas/app"/>
<config name="sentry_dsn" value="http://3a94a317d15a4bf5885c5714e79854c9:ed5e90c31821472c95802625dd7c4651@sentry.igengmei.com/104"/>
</gm_rpcd_config>
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="deploy" version="1.0"/>
<config name="log_dir" value="/data/log/passport"/>
</gm_rpcd_config>
REDIS = { REDIS = {
'host':'dev-redis', 'host':'worn-octopus-redis-ha-master-svc',
'port':6379, 'port':6379,
'db':0, 'db':0,
} }
REDIS_SENTINEL = [('192.168.2.6', 26379)] REDIS_SENTINEL = [('worn-octopus-redis-ha-sentinel', 26379)]
REDIS_MASTER_GROUP_NAME = 'mymaster'
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="deploy" version="1.0"/>
<config name="log_dir" value="/data/log/plutus"/>
</gm_rpcd_config>
...@@ -4,7 +4,7 @@ DEBUG = False ...@@ -4,7 +4,7 @@ DEBUG = False
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库 'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'plutus', 'NAME': 'plutus_hotfix',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
...@@ -19,7 +19,7 @@ DATABASES = { ...@@ -19,7 +19,7 @@ DATABASES = {
CACHES = { CACHES = {
"default": { "default": {
"BACKEND": "django_redis.cache.RedisCache", "BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://192.168.168.142:6379/113", "LOCATION": "redis://192.168.168.142:6379/11",
"OPTIONS": { "OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient", "CLIENT_CLASS": "django_redis.client.DefaultClient",
} }
......
{
"websocket_baseurl": "wss://poll-be-service/",
"metadata_redis_url": "redis://192.168.168.142/3",
"data_redis_url": "redis://192.168.168.142/4",
"browser_endpoint": {
"log_dir": "/data/log/poll-be/app"
},
"management_interface": {
"log_dir": "/data/log/poll-mi/app"
},
"sentry_dsn": "http://de25493bc7c947a7a6670a57e2fb00a2:cf711e64d7264ac2b3b8f1ea7af9f19d@sentry.igengmei.com/32"
}
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="deploy" version="1.0"/>
<config name="log_dir" value="/data/log/poll/app"/>
</gm_rpcd_config>
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="deploy" version="1.0"/>
<config name="log_dir" value="/data/log/push2/app"/>
</gm_rpcd_config>
# django database settings # django database settings
DATABASES = { DATABASES = {
'default': {}, 'default': {},
'gaia': { 'push': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.db.backends.mysql',
'NAME': 'push', 'NAME': 'push_hotfix',
'USER': 'work', 'USER': 'work',
'PASSWORD': 'Gengmei1', 'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3406', # zhengxing库rds端口 'PORT': '3306', # zhengxing库rds端口
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", "charset": "utf8mb4",
......
# basic config # basic config
DEBUG = False DEBUG = True
TIME_ZONE = 'Asia/Shanghai' TIME_ZONE = 'Asia/Shanghai'
MAX_USER_COUNT = 128 # 批量推送一次最多允许推送的用户数(无需修改) MAX_USER_COUNT = 128 # 批量推送一次最多允许推送的用户数(无需修改)
CELERY_BROKER_URL = 'redis://192.168.168.142/0' # redis地址 CELERY_BROKER_URL = 'redis://192.168.168.142/11' # redis地址
REDIS = {
'throttle': {
'host': '192.168.168.142', 'port': 6379, 'db': 1
}
}
CELERY_DSN = "http://3a94a317d15a4bf5885c5714e79854c9:ed5e90c31821472c95802625dd7c4651@sentry.igengmei.com/104"
THROTTLE_ON = False
PERSONAL_PUSH_ON = True
This diff is collapsed.
{ {
"mysql": { "mysql": {
"prod": { "prod": {
"host": "rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com", "host": "rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com",
"db": "zhengxing_test" "db": "zhengxing_test"
}, },
"slave": { "slave": {
"host": "rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com", "host": "rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com",
"db": "zhengxing_test" "db": "zhengxing_test"
}, },
"hera":{ "hera":{
"host": "rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com", "host": "rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com",
"db": "hera_test" "db": "hera_test"
}, },
"doris":{ "doris":{
"host": "rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com", "host": "rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com",
"db": "doris_test" "db": "doris_test"
} }
}, },
......
{"dsn": "http://c5b4ede52bc6452182565b529735a090:0324e8fff118445a9b38576213b8e759@sentry.igengmei.com/120"} {
"dsn": "http://76cf5d6006ad4688a9060d7de3a80396:e652d6a0c45547008943056ec51731c6@sentry.igengmei.com/55"
}
{ {
"kafka": { "kafka": {
"hosts": [{ "hosts": [{
"host": "kafka.dev.gengmei", "host": "192.168.168.143",
"port": 9092 "port": 9092,
"_comment": "zk-kafka.paas"
}], }],
"default_topic": "gm-logging-test", "default_topic": "gm-logging-paas",
"topics": { "topics": {
"inspect": "gm-logging-test.inspect", "py_logging": "gm-logging-paas.py-logging",
"app": "doris" "inspect": "gm-logging-paas.inspect",
"app": "gm-logging-paas.app"
} }
} }
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment