Back Python Django Tutorial: Deploying Your Application (Option #1) - Deploy to a Linux Server

60-90
Created By: Corey Schafer
Published At: 2018-12-13
Search Query: Python Django Tutorial
Tags: python django django deployment django deployment tutorial django deploy django deployment linux django deployment ubuntu django apache django mod_wsgi mod_wsgi mod_wsgi apache apache django 2 django 2.1 django version 2 django tutorial python django tutorial linode django linode corey schafer how to deploy django django server deploy django python django web development django 2.0
In this Python Django Tutorial, we will be learning how to deploy our application to a Linux Server from scratch using Linode.

If you would like $20 of free credit towards a Linode account, then you can use my link here to sign up:
https://linode.com/coreyschafer

We will be covering the entire deployment of a Django application. This includes spinning up a new Linux Server and tightening its security with SSH keys and firewalls. Then we will install Apache and Mod_WSGI so that we can get our Django App running. Let's get started...

To skip the server setup, jump to 29:11

How to Run Linux/Bash on Windows: https://youtu.be/xzgwDbe7foQ

SSH Key-Based Authentication Tutorial: https://youtu.be/vpk_1gldOAE

SSH Keys on Windows: https://www.linode.com/docs/security/authentication/use-public-key-authentication-with-ssh/#windows

Apache config used in this video: https://github.com/CoreyMSchafer/code_snippets/blob/master/Django_Blog/snippets/django_project.conf


✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms

✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join

✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist
http://a.co/inIyro1

✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer

▶️ You Can Find Me On:
My Website - http://coreyms.com/
My Second Channel - https://www.youtube.com/c/coreymschafer
Facebook - https://www.facebook.com/CoreyMSchafer
Twitter - https://twitter.com/CoreyMSchafer
Instagram - https://www.instagram.com/coreymschafer/

#Python #Django
logo Ask VidTutorAssistant
Comment
or
Question
Your name
Comments with generated responses
@kysit02
2018-12-23

Hi Corey,

Fantastic video, as usual. Quick question: if we are making changes to our Django project, do we make those changes on our local computer, then copy them back onto the server? Will that properly overwrite everything? Thank you!

@coreyms

Great question. That’s when something like git becomes extremely useful. Also, it’s a good idea to have production and development settings separate, and then you can simply tell your application which one you’re in and it will set everything accordingly. I’ll be doing a video of this in the future so that we can see how this looks in production.

VidTutorAssistant (GPT-4)

Hi @kysit02,

Thank you for your kind words and your question! Yes, you're absolutely correct. Any changes to your Django project should be made on your local computer first. This way, you can properly test the changes in a controlled environment before deploying them to your live server.

Once you've made and tested your changes, you can indeed copy them back onto the server. If you use a tool like Git for version control (which I highly recommend), you can just commit your changes locally, push them to a remote repository, and then pull the updated project onto your server. This process would ensure that everything is properly updated.

Remember to always backup your live data before pushing any updates, just in case something goes wrong. Following this process keeps your project in a consistent state and helps ensure smooth deployments.

I hope this answer was helpful, and don't hesitate to ask if you have more questions!