【问题标题】:Gitlab CI/CD - deploy node application on Azure Linux WebAppGitlab CI/CD - 在 Azure Linux WebApp 上部署节点应用程序
【发布时间】:2021-02-11 23:04:18
【问题描述】:
image: node:9.2.0

stages:
  - build

build:
  stage: build
  script: 
  - set NODE_ENV=production
  - npm install
  - npm run transpile
  - ls
  - cd dist-server
  - ls
  - node /bin/www
  #- npm run prod
  artifacts:
   expire_in: 1 day
   paths:
   - dist/

以上是我的 ci yaml 文件,任何人都可以分享如何在 linux Azure Web App 上部署它。

【问题讨论】:

标签: node.js gitlab yaml azure-web-app-service continuous-deployment


【解决方案1】:

没有现成的解决方案可以使用 Gitlab 部署到 Azure。

您可以在 Gitlab 管道中执行以下过程:

  • 构建 docker 容器
  • 将 docker 容器推送到 Gitlab Container Registry(包含在您的 Gitlab 存储库中)
  • 运行 curl 命令以触发 Azure 应用服务 webhook 进行更新

您可以在 Azure 中托管这个 Docker 容器(创建应用服务后,您可以在 Deployment 设置中找到 webhook url)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-16
    • 2017-09-01
    • 1970-01-01
    • 2020-12-13
    • 1970-01-01
    • 2017-05-21
    • 1970-01-01
    相关资源
    最近更新 更多