Azure App Service已成功部署,但是API网站需要很长时间才能更改

发布于 2025-02-05 12:48:41 字数 1163 浏览 3 评论 0原文

我有一个.NET 6项目,并使用Gi​​tHub操作来进行连续部署。当我进行更改并重新部署它时。工作流程成功,但是服务器需要很长时间(7-9小时)才能更改

我已尝试重新运行工作流,但没有工作

我的工作流文件

name: Build and deploy container app to Azure Web App - CityTourist

on:
 push:
  branches:
   - main
pull_request:
branches: [main]

workflow_dispatch:

jobs:
build:
runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v2

- name: Set up Docker Buildx
  uses: docker/setup-buildx-action@v1

- name: Docker build and push
  uses: mr-smithers-excellent/docker-build-push@v5
  with:
    image: donephit/city-discover-tourist-server
    tags: v1, latest
    registry: docker.io
    username: ${{ secrets.DOCKER_USERNAME }}
    password: ${{ secrets.DOCKER_PASSWORD }}

deploy:
runs-on: ubuntu-latest
needs: build
environment:
  name: 'production'
  url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Deploy to Azure Web App
  id: deploy-to-webapp
  uses: azure/webapps-deploy@v2
  with:
    app-name: 'CityTourist'
    slot-name: 'production'
    publish-profile: ${{ secrets.AzureAppService_PublishProfile_b411f9150dc04ec7a5df33a041e87f5f }}
    images: donephit/city-discover-tourist-server

I have a .net 6 project and used Github action to make the continuous deployment. When I made changes and re-deployed it. The workflow run successful but The server takes a very long time(7-9 hours) to have a changed

I have been tried re-run the workflow but did not work

My workflow file

name: Build and deploy container app to Azure Web App - CityTourist

on:
 push:
  branches:
   - main
pull_request:
branches: [main]

workflow_dispatch:

jobs:
build:
runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v2

- name: Set up Docker Buildx
  uses: docker/setup-buildx-action@v1

- name: Docker build and push
  uses: mr-smithers-excellent/docker-build-push@v5
  with:
    image: donephit/city-discover-tourist-server
    tags: v1, latest
    registry: docker.io
    username: ${{ secrets.DOCKER_USERNAME }}
    password: ${{ secrets.DOCKER_PASSWORD }}

deploy:
runs-on: ubuntu-latest
needs: build
environment:
  name: 'production'
  url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Deploy to Azure Web App
  id: deploy-to-webapp
  uses: azure/webapps-deploy@v2
  with:
    app-name: 'CityTourist'
    slot-name: 'production'
    publish-profile: ${{ secrets.AzureAppService_PublishProfile_b411f9150dc04ec7a5df33a041e87f5f }}
    images: donephit/city-discover-tourist-server

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

三人与歌 2025-02-12 12:48:41

此问题通常是由应用程序级问题引起的,例如缓慢的网络请求,效率低下的应用程序代码或数据库查询,高内存/CPU使用情况或由于错误而导致的应用程序崩溃。

对此进行故障排除分为三个不同的步骤,必须按以下顺序遵循:

  1. 观察和监视应用程序行为
  2. 收集数据
  3. 缓解问题,

请参阅此故障排除文档有关更多信息。

This problem can be frequently caused by application-level issues, such as slow network requests, inefficient application code or database queries, high memory/CPU usage, or application crashes due to an error.

Troubleshooting for this is divided into three different steps that must be followed in the following order:

  1. Observe and monitor application behavior
  2. Collect data
  3. Mitigate the issue

Refer this troubleshoot document for more information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文