1. 程式人生 > 實用技巧 >azure web應用部署_2015年更新:如何在Azure Web Apps上安裝Node.js Ghost部落格軟體(以及“部署到Azure”按鈕)...

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 to Azure Button

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. ;)

確保確保仔細檢查您的設定,“網站位置”現在是字母順序,並且您可能不希望在巴西寫部落格。 ;)

image

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門戶中管理您的網站。 我為這個例子做了一個免費的,如果您願意的話,也可以。

Ghost in the Azure Portal

And it works just great!

而且效果很好!

Ghost running on Azure

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。



Sponsor: Big thanks to our friends at Raygun for sponsoring the feed this week. I use Raygun myself and I encourage you to explore their stuff, it's really something special. Get full stack error reporting with Raygun! Detect and diagnose problems across your entire application. Raygun supports every major programming language and platform - Try Raygun FREE!

贊助商:非常感謝我們在Raygun朋友為本週的飼料提供贊助。 我自己使用Raygun,並鼓勵您探索他們的東西,這確實很特別。 使用Raygun獲取完整的堆疊錯誤報告! 在整個應用程式中檢測和診斷問題。 Raygun支援所有主要的程式語言和平臺-免費試用Raygun!

關於斯科特 (About Scott)

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

斯科特·漢塞爾曼(Scott Hanselman)是前教授,前金融首席架構師,現在是演講者,顧問,父親,糖尿病患者和Microsoft員工。 他是一位失敗的單口相聲漫畫家,一個玉米種植者和一本書的作者。

臉書 推特 訂閱 About 關於 Newsletter 時事通訊 Hosting By 主持人 託管在Azure應用服務中

翻譯自: 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應用部署