From d7c9442aae21dbaf1870c136353ff1cc5f161d0c Mon Sep 17 00:00:00 2001 From: "DESKTOP-V763RJ7\\Administrator" <835606593@qq.com> Date: Fri, 16 Jan 2026 22:09:44 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E7=AB=AF=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.dev.yaml | 9 ++++++++- config/config.go | 9 +++++---- config/config.prod.yaml | 9 ++++++++- deploy/Jenkinsfile | 4 ++-- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/config/config.dev.yaml b/config/config.dev.yaml index 07d8977..d84d369 100644 --- a/config/config.dev.yaml +++ b/config/config.dev.yaml @@ -8,6 +8,13 @@ log: maxBackups: 100 maxAge: 7 +metric: + prometheus: + address: "0.0.0.0" + port: 18801 + jaeger: + endpoint: "47.108.184.184:4317" + db: etcd: endpoints: [ "10.0.40.9:2379" ] @@ -27,7 +34,7 @@ db: serve: grpc: address: "10.0.40.199" - port: 8602 + port: 18800 ttl: 20 wxMini: diff --git a/config/config.go b/config/config.go index 0367e45..c96c533 100644 --- a/config/config.go +++ b/config/config.go @@ -5,10 +5,11 @@ import "git.hlsq.asia/mmorpg/service-common/config" const path = "./config" type Config struct { - App *config.AppConfig `yaml:"app"` - Log *config.LogConfig `yaml:"log"` - DB *config.DBConfig `yaml:"db"` - Serve *config.ServeConfig `yaml:"serve"` + App *config.AppConfig `yaml:"app"` + Log *config.LogConfig `yaml:"log"` + Metric *config.MetricConfig `yaml:"metric"` + DB *config.DBConfig `yaml:"db"` + Serve *config.ServeConfig `yaml:"serve"` WxMini *struct { AppID string `yaml:"appid"` Secret string `yaml:"secret"` diff --git a/config/config.prod.yaml b/config/config.prod.yaml index efc47e2..f7fa99f 100644 --- a/config/config.prod.yaml +++ b/config/config.prod.yaml @@ -8,6 +8,13 @@ log: maxBackups: 100 maxAge: 7 +metric: + prometheus: + address: "0.0.0.0" + port: 18801 + jaeger: + endpoint: "172.18.28.0:4317" + db: etcd: endpoints: [ "172.18.28.0:2379" ] @@ -27,7 +34,7 @@ db: serve: grpc: address: "172.18.28.0" - port: 8602 + port: 18800 ttl: 20 wxMini: diff --git a/deploy/Jenkinsfile b/deploy/Jenkinsfile index 53c681e..ae79779 100644 --- a/deploy/Jenkinsfile +++ b/deploy/Jenkinsfile @@ -51,7 +51,7 @@ pipeline { stage('Build Go Binary') { agent { docker { - image 'golang:1.23.1-alpine' + image 'golang:1.24.0-alpine' reuseNode true args '-u root:root -v $GO_MOD_CACHE_DIR:/go/pkg/mod -v $GO_BUILD_CACHE_DIR:/root/.cache/go-build' } @@ -109,7 +109,7 @@ pipeline { docker run -d \\ --name ${env.APP_NAME} \\ --restart unless-stopped \\ - -p 8602:8602 \\ + -p 18800-18801:18800-18801 \\ --env XH_G_ENV=prod \\ -v /root/service/logs/user_log/:/app/logs \\ ${env.IMAGE_TAG}