diff --git a/.drone.yml b/.drone.yml index a20233a2..2dc6d4a9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ type: ssh name: master-machine server: - host: 38.38.251.113:34156 + host: 38.55.194.49:3422 user: root password: from_secret: www_password @@ -19,22 +19,12 @@ steps: DOCKER_TOKEN: from_secret: docker_token commands: - - docker login git.oceanpay.cc -u $DOCKER_LOGIN -p $DOCKER_TOKEN - - docker build -t git.oceanpay.cc/danial/kami_backend_${DRONE_BRANCH}:${DRONE_BUILD_NUMBER} -f manifest/docker/Dockerfile . --build-arg USE_PROXY=0 - - docker tag git.oceanpay.cc/danial/kami_backend_${DRONE_BRANCH}:${DRONE_BUILD_NUMBER} git.oceanpay.cc/danial/kami_backend_${DRONE_BRANCH}:latest - - docker push git.oceanpay.cc/danial/kami_backend_${DRONE_BRANCH}:${DRONE_BUILD_NUMBER} - - docker push git.oceanpay.cc/danial/kami_backend_${DRONE_BRANCH}:latest - - docker logout git.oceanpay.cc -# - name: deploy to docker compose -# environment: -# DOCKER_LOGIN: -# from_secret: docker_login -# DOCKER_TOKEN: -# from_secret: docker_token -# commands: -# - docker login git.oceanpay.cc -u $DOCKER_LOGIN -p $DOCKER_TOKEN -# - BRANCH=${DRONE_BRANCH} VERSION=${DRONE_BUILD_NUMBER} docker compose -f /data/kami/docker-compose.yaml --profile kami_backend up -d -# - docker logout git.oceanpay.cc + - docker login git.domainpay.top -u $DOCKER_LOGIN -p $DOCKER_TOKEN + - docker build -t git.domainpay.top/danial/kami_backend_${DRONE_BRANCH}:${DRONE_BUILD_NUMBER} -f manifest/docker/Dockerfile . --build-arg USE_PROXY=0 + - docker tag git.domainpay.top/danial/kami_backend_${DRONE_BRANCH}:${DRONE_BUILD_NUMBER} git.domainpay.top/danial/kami_backend_${DRONE_BRANCH}:latest + - docker push git.domainpay.top/danial/kami_backend_${DRONE_BRANCH}:${DRONE_BUILD_NUMBER} + - docker push git.domainpay.top/danial/kami_backend_${DRONE_BRANCH}:latest + - docker logout git.domainpay.top trigger: branch: diff --git a/docker-compose.yml b/docker-compose.yml index 39b81f20..c5e530b8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: kami-db-migrate: - image: git.oceanpay.cc/danial/kami-db-migrate:latest + image: git.domainpay.top/danial/kami-db-migrate:latest container_name: kami-migrate profiles: - all @@ -20,7 +20,7 @@ services: labels: createdBy: Developer kami_merchant: - image: git.oceanpay.cc/danial/kami_merchant_$BRANCH:$VERSION + image: git.domainpay.top/danial/kami_merchant_$BRANCH:$VERSION container_name: kami-merchant-$BRANCH-$VERSION restart: always environment: @@ -41,7 +41,7 @@ services: labels: createdBy: Developer kami_backend: - image: git.oceanpay.cc/danial/kami_backend_$BRANCH:$VERSION + image: git.domainpay.top/danial/kami_backend_$BRANCH:$VERSION container_name: kami-backend-$BRANCH-$VERSION restart: always environment: @@ -65,7 +65,7 @@ services: labels: createdBy: Developer kami_shop: - image: git.oceanpay.cc/danial/kami_shop_$BRANCH:$VERSION + image: git.domainpay.top/danial/kami_shop_$BRANCH:$VERSION container_name: kami-shop-$BRANCH-$VERSION restart: always environment: @@ -86,7 +86,7 @@ services: labels: createdBy: Developer kami_gateway: - image: git.oceanpay.cc/danial/kami_gateway_$BRANCH:$VERSION + image: git.domainpay.top/danial/kami_gateway_$BRANCH:$VERSION container_name: kami-gateway-$BRANCH-$VERSION restart: always environment: @@ -110,7 +110,7 @@ services: labels: createdBy: Developer kami_boss: - image: git.oceanpay.cc/danial/kami_boss_$BRANCH:$VERSION + image: git.domainpay.top/danial/kami_boss_$BRANCH:$VERSION container_name: kami-boss-$BRANCH-$VERSION restart: always environment: @@ -131,7 +131,7 @@ services: labels: createdBy: Developer kami_frontend: - image: git.oceanpay.cc/danial/kami_frontend_$BRANCH:$VERSION + image: git.domainpay.top/danial/kami_frontend_$BRANCH:$VERSION container_name: kami-frontend-$BRANCH-$VERSION restart: always environment: @@ -149,7 +149,7 @@ services: - frontend - all kami-spider-monorepo: - image: git.oceanpay.cc/danial/kami-spider-monorepo-$BRANCH:$VERSION + image: git.domainpay.top/danial/kami-spider-monorepo-$BRANCH:$VERSION container_name: kami-spider-monorepo-$BRANCH-$VERSION restart: always profiles: @@ -177,7 +177,7 @@ services: labels: createdBy: Developer jd-token-server: - image: git.oceanpay.cc/danial/jd-token-server-$BRANCH:$VERSION + image: git.domainpay.top/danial/jd-token-server-$BRANCH:$VERSION container_name: jd-token-server-$BRANCH-$VERSION restart: always profiles: diff --git a/internal/errHandler/handler.go b/internal/errHandler/handler.go index 512a26d6..11c13d4c 100644 --- a/internal/errHandler/handler.go +++ b/internal/errHandler/handler.go @@ -3,6 +3,7 @@ package errHandler import ( "github.com/gogf/gf/v2/errors/gcode" "github.com/gogf/gf/v2/errors/gerror" + "github.com/gogf/gf/v2/os/glog" "golang.org/x/net/context" ) @@ -11,6 +12,7 @@ func WrapError(ctx context.Context, code gcode.Code, err error, message ...strin return nil } newMsg := "" + glog.Error(ctx, "错误", err) if len(message) != 0 { newMsg = message[0] } else {