Giter Site home page Giter Site logo

django-girls-azure-gitbook's Introduction

Deploying Your Django App on Azure

Prerequisites

  • Have an active Microsoft Azure account with webapp access
  • Have your django code already up on github

Before we start

  1. Download and extract this zip file and add the contents (ptvs_virtualenv_proxy.py, runtime.txt, requirements.txt, web.config ) to your root project folder (same level as manage.py)
  2. Add those files to your git repo and push it up to github

Deploying!

image

  1. Click on + New

  2. Click on Web + Mobile

  3. Click on Web App image

  4. Change your app name to something you want. The URL will be whatyouchoose.azurewebsites.net and add the same name for the New Resource Group Name

  5. Click on App Service and click on + Create New in the next tab

  6. Add an App Service Plan name. I suggest east-asia

  7. Click on Location and choose East Asia

  8. Click on OK

  9. Click on Pin to dashboard and then click Create and wait :) image

  10. After the app has been created, type in github in the settings search bar

  11. Click on Deployment Source

  12. Click on Choose Source and choose Github

  13. Click on Authorization

  14. Click on Authorize and click Approve

image

  1. Click on Choose Project
  2. Click on your Django Girls blog project on the right side
  3. Click on OK.

image

  1. Wait for your project to build. It will take a few minutes. Take a break! image

  2. Click on the Microsoft Azure logo to go back to the dashboard

  3. Click on your newly created app. image

  4. Click on Tools

  5. Click on Kudu

  6. Click on Go -> and it will open a new tab/window. image

  7. Click on Debug Console

  8. Click on PowerShell image

  9. Within the console, type in cd site\wwwroot

  10. Then type in env\Scripts\python manage.py migrate and then wait for the migration to finish image

  11. To create the superuser on the site, Type in env\Scripts\python manage.py shell

  12. After Python 3.4.3 ... appears, press enter on your keyboard

  13. Type in from django.contrib.auth.models import User and press enter

  14. Type in User.objects.create_superuser('USERNAME', 'EMAILADDRESS', 'PASSWORD') MAKE SURE YOU CHANGE THE USERNAME, EMAIL ADDRESS AND PASSWORD. And press enter

  15. Type in exit() and press enter. Go back to the previous tab/window where the Azure Dashboard is image

  16. Click on the URL and visit your new site LIVE on the internet!

django-girls-azure-gitbook's People

Contributors

gitbook-bot avatar samypesse avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.