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! :)
_______________________________________________
Hostinger Buyer will get 20% OFF
hostinger.in?REFERRALCODE=1RAJESHKUMA31
BigRock
bigrock-in.sjv.io/x9Pxr5
Even having 4 years of experience in DevOps & AWS. istill like to watch your videos
Thanks bro bussssss isika wait kar Raha tha, bachaliya Bhai muze, bohot dhund Rahatha right time PE video dalke bachaliya Bhai tune ❤❤❤❤❤
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 .
i really appreciate your efforts dear!
Thank you very much!
Thank you sir for this much detailed video... Your very very very underrated Sir...
Thank you sir it helps me a lot for deployment
Congratulations sir for 500k 🎉
congratulations on 500K 🎖🎖
Congratulations sir 🎉 for 500k
Awesome video bro. Keep it up.
Congratulations sir for 500k
Guruji finally 500k completed😘😘
thank you so much sir g Thanks again
Congratulations sir🎉🎉
500k completed 🎉🎉🎉
Welcome back
Congratulations sir 5L
Sir please make video on devOps tools to automate project I appreciate your efforts ❤️🙏
Valuable content, impressive 👍
Can we use the same procedure for AWS, Azure etc...
I need your help plz..
your every video have helped me, thanks brother. if i want to add postgres creating it one vps how do i do it?
Yes pls Mai bhi postgres ka setup khoj Raha hu par mil nhi paa Raha hai
Sir ji Host Django blog on Windows IIS Server par ek video banao... Demand jyada hai
sir please make video on how to serve static files in production using external platform like dropbox , google drive in django
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.
Can you please make a video on fastapi mongodb motor to implement mongodb transaction for multi database operation?
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
Sir Live Lectures kar sakate ho..❤
I am getting this permission (err: bash: line 1: ./.scripts/deploy.sh: Permission denied) error would you please help me?
if i am using pipenv enviornment instead venv is that ok , doest it work?
as long as you have env created everything will work fine.
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.
Solution Mila ky appko ??
@@gopalkumar6789 yes..
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)
sudo ufw allow "Nginx Full"
@@geekyshows thanks, it worked
@@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
@@gopalkumar6789 ha bro, mein root user se Kar raha hoon.
Abi Pura video nahi dhek paya, kal dekhunga, fir thodi apki help Kar paungq
@@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
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
Watch this th-cam.com/video/5EY6JFptZgw/w-d-xo.html
@@geekyshows yes sir mai vps pe use karna chahta hu ??
@@gopalkumar6789 tarika same hai django k sath setup ka aapko bas linux me postgre install karna hai
@@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
@@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.
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 😤😤😤
because he knows hindi and you don't learn hindi😁