This is one of the best deployment tutorial for django. If anyone seeing this comment, even if you follow this tutorial blindly, you will make it. Even after a year, everything works perfectly. Maybe hv to tweak a thing or two according to your project. Ps: But plss don't copy Mitch's password and secret keys. He is pretty clear about it, throughout the video.😂 Mitch, great series on deployment. It Helped me alot. Thanks 👍
@1flybyguy
5 жыл бұрын
Man, this is the one stop shop for what I was looking for! Thanks... subbed!
@chenoramin329
3 жыл бұрын
I've been learning to deploy django app for a long time. This video really save my life LOL. Subscribed and hit the thumbs up button. Thanks bro!
@litDevYT
3 жыл бұрын
This is the best video ever on youtube HANDS DOWN ... THANK YOU
@takethedamnphoto
4 жыл бұрын
Damn brother, I just found this and can't thank you enough! I'm going through it right now but looks great. Thank you man thank you thank you!!!!!!
@codingwithmitch
4 жыл бұрын
no problem brother
@piusijachi2763
4 жыл бұрын
Hi bro can you help me understand how to set up database online like I use postgres how does it go
@codingwithmitch
4 жыл бұрын
@@piusijachi2763 Read the digital ocean docs. There are tutorials and they are really good.
@piusijachi2763
4 жыл бұрын
OK I will.. Just kinda gets confusing but thanks and great channel
@techiemum2489
4 жыл бұрын
I am having constant issues with deploying my Django e-commerce store. It’s becoming extremely stressful. I’ve tried deploying with python anywhere, AWS and now digitalocean. I’ve got to the point where I’m literally pulling my hair out, I will be following your tutorial tomorrow and have everything crossed it’ll work!
@FuelStackDevOps
4 жыл бұрын
Techie Mum Did the tutorial work for you? I’m also having trouble trying to deploy my Django application
@teerthad87
4 жыл бұрын
Thank you so much. there's just so many small hiccups while going through this process...this will help a LOT.
@danielnolan320
3 жыл бұрын
Amazing video. Could never have done this on my own. Thank you so much Mitch!
@imrcb
4 жыл бұрын
You are a lifesaver! Two thumbs up
@brucelamb6060
4 жыл бұрын
IT WORKS! SUPERB VIDEO! for those of you using digitalOcean (really awesome by the way) you have to ALSO enable port 8000 within its firewall as well. 1. There is the terminal/linux firewall ufw AND 2. The digitalOcean firewall. BOTH must allow the same port number to reach a connection!
@brucelamb6060
4 жыл бұрын
I guess I just feel stupid because I spent over a day trying to connect to this django app..
@mvn3949
2 жыл бұрын
@@brucelamb6060 Hi, Is that to connect via SSH? After following this tutorial all worked fine but i am not able to connect via SSH again, i think the firewall settings in this tutorial closed all ports and I cant go in. Did you face the same problem?
@brucelamb6060
2 жыл бұрын
@@mvn3949 It's been awhile. I'll retry on fresh server this Saturday and let you know.
@brucelamb6060
2 жыл бұрын
@@mvn3949 OK. Just made a new digital Ocean Droplet (Ubuntu 20.04). I DID NOT touch the firewall settings at all! (Don't remember why I had an issue a few years ago..) Arbitrarily used "virtualenv" as environment and named "YTenv" Also named Django project "YTexamplePrj" Here are the commands I used from a fresh Ubuntu Server Image: Commands to create Django Server on Digital Ocean Ubuntu 20.04 sudo apt update sudo apt ugprade sudo apt install python3-pip pip install virtualenv virtualenv YTenv cd YTenv source bin/activate django-admin startproject YTexamplePrj Last step, edit the file "settings.py" and change line from: ALLOWED_HOSTS = [] to: ALLOWED_HOSTS = ['*'] This is insecure but will work for bare minimum deployment. Last command: python manage.py runserver 0:9999
@ramgopal6630
4 жыл бұрын
Great Tutorial. I was struggling with this for 3 days and this helped me a lot.
@stormllamas1948
4 жыл бұрын
So happy I found your site man, super helpful! Gained a subscriber and a liker for your videos (which should have way more views btw).
@asktoeic3869
2 жыл бұрын
The best video ever. thank you so much!!
@idedhica
2 жыл бұрын
I love this one.. full complete and easy tutorials ... Thank you ....
@pluffy5490
2 жыл бұрын
Happy Birthday Mitch
@nan7830
11 ай бұрын
Hi Mitch, your tutorial helped me a lot to host django app on main domain. But can give us guide how to configure django app on subdomain.
@FunAFGames
4 жыл бұрын
idk if anyone has answered this before, but even if you have password authorization disabled and you somehow lose your ssh keys then you can still login to the droplet from the digital ocean website's console for the droplet.
@dungaland
4 жыл бұрын
many, many, thanks from Kisumu, Kenya
@yong2happy
2 жыл бұрын
Hello from Thailand. Thank you so much Mitch. I followed your clip and I succeeded. But I had difficulty setting gunicorn because I activated "DigitalOcean's Django One-Click" prior to follow your clip. That activation would setup guniorn and nginx automatically so I have to use "sudo systemctl daemon-reload" and "sudo systemctl restart gunicorn" a couple times.
@jaecheokkim99
5 жыл бұрын
Thanks you for sharing nice contents! It's absolutely what i want to see!!!
@swirlyup
5 жыл бұрын
Thank you. I follow from your video and it's works.
@boritotv6885
4 жыл бұрын
Thank you for that tutorial man! Used ur link
@useruser-bv1ej
4 жыл бұрын
If the whole coding scene on yt was this great we all would work for facebook and gooogle! XD
@abhaygupta7347
4 жыл бұрын
Thank you for this line,😍😍😍 ufw allow 8000 I was struggling for 3 days...
@GaneshJadhav-fw3cb
3 жыл бұрын
great man !!!!!! you have make deployment simple !!!!!!
@mvn3949
2 жыл бұрын
I think the firewall settings you did at 1:03:00 is blocking me out from connecting via SSH again. I am not able to connect to SSH again after following this tutorial perfectly.
@useruser-bv1ej
4 жыл бұрын
Amazing video!! Only thing that confuses me is that you install python 3.7 and then use 3.6 in the virtualenv
@muammarroshid2531
3 жыл бұрын
Amazing video tutorial, just a good explaination Thank you sir!! god bless u
@genericyoutube
3 жыл бұрын
Hi, 2020here, almost 2021. as of right now mobaxterm is up to version 18 now. So when you create a virtualenv about 36minutes in. Instead of Bin/Include/Lib in your djangoprojectenv file you now get bin/lib/pyvenv.cfg
@genericyoutube
3 жыл бұрын
41 minutes in i had to add import os to settings.py in order to makemigrations
@maxsll3372
6 ай бұрын
If we host django using the cheaper service i guess (5$) on digitalocean the static and media files will not store on digitalOcean?
@PepeTostado
2 жыл бұрын
It is not working for me at the very end, I've got no errors. What do i do?
@TheGraham28292
4 жыл бұрын
Great tutorial!
@satyasashi5859
3 жыл бұрын
Hi @codingwithmitch I've deployed succesffuly but I often getting : [Django] Error (External IP): Invalid HTTP_HOST header: '/run/gunicorn.sock:'. The domain name provided is not valid according to RFC 1034/1035 I kept getting this error email at least once every 2-3 days. I don't know why this is happening. Please help me fix this issue. Thanks!
@MenderOfRoads
3 жыл бұрын
Amazing tutorial. However I'm having issues with loading static content, is there any way anyone would be able to help? seems like nginx wont load it.
@PepeTostado
2 жыл бұрын
My password authentication still works after completing all the ssh steps. What do I do?
@Legomania132
5 жыл бұрын
Every step of this worked until i got to the final ip address check ... my static files(images and css)wont load , but only at this point. Any advice?
@Scarecrow-ed
3 жыл бұрын
same, did you find any solution?
@cseshahriar
2 жыл бұрын
Awesome. Thank you very much.
@ataberkuygur9501
3 жыл бұрын
There is a error sir my pip is Broken how can ı fix It
@moody54324
4 жыл бұрын
Thank u is just nothing for this incredible video i love uuuuuuuuuuu so much
@emprashant
4 жыл бұрын
you are life saviour
@attamuhammad7240
3 жыл бұрын
Hey great tutorial. I am an issue, when ever I reboot server and trying to access my site it gives 502 bad gateway error. Please make video on this as well. Appreciate your effort,
@infect3ds920
2 жыл бұрын
Thanks a lot!
@bellosegun
4 жыл бұрын
Great video and thanks a lot....please how is postgre and mysql setup with Django...at what stage here will things change..thanks again..
@AdrianGonzalezBlogs
4 жыл бұрын
Shouldn't the private key (the one without a file extension) be used when selecting the ssh file in mobaxterm? It says "Use private key".
@junkmunkeys
3 жыл бұрын
Help! Can i just use git like I normally would for version control? What if I want to git pull? Should I just makemigrations like normal? I don't want to code on the droplet server.
@rockeykumar4783
4 жыл бұрын
make video for after deploy, changes and update on the pages.
@simerlh5604
3 жыл бұрын
But I have a question I gonna host a few domains on my vps all of them will be with django so I have to change the name in the gunicorn sock and servicies?
@engkortheng
5 жыл бұрын
hello thanks for the tutorial, I have a question. How do I change code after I deploy?(ex I was suppose to put hello world in the index.html but put hi world instead). I know I have to git push in my local and git pull in my ssh. but what do I do next? what's the linux command i need to do after?
Hey Mitch! I've run into an issue, I followed your build basically word for word, but I cant figure this little bit out. So my registration for my website worked fine when it was in the virtualenv in sublime. But now that I've brought it into mobaxterm and put is up on my droplet, im unable to register successfully(though failing still results in the proper messages) if I successfully register it says Server Error(500) instead of redirecting me to my home page. I've gone ahead and added http/https to my firewall, and connected it to my domain, and Ive set up nginx and gunicorn and certbot. Just having this 1 issue with registering, I think i had it before but I dont recall the solution. I've posted this question on this page also codingwithmitch.com/courses/hosting-a-django-website-with-digital-ocean/
@themindsetgarage
3 жыл бұрын
Nice video Mitch. FYI its ubuntu not ubuntu. Hahaha
@shrawant2713
3 жыл бұрын
Hey! thank you so much! This is an amazing tutorial!! However I have built my own website, the website runs fine but my Django admin page redirects to itself, can you help me with this ?
@niloysarkar1
4 жыл бұрын
Thank you Mitch :)
@jacksm8709
4 жыл бұрын
thanks soo much followed what u said and my site is up and running.. if its a crud app how do we test it sis working maybe thru postman
@blueyc4rter
4 жыл бұрын
How do you export the private key?
@gen12345able
3 жыл бұрын
Mitch: What software do you use to create these videos? Thks.
@henrycodingstack6952
5 жыл бұрын
Nice tutorials ,but i m wondering will it work if you are using a window operating system on your computer ?
@codingwithmitch
5 жыл бұрын
Yes you can setup with windows but the process will be different
@ms5818
10 ай бұрын
error: connection rest by peer
@rockeykumar4783
4 жыл бұрын
thnk u , it's works.
@codewithgags7498
4 жыл бұрын
Hi, That's an amazing tutorial. Just curious about the changes in the repo, in that case do we manually need to repeat the entire process of deployment ? I know we can setup CI/CD at some point for automation.
@cristianoronnie623
3 жыл бұрын
Sorry to be off topic but does anyone know a way to get back into an Instagram account?? I somehow lost the account password. I appreciate any tricks you can give me
@matiascarmelo8365
3 жыл бұрын
@Cristiano Ronnie instablaster ;)
@cristianoronnie623
3 жыл бұрын
@Matias Carmelo i really appreciate your reply. I got to the site on google and Im waiting for the hacking stuff now. I see it takes quite some time so I will get back to you later with my results.
@cristianoronnie623
3 жыл бұрын
@Matias Carmelo DAMN IT ACTUALLY WORKED! I just hacked my ig account details after roughly 30 minutes by using the site. I had to pay 15 $ but definitely worth the price :O Thanks so much, you really help me out :D
@matiascarmelo8365
3 жыл бұрын
@Cristiano Ronnie no problem :D
@diegoalvarezecheverria8902
4 жыл бұрын
Hi mitch, amazing video, but I have the following problem: I had already created my dropet before I saw this video (like 6 month ago) and when I enter the password that digital ocean gave me in mobaxterm , it says "denied". I try changing the password in digital ocean and entering the new one in mobaxterm but the same message still appears. Please, do you have any ideas? Thanks your a lot!
@debashishchakraborty7924
4 жыл бұрын
how many years you are doing web application development for?
@samazaphikel241
4 жыл бұрын
This tutorial helps me a lot to publish my first django app! Do you know how to host a second django app on the same way? When I duplicate this same with the second django app, I get permission denied from curl --unix-socket /run/gunicorn_second.sock localhost
@Touuu
4 жыл бұрын
Hi, I have a problem. When I going to myip/admin I recived an error "attempt to write a readonly database" with Debug = True and If I change to False I recived "Server Error (500)" :( Can you help me? pls...
@samazaphikel241
4 жыл бұрын
Yes, sometimes normal. Set permissions to sqlite3 file or use a MySQL or postgresql
@shopeyindimeji9386
5 жыл бұрын
hi mitch, i tried deploying the web app, when i run the command ' curl --unix-socket /run/gunicorn.sock localhost ', i get this error 'curl: (56) Recv failure: Connection reset by peer ', i checked the gunicorn.socket and gunicorn.service file, there is no issue there. Please how can i go about this
@codingwithmitch
5 жыл бұрын
Dunno you'll have to do some debugging
@shopeyindimeji9386
5 жыл бұрын
Deployed already. Thank you
@shopeyindimeji9386
5 жыл бұрын
Theophilus Thomas try pip install -r requirements.txt. on your virtualenv
@one1axis
4 жыл бұрын
Thanks!
@gabriel_export
5 жыл бұрын
Hey Mitch, used your affiliate links. Thanks for the vids. Digital Ocean flagged my account for abuse before I could even log in though so that sucks.
@codingwithmitch
5 жыл бұрын
Weird. Did you contact support?
@gabriel_export
5 жыл бұрын
@@codingwithmitch yeah they lifted it shortly after. Got it figured out.
@mehranj73
5 жыл бұрын
I'm getting "Job for gunicorn.socket failed" error. I checked everything ten times and I still don't know what is the problem.
@codingwithmitch
5 жыл бұрын
Something wrong with your socket file
@mehranj73
5 жыл бұрын
@@codingwithmitch Anyone having the same problem, I changed ExecStart section to just one line and it worked. I don't know why. like this: ExecStart=/root/djangoprojectdir/djangoprojectenv/bin/gunicorn --access-logfile - --workers 3 --bind unix:/run/gunicorn.sock mysite.wsgi:application . I changed to root just to find out what is the problem so ignore it.
@codingwithmitch
5 жыл бұрын
@@mehranj73 Did you create a second user on the server? Or are you just using root?
@mehranj73
5 жыл бұрын
@@codingwithmitch Yes, I did. I just wanted to test with both of them. Server works fine now. Thank you
@codingwithmitch
5 жыл бұрын
@@mehranj73 cool
@skitto
4 жыл бұрын
mobaxterm is not available for mac. So is there any similar alternatives?
@codingwithmitch
4 жыл бұрын
Not that I know of. I'm not sure what to use if you have mac. You'll need an FTP software and an SSH software.
@amitwithglasses
3 жыл бұрын
Did you find a alternative?
@ottomortadela8040
4 жыл бұрын
This is fantastic but I can't create an account on your site, 403 forbidden error every time I tried.
@codingwithmitch
4 жыл бұрын
Try clearing browser cache
@ottomortadela8040
4 жыл бұрын
@@codingwithmitch I did, and unfortunately, it didn't work. I'll keep trying the course looks very good
@buzzminkyunghoon3856
5 жыл бұрын
woho!!
@shaikhmaheen
5 жыл бұрын
👌👌👌
@prabhatdubey1009
4 жыл бұрын
how can host django website free of cost
@satyasashi5859
3 жыл бұрын
I was all happy following along till kzitem.info/news/bejne/kYaA0KWrsnmFgoY (Socket and Service Files) But, I was not able to get HTML output in the console when done "curl --unix-socket /run/gunicorn.sock localhost" I've removed my droplet and created again to see. But no use. I'm sleepless since 2 days. :( Someone please help me.
@satyasashi5859
3 жыл бұрын
Okay, so finally resolved it. Steps: 1. Look at the gunicorn logs. I've found that it is unable to find 'project.wsgi' module. 2. So, the problem was with my gunicorn.service file. In the parameter "WorkingDirectory=" we should point the path to "manage.py" file location. Instead I copied the path till parent directory of my project folder. tips: make sure with naming conventions. I've named a directory to be myprojectdir in which I created actual django project. So, following tutorial should be as is otherwise we might get into such troubles. :D But happy that I've resolved it.
@pratheeshb9322
5 жыл бұрын
502 bad gateway error
@pratheeshb9322
5 жыл бұрын
Any one.....???
@idedhica
Жыл бұрын
i got that error after i update my python version. Before that, my project run successfull, but after i try to update python, gunicorn failed to start.
@Chickin
2 жыл бұрын
"ok guys so do this but just know that this wont even be relevant"
@pythonprogrammer1034
4 жыл бұрын
heroku is free bro.......
@ameerhamza4373
5 жыл бұрын
Why django ?
@codingwithmitch
5 жыл бұрын
It's powerful, fast, and has a great community and documentation
@andry2826
3 жыл бұрын
While a well-made video, this is not how you would deploy it in real life. In the video, the Django project is created inside the server. In real life, the project is created in the local machine and uploaded to the server via things such as git. So, the video is not really useful.
Пікірлер: 118