Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the recommended way to deploy a Django app on IIS?

Tags:

iis

django

azure

I've recently signed up for an Azure account as I am developing a Django application and porting it from Heroku. I've created a Windows Server 2012 vm on Azure and I've managed to copy my application and install its dependencies on the VM. I've also managed to run it directly on the command line. Now I'd like to run it under IIS. I've searched around the net and it seems there are many ways to skin this cat. I'd like to know the best way. Which approach would a professional who is deploying a production site use? I'm having a hard time finding out what the best approach is. The docs on the Django site are reportedly outdated and it points to another site which explains how to install Django with performance tools. The documentation on MSDN only includes tutorials that show installing under Windows and running from the command line or installing to an Ubuntu VM. I'm looking to get some guidance from someone who has done this and could explain the merits and weaknesses of one method over another. Thanks in advance!

like image 212
Cliff Avatar asked Dec 05 '12 19:12

Cliff


Video Answer


2 Answers

Take a look at the different options on the offical Windows Azure website:

  • Django Hello World Web Application: This tutorial explains how you can install your Django application in IIS on a Virtual Machine. Note that this is IaaS, so if you want to want to use this for a production deployment you'll probably want to scale out. This means its up to you to add the required VMs, deploy your application on all these VMs, manage updates, manage security, ...

  • Creating Web Sites with Django: This tutorial explains how to deploy your Django application to Windows Azure Web Sites. I think this is what you're looking for. The advantage here is that you can start free (shared with other websites, good for testing), then move to shared (still shared hosting, custom domain name, great for when you want to launch your app) and finally move to reserved (dedicated machine). The advantage here is that you can easily scale out, even to multiple reserved instances, without having to worry about deployment or managing the Virtual Machines. You can use Visual Studio or the Git/Bitbucket/TFS integration to deploy and Windows Azure Web Sites will make sure your site is deployed instantly (even if you're running in reserved mode with multiple instances)

like image 191
Sandrino Di Mattia Avatar answered Oct 14 '22 10:10

Sandrino Di Mattia


We've been at DjangoCon this week helping people get Django Sites on Azure.

We've created a tutorial and repo to help people get started with a minimal amount of code.

  • Tutorial
  • Base Repo

Check out the forked projects to find some sweet examples attendees have made:

  • Batavia - Python 3 in the Browser - Repo
  • Webcat - Ascii Kittens in the Browser - Repo
  • DJReader - Reader Clone - Repo
  • Health Recommendations - Repo
like image 33
Tim Reilly Avatar answered Oct 14 '22 10:10

Tim Reilly