Deploy Django Project on Digital Ocean

Поділитися
Вставка
  • Опубліковано 21 лип 2024
  • 🚀 In this tutorial, learn how to deploy your Django project on Digital Ocean VPS Droplet with Nginx and Gunicorn.
    👨‍💻 Follow along as I walk you through the process step-by-step and explain everything in detail.
    🚀 With Digital Ocean's VPS Droplets, you'll have the power and flexibility to scale your project, and Nginx and Gunicorn will serve your app with speed and reliability.
    👍 Perfect for beginners and experienced developers alike - let's get your Django project up and running
    👍 Subscribe to My Channel tutorials & Courses.
    🔥 Learn Python in 1 Hour: • Python for Beginners -...
    🔥 Become A Backend Developer in 3 hours: • Become a Backend Devel...
    I'm also providing Patreon support to my channel, so if you are interested in supporting me, you can check it out.
    patreon.com/CodeWithMuh
    Course on Udemy: Learn Backend Development using Django and AWS.
    www.udemy.com/course/learn-ba...
    If you need a discount or want it totally free, if you think you deserve it, send me a message on my email. You will get a coupon code.
    _ _ _ _ _ _ _ _ _ _ _ _ __ __ _ _ _ _
    Please let me know if you would like to consult with or hire me.
    Hire me on Upwork: www.upwork.com/freelancers/~0...
    Place an order on Fiverr: www.fiverr.com/s/rBrEj7
    _ _ _ _ _ _ _ _ _ _ _ _ __ __ _ _ _ _
    Social Links:
    Github: github.com/codewithmuh
    LinkedIn: / muhammad-rashid-daha
    Upwork: www.upwork.com/freelancers/~0...
    X: / rashiddaha80
    Instagram: / rashiddaha1
    Medium: / codewithmuh
    Website: codewithmuh.com
    _ _ _ _ _ _ _ _ _ _ _ _ __ __ _ _ _ _
    #digitalocean
    📔 Source Code: github.com/rashiddaha/drfblog...
    The article used in this Video:
    • www.codewithmuh.com/blog/depl...
    Table of Contents:
    0:00:00 Introduction
    0:00:24 Droplet Creation
    0:05:30 Installing dependencies
    0:07:01 Project Setup and its Environment
    0:13:27 Configuring gunicorn
    0:18:03 Configuring Nginx

КОМЕНТАРІ • 53

  • @CodeWithMuh
    @CodeWithMuh  7 місяців тому +2

    Connect with me on LinkedIn: www.linkedin.com/in/muhammad-rashid-daha

  • @ahmadumar9387
    @ahmadumar9387 Рік тому +1

    wow your content is honey! many many thanks i'm looking exactly for this stuff :)

  • @nathannyawaya
    @nathannyawaya Рік тому +1

    thanks so much, this video was so much helpful though i had so much errors on the way, i kept going back to the video and the blog and finally workd. thanks

  • @funwidpython3266
    @funwidpython3266 Рік тому +1

    Thank You sir. with your tutorial I finally deployed my application

    • @CodeWithMuh
      @CodeWithMuh  Рік тому

      Glad to hear. Welcome

    • @funwidpython3266
      @funwidpython3266 Рік тому

      @@CodeWithMuh Hello sir django server not able to server uploaded mmedia when i change DEBUG = False what should i do

  • @richap2131
    @richap2131 3 місяці тому +1

    Thanks a lot sir i was able to host my website today on droplet just because of your amazing guidance

  • @sylvainlys3451
    @sylvainlys3451 Рік тому +1

    Thank you very much, what do I do once I have the changes on my repository? And how to run migrations with ngnix ? And how to see log of server on console

  • @seokochin
    @seokochin 11 місяців тому +2

    you saved my life bro :)

  • @rmnvishal
    @rmnvishal 7 місяців тому +1

    The whitenoise library really solved my problem of serving static files! Thanks!

  • @pierrepugliesi9641
    @pierrepugliesi9641 2 місяці тому +1

    Everything work, You are the boss Much thank you so much bro, you save my ass
    You are doing good work ! keep going please

  • @tonyhall4983
    @tonyhall4983 11 місяців тому +1

    This tutorial was awesome. It's unfortunate that I'm getting a 502 Bad Gateway after completing the tutorial though. How would you advice someone debug this issue?

    • @CodeWithMuh
      @CodeWithMuh  11 місяців тому

      Nginx or ports issue. Double check

    • @tonyhall4983
      @tonyhall4983 11 місяців тому

      @@CodeWithMuh well I tried the port connection with telnet your_server_ip 8000 and got this error: telnet: Unable to connect to remote host: Connection refused

  • @user-kk9wp3fb8n
    @user-kk9wp3fb8n 11 місяців тому +1

    please how did you save on your mac terminal

    • @CodeWithMuh
      @CodeWithMuh  11 місяців тому

      Cmd+x or escape(:wr then :wq)

  • @seokochin
    @seokochin 11 місяців тому +1

    it will be great if you can add a way to add ssl too

    • @CodeWithMuh
      @CodeWithMuh  11 місяців тому

      Ssl video is available at my channel

  • @souleymanekeita6077
    @souleymanekeita6077 6 місяців тому +1

    Please sir how to add a domain name to the ip adress ??

    • @CodeWithMuh
      @CodeWithMuh  6 місяців тому

      Watch my video backend development courses. There is a section related to this at the end.

  • @codewithalick9521
    @codewithalick9521 Місяць тому +1

    I am having error 502 bad gateway eish I am struggling Sir 😢

    • @CodeWithMuh
      @CodeWithMuh  Місяць тому

      Three issues can be. Your app erroe, nginx issue or gunicorn. Make sure these things are correct

  • @sahirjaman10
    @sahirjaman10 3 місяці тому +1

    502 Bad Gateway . and it is not allowing me to access any of the API

    • @CodeWithMuh
      @CodeWithMuh  3 місяці тому

      Check nginx and gunicorn error logs. You will have problem somewhere

    • @sahirjaman10
      @sahirjaman10 3 місяці тому

      @@CodeWithMuh I misspelled the directory name. thanks for the reply brother. Your video really helped. may allah bless you❤️

    • @sahirjaman10
      @sahirjaman10 3 місяці тому

      @@CodeWithMuh brother do you have any video where I can learn how to add github workflow for the deployed server?

    • @CodeWithMuh
      @CodeWithMuh  3 місяці тому

      You can use GitHub actions or Jenkins. Two videos are available on my UA-cam channel

  • @ahmadumar9387
    @ahmadumar9387 Рік тому +1

    by the way, do you know how to deploy multiple django apps in one vps? many thanks for future response :)

    • @CodeWithMuh
      @CodeWithMuh  Рік тому +1

      Yes, you can do. Reference: michal.karzynski.pl/blog/2013/10/29/serving-multiple-django-applications-with-nginx-gunicorn-supervisor/

    • @ahmadumar9387
      @ahmadumar9387 Рік тому

      @@CodeWithMuh thanks it is also possible with aws?

    • @ahmadumar9387
      @ahmadumar9387 Рік тому +1

      and would advice me to do this, because i'm a beginner in this field :P

    • @CodeWithMuh
      @CodeWithMuh  Рік тому

      I will not recommend

    • @ahmadumar9387
      @ahmadumar9387 Рік тому

      @@CodeWithMuh thanks for your advice, are you planning to create an own video to show how to multi app deployment via vps?

  • @Coden69
    @Coden69 Рік тому +1

    👍

  • @reyandelacruz1038
    @reyandelacruz1038 Рік тому

    how about deployment using
    docker?

    • @CodeWithMuh
      @CodeWithMuh  Рік тому

      Yes, we can deploy using docker

    • @mariabufnea7421
      @mariabufnea7421 6 місяців тому +1

      @@CodeWithMuh Please, help us with a video :Digital Ocean, Django and Docker ! 🙏

    • @CodeWithMuh
      @CodeWithMuh  6 місяців тому

      I am going live today with docker deployment

  • @souleymanekeita6077
    @souleymanekeita6077 6 місяців тому +1

    I'm on windows how I can do that plaese ??

    • @CodeWithMuh
      @CodeWithMuh  6 місяців тому

      Ask your questions with details

    • @souleymanekeita6077
      @souleymanekeita6077 6 місяців тому

      @@CodeWithMuh i use Wiindows as OS and i want to deploy a django project lile you in the video but i see you used a Linux terminal

    • @CodeWithMuh
      @CodeWithMuh  6 місяців тому

      @@souleymanekeita6077 you can try to find if any tutorial using windows

    • @souleymanekeita6077
      @souleymanekeita6077 6 місяців тому +1

      @@CodeWithMuh ok thank you

  • @OctoberYou
    @OctoberYou Рік тому +1

    remote: Support for password authentication was removed on August 13, 2021. I got this message when I try to clone

    • @CodeWithMuh
      @CodeWithMuh  Рік тому

      You are talking about git?

    • @valerabondarev4013
      @valerabondarev4013 Рік тому +2

      go for your git account settings -> developer settings -> tokens -> default tokens (or smth like that) -> and add token. use this token like password when u try to clone your repository