Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Deploying your django application

Deploying your django application

My Speaker session at Forloop Ibadan

Obi Uchenna David

June 03, 2017
Tweet

More Decks by Obi Uchenna David

Other Decks in Technology

Transcript

  1. What We'll Cover •Introduction to Django • What, Why, Who?

    •Setting up development environment •Demo project – "The #Covfefe blog" •Deployment
  2. What? • Open source Web framework (MTV) • Written in

    python • Encourages rapid development and clean, pragmatic design
  3. Why? • Ridiculously fast (C2L) • Versatile • Easy to

    work with • Scalable (shared-nothing architecture) • Secure
  4. Setting up development environment • Being a Python Web framework,

    Django requires Python. Python includes a lightweight database called SQLite so you won’t need to set up a database just yet. • Get the latest version of Python at https://www.python.org/downloads/ or with your operating system’s package manager. • Virtualenv - virtualenv is a tool to create isolated Python environments • Install django via pip
  5. Deployment • Choosing a Server • Deployment options • Paas:

    Heroku, pythonanywhere • VPS: Digitalocean, Linode, Mediatemple • Automating Deployment with Fabric
  6. Paas: Heroku • Define a Procfile • requirements.txt • runtime.txt

    • Django Whitenoise • SSL via Let's encrypt
  7. VPS: DigitalOcean • Cloud Infrastructure provider • Root access •

    Unlimited number of Droplets • One click installations • Low Prices
  8. Nginx • is an open source, lightweight, high-performance web server

    or proxy server. • The Gunicorn "Green Unicorn" is a Python Web Server Gateway Interface (WSGI) • Uwsgi is a server written in C, it is not meant to run stand-alone but has to be placed behind a webserver
  9. Fabric • Fabric is a Python (2.5-2.7) library and command-line

    tool for streamlining the use of SSH for application deployment or systems administration tasks.
  10. Point to note Click to add text • Do not

    re-invent the wheel • Compare your options and see which works best • Finish at least one complete tutorial on django • Understand before you copy and paste
  11. Resources Click to add text • Djangoproject.com • Fullstackpython.com •

    Thenewboston django youtube tutorials • https://www.facebook.com/notes/4117412688 77125/Getting_Started_Django/740106062707 309/ • Djangobook.com • Djangopy.org