【问题标题】:Deploy yeoman angular-fullstack project to Azure将 yeoman angular-fullstack 项目部署到 Azure
【发布时间】:2015-06-09 23:59:45
【问题描述】:

您将如何将angular-fullstack Yeoman 生成器的输出部署到 Azure?生成器产生这样的输出,即两个文件夹 - clientserver

├── client
│   ├── app                 - All of our app specific components go in here
│   ├── assets              - Custom assets: fonts, images, etc…
│   ├── components          - Our reusable components, non-specific to to our app
│
├── e2e                     - Our protractor end to end tests
│
└── server
    ├── api                 - Our apps server api
    ├── auth                - For handling authentication with different auth strategies
    ├── components          - Our reusable or app-wide components
    ├── config              - Where we do the bulk of our apps configuration
    │   └── local.env.js    - Keep our environment variables out of source control
    │   └── environment     - Configuration specific to the node environment
    └── views               - Server rendered views

我想将它部署到 Microsoft Azure,最好使用 Git deploy。我该怎么办?

更新

这是 Azure 中的部署文件结构。

【问题讨论】:

    标签: angularjs git azure yeoman azure-web-app-service


    【解决方案1】:

    这是简短的版本:

    1. 在 Azure 中创建一个新的空白 Web 应用程序。
    2. 在部署选项中,选择“设置持续部署”。
    3. 选择“本地 Git 存储库”。

    这将为您提供一个 Git Remote 用于空白的 azure Web 应用程序,以便您推送到它。这意味着您可以这样做:

    git remote add azure [URL for remote repository]
    git push azure master
    

    Here 是更长的版本(它适用于节点应用程序 - 但适用相同的概念)。

    【讨论】:

    • 我已经尝试了几次 - 我只是收到 500 错误,没有任何显示,只是一个空白页。部署 angular-fullstack 项目时似乎还需要其他一些东西。
    • @StuartHallows 您可能需要进行一些重新配置。我注意到 angular-fullstack 使用 mongodb - 这显然不会在 Azure 上开箱即用。这里有一些关于 Azure 上 mongodb 的信息:docs.mongodb.org/ecosystem/platforms/windows-azure
    • 我设置了 Mongo,这不是问题。事实上,有一个服务器和客户端文件夹,我不认为 Azure 正在处理这个问题。通常 Azure 会检测到 Node 应用程序已部署并设置一些配置。在这种情况下不会发生这种情况,我不知道如何设置。
    • 你必须在你的 web.config 上创建一个重写规则,但我仍然在找出正确的设置
    猜你喜欢
    • 2015-04-29
    • 2015-05-18
    • 1970-01-01
    • 2016-10-23
    • 1970-01-01
    • 1970-01-01
    • 2017-11-27
    • 2019-07-29
    • 1970-01-01
    相关资源
    最近更新 更多