azure web应用部署_2015年更新:如何在Azure Web Apps上安装Node.js Ghost博客软件(以及“部署到Azure”按钮)

azure web应用部署

azure web应用部署

What? Didn't I blog about this before? Yes, in fact, in 2013 I did an article showing how to get Ghost - a lovely nodejs-based blogging app - running on Azure.  The instructions involved making some changes to Ghost itself to make it friendlier to Azure and doing a git deploy. Since this post both Ghost AND Azure have become friendlier. ;)

什么? 我以前没有写过博客吗? 是的,事实上,2013年,我写了一篇文章,展示了如何使Ghost(一个基于nodejs的可爱博客应用程序)在Azure上运行。 这些说明涉及到对Ghost本身进行一些更改以使其对Azure友好,并进行git部署。 自从这篇文章以来,Ghost和Azure都变得更加友好。 ;)

Fast forward two years and the instructions have changed! In fact, they've gotten WAY easier. You can still theoretically follow most of my old instructions, but these new ones are WAY better, so just do it this way.

快进两年了,说明也变了! 实际上,他们变得更容易了。 从理论上讲,您仍然可以按照我的大多数旧说明进行操作,但是这些新说明会更好,因此,请按照这种方式进行操作。

第1步 (STEP 1)

There's a "Deploy to Azure" button up at http://deploy.azure.com that you can get an put in YOUR GitHub project's Readme.md so folks can easily and quickly deploy your app as well!

http://deploy.azure.com上有一个“部署到Azure”按钮,您可以在您的GitHub项目的Readme.md中加入该按钮,以便人们也可以轻松,快速地部署您的应用程序!

Here's what you do. Head over to the GitHub repository for Ghost Azure. Click Deploy to Azure. That will automatically install Ghost for you in Azure.

这就是你要做的。 前往Ghost Azure的GitHub存储库。 单击“部署到Azure” 。 这将自动在Azure中为您安装Ghost。

The Deploy.Azure.com website will look at the repository from the HTTP Referer header. You'll end up with a nice form like this.

Deploy.Azure.com网站将通过HTTP Referer标头查看存储库。 您最终会得到一个像这样的漂亮表单。

DO make sure to double check your settings, the Site Location is alphabetical right now, and you may not want your blog in Brazil. ;)

确保确保仔细检查您的设置,“网站位置”现在是字母顺序,并且您可能不希望在巴西写博客。 ;)

Hit Next, then check the summary that will warn you what's getting created, then hit Deploy. Boom. Azure will actually run through the template and setup Ghost (or whatever app you wanted) automatically.

单击“下一步”,然后检查摘要,该警告会警告您正在创建的内容,然后单击“部署”。 繁荣。 Azure实际上会运行模板并自动设置Ghost(或您想要的任何应用程序)。

  • Note it's setting it up from Source Control as well, although you can certainly change this. For example, you might want to Fork it yourself, and then Deploy.

    请注意,尽管您当然可以更改此设置,但它也可以通过“源代码管理”进行设置。 例如,您可能想要自己分叉,然后部署。
  • However, as this is set up today, you won't get updates until you go to Deployments within the Azure Portal and click Sync. You decide if you want the app to update when new code is committed.

    但是,由于这是今天设置的,因此只有在Azure门户中转到“部署”并单击“同步”后,您才能获取更新。 您可以决定是否要在提交新代码时更新应用程序。

After it's created, you can manage your site in the Azure Portal. I made a little free one for this example, as can you if you like.

创建网站后,您可以在Azure门户中管理您的网站。 我为这个例子做了一个免费的,如果您愿意的话,也可以。

And it works just great!

而且效果很好!

It's not super obvious what to do next. You'll need click the little chevron there, or visit something like /admin, and you'll get redirected to the Ghost setup process online.

接下来做什么不是很明显。 您需要单击那里的小V形燕尾形,或访问/ admin之类的东西,然后将您重定向到在线Ghost设置过程。

image

Now you can start your first post!

现在,您可以开始您的第一篇文章!

My first post in Ghost

这里发生了什么? (What's going on here?)

Felix Rieseberg added a few files to Ghost and has the fork up here on GitHub. The most interesting one is the AzureDeploy.json. This is an Azure Resource Manager template. Here's another simple example from Elliot Hamai for an ASP.NET MVP app. This file tells Azure (and the Deploy to Azure button) what kinds of things it needs to create and actually gives the system enough information to build a whole form for you!

Felix Rieseberg向Ghost添加了一些文件,并在GitHub上进行了分叉。 最有趣的一个是AzureDeploy.json。 这是一个Azure资源管理器模板。 这是Elliot Hamai针对ASP.NET MVP应用程序的另一个简单示例。 该文件告诉Azure(以及“部署到Azure”按钮)需要创建哪些类型的东西,并实际上为系统提供足够的信息来为您构建整个表单!

Maybe this is the perfect time for you to start your own blog! Perhaps you've been putting it off. Go check out my FREE two-hour documentary movie with Rob Conery called Get Involved in Tech! We will get you ready to jump into the world of Social Software Development.

也许这是您开始自己的博客的完美时机! 也许您已经推迟了。 快去看我与罗伯·科纳里(Rob Conery)制作的两小时免费纪录片电影,名为“参与科技之旅”! 我们将为您做好准备,进入社交软件开发领域。

Here's a video of Elliot and I talking about the Deploy to Azure button on Azure Friday. Here's Elliot's blog announcing Deploy to Azure and explaining more.

是Elliot视频,我谈论的Azure Friday的Deploy to Azure按钮。 这是Elliot的博客,宣布部署到Azure并进行了更多说明。

Remember that Ghost is open source and you can learn more at https://ghost.org!

请记住,Ghost是开源的,您可以在https://ghost.org上了解更多信息!

DON'T WANT TO SIGN UP FOR AZURE? You can try Azure out for an hour without signing up for anything. Check out http://try.azurewebsites.net. You can make a PHP, Java, nodejs, Python, ASP.NET web app, or even setup Ghost itself. You can also try out Visual Studio online, which is basically a complete IDE in your browser written entirely in JavaScript.

不想报名参加吗? 您可以试用Azure一个小时,而无需注册任何内容。 查看http://try.azurewebsites.net 。 您可以制作PHP,Java,nodejs,Python,ASP.NET Web应用程序,甚至可以设置Ghost本身。 您还可以在线试用Visual Studio,它基本上是完全用JavaScript编写的浏览器中的完整IDE。

翻译自: https://www.hanselman.com/blog/updated-for-2015-how-to-install-the-nodejs-ghost-blog-software-on-azure-web-apps-and-the-deploy-to-azure-button

azure web应用部署

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值