Deploy Django Project via Github and Automate Deployment Nginx VPS

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ค. 2024
  • Deploy Django Project via Github and Automate Deployment Nginx VPS
    00:00:00 Project Introduction
    00:02:30 Django Deployment Instruction
    00:03:14 What is Gunicorn
    00:04:48 Install and Setup Django-extension
    00:07:22 Create requirements text file
    00:08:14 Verifying Required Softwares
    00:10:00 Install PIP and GIT
    00:10:37 Install virtualenv
    00:11:20 Verify Nginx and Ports
    00:12:15 Point Domain to VPS
    00:16:40 Copy Django Project from Local Machine to Remote Server
    00:17:30 Copy Using Command Prompt
    00:22:00 Add gitignore file
    00:23:44 Push Project from Local to Github as Private Repo
    00:25:26 Make connection between Remote Server and Github Repo via SSH Key
    00:28:35 Clone Github Repo
    00:30:07 Create Virtualenv inside Project Folder
    00:30:28 Activate/Deactivate Virtualenv
    00:30:54 Install Dependencies
    00:31:27 Install Gunicorn
    00:32:30 Create System Socket file for Gunicorn
    00:36:02 Create System Service file for Gunicorn
    00:39:17 Start Gunicorn Socket and Service
    00:39:44 Enable Gunicorn Socket and Service
    00:40:00 Check Status Gunicorn Socket and Service
    00:40:30 Restart Gunicorn
    00:41:19 Create Virtual Host File
    00:45:47 Enable Virtual Host
    00:47:26 Test Configuration
    00:47:35 Restart Nginx server
    00:47:54 Fix Invalid HTTP_HOST Header ALLOWED_HOST Error
    00:49:43 Serve Static Files
    00:55:12 Define STATIC_ROOT and MEDIA_ROOT
    00:57:48 Clear Cache
    00:58:18 Collectstatic
    00:58:47 Migrate Database
    00:59:06 Create Superuser
    01:00:34 Check Website
    01:02:19 Why we should use Github to Deploy Project
    01:03:43 Git Pull
    01:04:22 Kill Gunicorn then Restart
    01:11:24 Why use Automation
    01:13:20 Creating deploy bash script
    01:15:47 Set File Permission for bash Script
    01:16:30 Creating Github Workflows
    01:20:00 Add Github Secret Variables
    01:24:50 Git Pull Scripts on Server
    01:28:07 Checking Deployment Automation
    01:30:00 Track Action
    01:32:23 SSL Certificate
    Domain and VPS Hosting:
    • Domain and VPS Hosting
    Domain and Shared Web Hosting hPanel: • Domain and Shared Web ...
    Core JavaScript: • Core JavaScript (Hindi)
    Advance JavaScript: • Advance JavaScript (Hi...
    NPM: • NPM Crash Course (Hindi)
    React JS: • React JS (Hindi)
    Node Mongo and Express JS: • Node JS Mongo DB and E...
    Postman Playlist: • Postman
    Check Out Our Other Playlists:
    / geekyshow1
    Learn more about subject:
    www.geekyshows.com/
    ________________________________________________
    DISCLAIMER: The links provided in the description may be affiliate links. If you buy anything from these links, then I may get some commission. But bear in mind, you won't be charged even an extra penny. I would be glad if you use these links!
    ________________________________________________
    T A L K W I T H M E !
    Business Email: contact@geekyshows.com
    Website: www.geekyshows.com/
    _______________________________________________
    Make sure you LIKE, SUBSCRIBE, COMMENT, and REQUEST A VIDEO! :)
    _______________________________________________

ความคิดเห็น • 49

  • @geekyshows
    @geekyshows  9 หลายเดือนก่อน +2

    Hostinger Buyer will get 20% OFF
    hostinger.in?REFERRALCODE=1RAJESHKUMA31
    BigRock
    bigrock-in.sjv.io/x9Pxr5

  • @abhigyan709
    @abhigyan709 5 หลายเดือนก่อน +1

    Even having 4 years of experience in DevOps & AWS. istill like to watch your videos

  • @rohanpurane6249
    @rohanpurane6249 9 หลายเดือนก่อน

    Thanks bro bussssss isika wait kar Raha tha, bachaliya Bhai muze, bohot dhund Rahatha right time PE video dalke bachaliya Bhai tune ❤❤❤❤❤

  • @manasuniyal2897
    @manasuniyal2897 9 หลายเดือนก่อน

    You are doing a really great job bro .
    HOSTING and AUTOMATION mai mujhe hamesha se hi dikkat hoti thee. . . .
    aapne asaan kar dia
    Thanks again .

  • @cyberattempt
    @cyberattempt 2 หลายเดือนก่อน

    i really appreciate your efforts dear!
    Thank you very much!

  • @AnantaAkash.Podder
    @AnantaAkash.Podder หลายเดือนก่อน

    Thank you sir for this much detailed video... Your very very very underrated Sir...

  • @kusiyaitkrishna
    @kusiyaitkrishna 9 หลายเดือนก่อน

    Thank you sir it helps me a lot for deployment

  • @mdumarfaruk4696
    @mdumarfaruk4696 9 หลายเดือนก่อน

    Congratulations sir for 500k 🎉

  • @user-co6ty1oh7x
    @user-co6ty1oh7x 9 หลายเดือนก่อน

    congratulations on 500K 🎖🎖

  • @nan7830
    @nan7830 9 หลายเดือนก่อน

    Congratulations sir 🎉 for 500k

  • @shubhamtelang9068
    @shubhamtelang9068 9 หลายเดือนก่อน

    Awesome video bro. Keep it up.

  • @blackfrancolinkalateetar9961
    @blackfrancolinkalateetar9961 9 หลายเดือนก่อน

    Congratulations sir for 500k

  • @ggff2269
    @ggff2269 9 หลายเดือนก่อน

    Guruji finally 500k completed😘😘

  • @bijendernagar15
    @bijendernagar15 9 หลายเดือนก่อน

    thank you so much sir g Thanks again

  • @trymeproshifter470
    @trymeproshifter470 9 หลายเดือนก่อน

    Congratulations sir🎉🎉

  • @emio_op
    @emio_op 9 หลายเดือนก่อน

    500k completed 🎉🎉🎉

  • @Coden69
    @Coden69 9 หลายเดือนก่อน

    Welcome back

  • @kamalh4544
    @kamalh4544 9 หลายเดือนก่อน

    Congratulations sir 5L

  • @forexspectrum4799
    @forexspectrum4799 9 หลายเดือนก่อน

    Sir please make video on devOps tools to automate project I appreciate your efforts ❤️🙏

  • @noobpbgplayer
    @noobpbgplayer 5 วันที่ผ่านมา

    Valuable content, impressive 👍
    Can we use the same procedure for AWS, Azure etc...
    I need your help plz..

  • @aburayhan1897
    @aburayhan1897 5 หลายเดือนก่อน

    your every video have helped me, thanks brother. if i want to add postgres creating it one vps how do i do it?

    • @gopalkumar6789
      @gopalkumar6789 หลายเดือนก่อน

      Yes pls Mai bhi postgres ka setup khoj Raha hu par mil nhi paa Raha hai

  • @maheshk_7
    @maheshk_7 8 วันที่ผ่านมา

    Sir ji Host Django blog on Windows IIS Server par ek video banao... Demand jyada hai

  • @tejasgodse5184
    @tejasgodse5184 6 หลายเดือนก่อน

    sir please make video on how to serve static files in production using external platform like dropbox , google drive in django

  • @masterofmyownfaith6189
    @masterofmyownfaith6189 9 หลายเดือนก่อน +1

    Bro please make a tutorial on slack app using django not slack bot. There are just few videos over TH-cam yet they dont show the full process till publishing and mostly all use js.

  • @ShourovRoy-pk5zm
    @ShourovRoy-pk5zm 9 หลายเดือนก่อน

    Can you please make a video on fastapi mongodb motor to implement mongodb transaction for multi database operation?

  • @virendrapanchal2981
    @virendrapanchal2981 6 หลายเดือนก่อน

    Even when I point the domain to the VPS, I still get the error of website not secure and because of which I am unable to view the default nginx page

  • @sagaruttare936
    @sagaruttare936 9 หลายเดือนก่อน

    Sir Live Lectures kar sakate ho..❤

  • @user-ss9vu8xk7r
    @user-ss9vu8xk7r 8 หลายเดือนก่อน

    I am getting this permission (err: bash: line 1: ./.scripts/deploy.sh: Permission denied) error would you please help me?

  • @ayushvanvary
    @ayushvanvary 3 หลายเดือนก่อน

    if i am using pipenv enviornment instead venv is that ok , doest it work?

    • @geekyshows
      @geekyshows  3 หลายเดือนก่อน

      as long as you have env created everything will work fine.

  • @alokranjan
    @alokranjan 6 หลายเดือนก่อน

    I am getting "Internal Server Error" for deploying a dummy django project in hostinger. I followed the same steps . The status of of sock and services are ok . All host re allowed in settings.py. Also, i could see request are coming to nginx access.log . My firewall is off . i am unable to get my django default homepage .
    I tried restarting socket,service,nginx but that didn't help much . I am able to start the djnago server with "python manage.py runserver" and no issues there .
    I am unable to understand , where the issue might be . is it gunicorn , django app or any other settings !!!
    Any suggestions would be much appreciated.

    • @gopalkumar6789
      @gopalkumar6789 หลายเดือนก่อน

      Solution Mila ky appko ??

    • @alokranjan
      @alokranjan หลายเดือนก่อน

      @@gopalkumar6789 yes..

  • @zuberkhan-kn7iu
    @zuberkhan-kn7iu หลายเดือนก่อน

    how to allow 80,443 /tcp ?
    i am getting this after running this command: sudo ufw status verbose
    To Action From
    -- ------ ----
    22/tcp (OpenSSH) ALLOW IN Anywhere
    22/tcp (OpenSSH (v6)) ALLOW IN Anywhere (v6)

    • @geekyshows
      @geekyshows  หลายเดือนก่อน +1

      sudo ufw allow "Nginx Full"

    • @zuberkhan-kn7iu
      @zuberkhan-kn7iu หลายเดือนก่อน

      @@geekyshows thanks, it worked

    • @gopalkumar6789
      @gopalkumar6789 หลายเดือนก่อน

      @@zuberkhan-kn7iu hey bro app root user se kar rahe hai ?? Mai to gunicron mei fasa hu
      sudo systemctl restart backend server. gunicron command dene pe exit-code ka error de raha samj hi ny aa raha ky karu

    • @zuberkhan-kn7iu
      @zuberkhan-kn7iu หลายเดือนก่อน

      @@gopalkumar6789 ha bro, mein root user se Kar raha hoon.
      Abi Pura video nahi dhek paya, kal dekhunga, fir thodi apki help Kar paungq

    • @gopalkumar6789
      @gopalkumar6789 หลายเดือนก่อน

      @@zuberkhan-kn7iu sure brother pata ny ky dikkat h samj se bahar ho raha mere to mai new user se bhi Kiya same problem hai

  • @gopalkumar6789
    @gopalkumar6789 หลายเดือนก่อน

    postgres SQL db kase connect karte hai server pe any reference aur db ko connect kase karte hai pls kisi ko kuch pata hai bataye

    • @geekyshows
      @geekyshows  หลายเดือนก่อน

      Watch this th-cam.com/video/5EY6JFptZgw/w-d-xo.html

    • @gopalkumar6789
      @gopalkumar6789 หลายเดือนก่อน

      @@geekyshows yes sir mai vps pe use karna chahta hu ??

    • @geekyshows
      @geekyshows  หลายเดือนก่อน

      @@gopalkumar6789 tarika same hai django k sath setup ka aapko bas linux me postgre install karna hai

    • @gopalkumar6789
      @gopalkumar6789 หลายเดือนก่อน

      @@geekyshows sir g appka any contact details mil sakta hai Mai backend mei fas gaya hu ??? Samj nhi aa raha kyu Karu raat ke 3 bje Jaa rahe pr ho nhi paa raha kuch pls help

    • @gopalkumar6789
      @gopalkumar6789 หลายเดือนก่อน

      ​​@@geekyshows Ye error mei kuch madad kijiye
      Loaded: loaded (/etc/systemd/system/backendserver.ltd.gunicorn.socket; enabled; preset: enabled)
      Active: active (listening) since Sun 2024-05-26 17:08:21 UTC; 4h 13min ago
      Triggers: ● backendserver.ltd.gunicorn.service
      Listen: /run/backendserver.ltd.gunicorn.sock (Stream)
      CGroup: /system.slice/backendserver.ltd.gunicorn.socket
      May 26 17:08:21 vps systemd[1]: Listening on backendserver.ltd.gunicorn.socket - backendserver.ltd.gunicorn socket.
      gopal@vps:/etc/systemd/system$ sudo systemctl status backendserver.ltd.gunicorn.service
      × backendserver.ltd.gunicorn.service - backendserver.ltd.gunicorn daemon
      Loaded: loaded (/etc/systemd/system/backendserver.ltd.gunicorn.service; enabled; preset: enabled)
      Active: failed (Result: exit-code) since Sun 2024-05-26 21:20:49 UTC; 1min 0s ago
      Duration: 102ms
      TriggeredBy: ● backendserver.ltd.gunicorn.socket
      Main PID: 24477 (code=exited, status=3)
      CPU: 100ms
      May 26 21:20:49 vps gunicorn[24478]: [2024-05-26 21:20:49 +0000] [24478] [INFO] Worker exiting (pid: 24478)
      May 26 21:20:49 vps gunicorn[24477]: [2024-05-26 21:20:49 +0000] [24477] [ERROR] Worker (pid:24478) exited with code 3
      May 26 21:20:49 vps gunicorn[24477]: [2024-05-26 21:20:49 +0000] [24477] [ERROR] Shutting down: Master
      May 26 21:20:49 vps gunicorn[24477]: [2024-05-26 21:20:49 +0000] [24477] [ERROR] Reason: Worker failed to boot.
      May 26 21:20:49 vps systemd[1]: backendserver.ltd.gunicorn.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
      May 26 21:20:49 vps systemd[1]: backendserver.ltd.gunicorn.service: Failed with result 'exit-code'.
      May 26 21:21:28 vps systemd[1]: /etc/systemd/system/backendserver.ltd.gunicorn.service:10: Ignoring unknown escape sequences: "\"
      May 26 21:21:28 vps systemd[1]: /etc/systemd/system/backendserver.ltd.gunicorn.service:14: Missing '=', ignoring line.
      May 26 21:21:36 vps systemd[1]: /etc/systemd/system/backendserver.ltd.gunicorn.service:10: Ignoring unknown escape sequences: "\"
      May 26 21:21:36 vps systemd[1]: /etc/systemd/system/backendserver.ltd.gunicorn.service:14: Missing '=', ignoring line.

  • @TomislavMiletic
    @TomislavMiletic 4 หลายเดือนก่อน +1

    I don't know how TH-cam doesn't ban these clickbait videos. Obviously you are not speaking English, so why do you use English in the video title and description 😤😤😤

    • @dhruvkalal9062
      @dhruvkalal9062 2 หลายเดือนก่อน

      because he knows hindi and you don't learn hindi😁