From 4317592ee9e4835dff2eb4492a79ff8400f70a4c Mon Sep 17 00:00:00 2001 From: dengbiao Date: Fri, 6 Dec 2024 21:11:23 +0800 Subject: [PATCH] update --- etc/task.yml | 54 ++++++++++++++++++++++++++++------------ k8s/container-task.yaml | 55 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 16 deletions(-) create mode 100644 k8s/container-task.yaml diff --git a/etc/task.yml b/etc/task.yml index 6126e20..0aabe35 100644 --- a/etc/task.yml +++ b/etc/task.yml @@ -1,18 +1,14 @@ -# debug release test +# 当前域名 debug: true +curldebug: true prd: false local: true +# 服务器参数 +srv_addr: ':4001' # 缓存 -redis_addr: '120.24.28.6:32572' +redis_addr: '127.0.0.1:6379' +redis_password: '' -app_comm: - url: http://127.0.0.1:5003 - - -admin: - api_aes_key: e{&[^Ft(.~g]1eR-]VO - api_aes_iv: ZV`7<5X]/2brS@sz -# 数据库 db: host: '119.23.182.117:3306' name: 'egg' @@ -22,10 +18,22 @@ db: max_lifetime: 30 max_open_conns: 100 max_idle_conns: 100 - path: 'tmp/task_sql_%v.log' + path: 'tmp/%s.log' + +im_db: + host: '119.23.182.117:3306' + name: 'egg-im' + user: 'root' + psw: 'Fnuo123com@' + show_log: true + max_lifetime: 30 + max_open_conns: 100 + max_idle_conns: 100 + path: 'tmp/%s.log' # 日志 log: + app_name: 'applet' level: 'debug' # 普通日志级别 #debug, info, warn, fatal, panic is_stdout: true time_format: 'standard' # sec, second, milli, nano, standard, iso @@ -34,10 +42,24 @@ log: file_dir: './tmp/' file_max_size: 256 file_max_age: 1 - file_name: 'task.log' + file_name: 'debug.log' +# 连接RabbitMq mq: - host: '116.62.62.35' - port: '5672' - user: 'zhios' - pwd: 'ZHIoscnfnuo123' \ No newline at end of file + host: '120.77.153.180' + port: '15672' + user: 'guest' + pwd: 'guest' + +es: + url: 'http://120.55.48.175:9200' + user: 'elastic' + pwd: 'fnuo123' + +im_business_rpc: + url: im-rpc-business.izhim.com + port: 1005 + +im_logic_rpc: + url: im-rpc-logic.izhim.com + port: 1008 \ No newline at end of file diff --git a/k8s/container-task.yaml b/k8s/container-task.yaml new file mode 100644 index 0000000..d6554ab --- /dev/null +++ b/k8s/container-task.yaml @@ -0,0 +1,55 @@ +kind: Deployment +apiVersion: apps/v1 +# 元数据 +metadata: + name: egg-app-task + namespace: egg + labels: + app: egg-app-task + annotations: + kubesphere.io/creator: admin + kubesphere.io/description: egg-app-task +# deployment主要部分 +spec: + replicas: 1 + selector: + matchLabels: + # 名称与上面的labels对应 + app: egg-app-task + template: + metadata: + labels: + # 名称与上面的matchLabels对应 + app: egg-app-task + spec: + # 声明挂载卷(将外部已存在的pvc、config等挂载进来) + volumes: + # 用于时区校正 + - name: host-time + hostPath: + path: /etc/localtime + type: '' + # 将前面创建的configMap也挂载进来 + - name: egg-app-task-cfg + configMap: + # 这里的名字就是前面创建的configMap的名字 + name: egg-app-task-cfg + defaultMode: 420 + containers: + # 主容器 + - name: egg-app-task-container + # 镜像地址(提前打包好并推送的镜像仓库) + image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/egg-app-task:0.0.1' + # 将前面volume声明的需要用到的pvc、config挂载上来 + volumeMounts: + - name: host-time + readOnly: true + mountPath: /etc/localtime + - name: egg-app-task-cfg # 该名字对应前面volumes声明的名字 + readOnly: true + # 挂载到容器的哪个路径 + mountPath: /var/egg + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst \ No newline at end of file