From 35bd784e6a8d5eda4a3a2479b091aa0302818ea0 Mon Sep 17 00:00:00 2001 From: zhaoyingbo Date: Fri, 26 Jul 2024 09:20:53 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 2 +- .gitea/workflows/cicd.yaml | 8 ++++---- .gitea/workflows/miflow.yml | 2 +- docker-compose.yml | 6 +++--- index.ts | 2 +- package.json | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ce674c8..ae97a31 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "ci_monitor", + "name": "gitlab_monitor", "image": "mcr.microsoft.com/devcontainers/typescript-node:20", "customizations": { "vscode": { diff --git a/.gitea/workflows/cicd.yaml b/.gitea/workflows/cicd.yaml index 90765a5..af9a498 100644 --- a/.gitea/workflows/cicd.yaml +++ b/.gitea/workflows/cicd.yaml @@ -25,7 +25,7 @@ jobs: uses: docker/build-push-action@v4 with: push: true - tags: git.yingbo.im:333/zhaoyingbo/ci_monitor:${{ github.sha }} + tags: git.yingbo.im:333/zhaoyingbo/gitlab_monitor:${{ github.sha }} deploy: needs: build-image @@ -44,7 +44,7 @@ jobs: key: ${{ secrets.SERVER_KEY }} port: ${{ secrets.SERVER_PORT }} source: docker-compose.yml - target: /home/${{ secrets.SERVER_USERNAME }}/docker/ci_monitor + target: /home/${{ secrets.SERVER_USERNAME }}/docker/gitlab_monitor # 登录服务器,执行docker-compose命令 - name: Login to the server and execute docker-compose command uses: appleboy/ssh-action@master @@ -55,6 +55,6 @@ jobs: port: ${{ secrets.SERVER_PORT }} script: | docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} git.yingbo.im:333 - cd /home/${{ secrets.SERVER_USERNAME }}/docker/ci_monitor + cd /home/${{ secrets.SERVER_USERNAME }}/docker/gitlab_monitor sed -i "s/sha/${{ github.sha }}/g" docker-compose.yml - docker compose up -d --force-recreate --no-deps ci_monitor + docker compose up -d --force-recreate --no-deps gitlab_monitor diff --git a/.gitea/workflows/miflow.yml b/.gitea/workflows/miflow.yml index e25b27c..11f6585 100644 --- a/.gitea/workflows/miflow.yml +++ b/.gitea/workflows/miflow.yml @@ -25,4 +25,4 @@ jobs: uses: docker/build-push-action@v4 with: push: true - tags: micr.cloud.mioffice.cn/egg/ci_monitor:${{ github.sha }} + tags: micr.cloud.mioffice.cn/egg/gitlab_monitor:${{ github.sha }} diff --git a/docker-compose.yml b/docker-compose.yml index da5cffc..36686d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,9 @@ version: "3" services: - ci_monitor: - image: git.yingbo.im:333/zhaoyingbo/ci_monitor:sha - container_name: ci_monitor + gitlab_monitor: + image: git.yingbo.im:333/zhaoyingbo/gitlab_monitor:sha + container_name: gitlab_monitor restart: always ports: - 3001:3000 diff --git a/index.ts b/index.ts index bd56dde..819fe06 100644 --- a/index.ts +++ b/index.ts @@ -10,7 +10,7 @@ const server = Bun.serve({ async fetch(req) { try { const url = new URL(req.url) - const prefix = "/gitlab" + const prefix = "/gitlab_monitor" // 根路由 if (url.pathname === `${prefix}/`) return netTool.ok("hello, glade to see you!") diff --git a/package.json b/package.json index bdf0a27..324c34a 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ci_monitor", + "name": "gitlab_monitor", "module": "index.ts", "type": "module", "scripts": {