Deploy a Django Web App on DigitalOcean Droplets | PostgreSQL - Nginx - Gunicorn

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone welcome back again so in this video I'm going to show you how to deploy a jangle web application to jigit Ocean droplet understand so some months back I made a video on how you can deploy your jangle app to jig ocean app platform right now in this video we are going to be deploying to J ocean drop PL understand so it's quite simple so without further Ado we are getting started right now so first of all you need to go and create an account on J ocean and once you've done that get yourself logged in and once you are logged in we can then proceed together so without further Ado we are starting this tutorial right now okay guys so currently I am logged into my own dashboard on jig ocean so right now I already have a droplet running so I'm going to create another droplet for this tutorial you understand so click on this create button click on the drop down there understand so it's you have to so click on so you have to choose droplet right now we can go and we can go ahead and create our droplet understand so first of all we have the region aspect so I recommend you choose the region that is closest to your area so for me I'm going to go with New York so scroll down so I'm going to make sure your image is ibtu understand and once you've done there currently we are going to work on the basic plan inste so the CPU option go with regular and then just hit this backspace and then choose $ per month if you have enough money to spend you can choose each of the better plant but for now because this is a tutorial I'm going to go with the least plans understand so okay so make sure for for the authentication method make sure you stick with password you understand so right now I'm going to create a password for my server in can see these are the requirements you must follow so I'm going to create mine now so make sure you f the requirements you have here and once you're done so scroll down and here I'm going to change the O name of my droplet cuz this is quite long this is quite long so I'm going to use something simple I'm going to just call this tutorial in I forgive my naming I I need something simple so once you've done that I think we are done click on the create drop plate button and once we've clicked here our drop play is going to get created so going to wait for it okay so right now can see my drop plate has been created is called tutorial this is my droplet over here this is our domain this is our domain name this is our domain this IP address is domain name so click on the drop just created click on it okay you can see this our ipv4 is a domain name that's our drop that's our domain for this web application click on the console click on Console one when it starts working click on Console it start configuring to make sure our jangle app is been deployed successfully so click on Console so it's going to open an online console an online terminal an online iunu terminal for you to run your commands to deploy to jigal Ocean droplet so right now our ter is opened so we can start running the commands to get our jungle app deplo and J ocean droplet understand so okay I'm going to use an article from J ocean to I'm going to we going to follow a tutorial from J ocean to deploy our web app so I'm going to show you so over here we have this article from J ocean uh yeah this is the article from J ocean if you come here straight to start deploying with this article you are going to face some errors you're going to face some problems so that's why I have to make a video to show you how you can solve the problems you are likely to face inance we going we going to use arore as a guide to deploy our jangle web app to J ocean droplet understand so I said before if you come here directly you are going to face some problems understand so for you to avoid those problems that's why I'm here to guide you with my video with my tutorial understand so that's it so I'm going to scroll down now before we before we start the deployment now we're going to Simply create a user we're going to create a new user so we're going to run this command here called add user add I'm going to copy this go and come over here let's add this command command okay it's here add user now so I'm going to simp me just come here and say hard okay I'm going to paste the command just right click here and paste um okay I'm going to call this user cleaning you can use your name so I'm going to go with Clon remember remember this is an online terminal so it might be quite slow Okay add user I want to say clean and enter okay this user has been added it's asking for a password I'm going to give this user a password understand okay let's the password okay I just the password okay for the full name I'm going to I'm going to leave it blank room number blank work phone blank home phone blank order blank so I those ones blank but they not they not really important to get so okay I'll just say yes that's why and then enter sorry for it being quite slow because you're on the live go this is a live this is an online editor that's why is this slow so once we've done on right now we just created a new user so right now I'm going to give this user some privileges so right now just copy this command now need to give this user some pseudo privileges Pudo are meant to be run by the root user remember we just made a new user give this user some privileges to like some privileges get so don't worry I'm going to link this articles in this video description I'm going to link the articles there so I just P this command here remember put the name of the user you created my user is called Clon so uh sorry for this thing being slow so I'm going to just put in CL in there [Music] so the first command is done running so I going to copy the other one so now to install python three to install peip and some other dependencies we need for our deployment so just copy this and come over to your terminal and then you p P just paste it and then once it's done it enter for it to get install it's going to take quite some time to install everything but just be patient okay just eat yes see yes and then enter going to take quite some time just be patient for it to get installed so right now we done with the installation we are done with the installation of the important packages remember let me show you something this command there it helps to install some of the necessary dependencies we need for deployment understand so we done with installation that's right I want to create a post database understand so so now right want to activate our interactive post session and we going to inter I'm going to activate it with this command I'm going to copy this now go down to the terminal and then I will paste it here and then once it's pasted I click it enter so once that's done we're going to have our interactive post session so we have we have over there now so right now I'm going to copy I'm going to paste a code that's going to help us create our postra database along with a user for that database you understand so now so right I'm going to paste the I'm going to paste the code I'm going to paste it now is about five commands so this command responsible for creating a postor base is also creating a password for the user attached to our database we going to create a user for the database we going to create a database itself I'm also going to create a password for that user in we also going to add some privileges for the user on that database hope you understand I'm going to hit enter so enter on the keyboard right now our database has been created for us perfectly one more thing again before you proceed so I want to scroll down so I said before the reason I'm making this video is because if you follow this tutorial by itself you're going to make you're going to face some problems so okay now let's continue now so right now want to like want to set some want to make some default settings like want to make that our post base is working on utf8 the time zone is UTC and the default transaction isolation is set to read committed these are important so I'm going to past the command on the console so I already have it pasted somewhere else so so I'm going to just unom copy this now and then over to my console and I'll paste that there so what I what I recommend for you guys to do is this so whenever you copy a command that is this much something like this you can paste you can go and paste it in your text editor and make your necessary changes before you paste on theu Terminal you understand so currently now my user is not called my project user so I have go down to my time to my Editor to change the name and then copy this now and then paste on the and paste on the Ubuntu ter because it is far easier to edit your text editor than editing on the terminal understand I'm going to paste it here and once I've pasted it now can it enter okay that's done I think we are done with our post gr setup we are done with it instan we are done with it now okay right now I'm going to exist our post session with this command copy this I'm going to copy it now and then I'll simply paste here and it's enter so let's wait for it so right now let's scroll down okay on the on this on this article here so it's time for the to create a virtual environment we're not going to follow this exact same route understand so because this article simply deployed a simp this article simply deployed a St jungle template understand so we are deploying a web app you see we are quite different so now over here now what we have here now they so from what we have here now virtual environment so right now we're not going to we not a vir en at this time so now so right I'm going to open my project over here so what I recommend for you now is go down to your settings open your settings of P file your settings file where is it click open So currently my settings file is open so you need to go and make some configurations very very important very important very important so okay okay so let's proceed s for the background noise might be hearing my neighbors are kind of moving around sorry for that okay now let's continue okay so right now scroll down to your okay to your static file session so over here now your static files okay for your static files route this this app this static files there you see here I recommend this folder should be inside of your app ins inside of an app you understand so I'm going to remove this guy I'm going to remove this and what I'm going to do now is simple whenever you have to set whenever you have to set St files that's because you have your static folder outside of an app you have it you have it in the root directory so right now I'm going to S it over here so this static folder I'm going to Simply move it into the blog app understand so whenever you have your static your static folder outside in the main directory you are meant you are meant to set your static files directory but currently I am removing it now so I want to make sure it is inside of the app I'm going to just pull it into the app now so I'm going to say move so it's gone so I'm going to Simply remove that line that that static files there I'm going to remove the line so right now we going to set our static root remember your static root is is responsible for holding your static files in production inance I'm going to set my static root now going to say static underscore root and it's going to be equal to base underscore direct base directory slash I'm going to call the folder static make sure your folder is called Static you understand the same thing for your media route make sure the folder is also called media because it is over it is in this folder that your media files will be saved you understand so that that for that so once you've done this now I'm going to set up my postra database I'll simply commend this guy out remember we created a database from post grad for remember we we made a post datab datase on on the on the server so I'm going to paste that database here I'm going to paste oh sorry let me just control Z this I'm going to copy from let's copy from here copy this go down to and paste it now so now I'm going to pay this now my user is called new user okay so my my database name is called New DB it's called new DB the user is called new user remember we made a new database you understand so this is the command over here I'm going to show you where I pasted them so my us is called new user theb is called New DB this command also helped us create our post database understand so right now I have to put in the right information over here it's called new user the password is called new password so right now this database is not going to work on your local it's not going to work on your local development server it's going to work only on dig ocean that's why it's only going to work understand so that's that for that okay now so we've added this already okay static make sure you have your St make sure you have your static and your media Ro set and one more thing that's our the our allowed host okay now we're going to putting let's put in the normal Local Host Local Host and after that you're going to put in the normal our local IP address 127.0 Z hope this is not too small for you guys to see okay I've made it bigger now one then that is it and one more thing have put in your G you have put in your IP address from dig ocean so right now we talk our IP address from digit ocean your IP address for your server understand so go down to your browser okay you can see this it over here copy it the same thing we have over here think the same thing you have here this IP your IP V4 the IP your IP V 4 is your IP address so copy this is the same thing go down to your allowed H and then you have to paste it there too it's necessary this IP address the IP address is just like your domain name what the IP add is the same thing as your domain name but this time this time is but this time it is in form of numbers you get So currently we having an error saying name error name s is not defined that's on line 123 let's go and see what the issue is okay there's nothing there so run your server again oh it's going to tr an error because we are currently on a different database that can only work on J ocean that's why we that's why we having this local host error remember we are so now there's no problem so once you have this error that's fine that's normal so we going to install some dependencies so you need to make sure you have what is it called um you need to make sure you have gicon install G Unicon and cyle pg2 so I'm going to run this installation I'm going to say peep install gunicorn Okay Unicon and then so now let's install cycle pg2 I'm going to say PE install Pyle pg2 so this this so CLE pg2 is responsible for connecting our jangle application to post gra Y unicor is going to be the one to run our Jango application in production J jic is going to run the application in production why help us connect our jungle app to post so post database so once you done that already now going to run P freeze so you're going to list at all the dependencies in a file called requirement. CST I say pep freeze and I'll say say requirement. txt so it's going to create a file C reement it's going to create a file this is going to create a file called requirement. CST and in that file we going to have all the dependencies for this jungle application you're going to have it there so just run a command enter okay let's wait for it so that's done already can set the file over here ins the penden is in the virtual make sure you have your virtual make sure you have your make sure you have your virtual environment activated before you run this P freze command before you install anything make sure you have your virtual environment always activated so this is it now so we are good to go so once you're done you can push your code to GitHub can push your code push your code to GitHub understand so make sure you have your code pushed to GitHub you understand so once you've done that we can continue so guys I already have my code pushed to GitHub already so over here I refresh the page refresh so you're going to see the source code appear here oh don't take time okay it's here already that's good so now I'm going to go down to my abun teral reload the page this happens because of poor poor internet connection understand just reload it and it's going to come back so okay guys right now we want to clone our G our G repository into the server remember we made a new user at the beginning of this tutorial we created a new user called cleaning so right now I'm going to switch from the root user down to cleaning understand so I'm going to say switch user now say cleaning enter understand let make this bigger okay can see now I think it's too big okay right now I think right now we've been able to switch from cleaning from the root down to cleaning stand so once we've done this now now I'm going to I'm going to go down to the home directory I'm going to say cd/ root slome sling understand so yeah so right now I am in this directory I'm in I am in the user directory I'm in the home directory but inside of the user directory understand so it's home slash the name of your user right now I'm going to I'm going to close my repository in this part inside of this Clinton directory I'm going to go so right now just like let's copy the let's copy this here come down here and I'll say get clone and I'll paste the link and then it enter okay it's done cloning so I'm going to see LS okay you can see now we have our jungle blog inside of cleaning just putting PWD let's see can see is currently the directory we are in is home is home/ cleaning the root user sorry currently we are in the root directory SL home/ cleaning so right now we have our right now we have our G repository in the server so I'm going to say CD jangle blog that's our G repository okay nice so we are now here if I say LS you can see all the files in our G repository that good so one now is I want to right now I I want to create a virtual environment so right now let's install let's let's create a virtual environment but this user called Clinton does not have the does not have the permission to to to to install the virtual to install the virtual environment Trapper it does not have the permission so we going to switch back to the root user we're going to switch to say Su root let's I'm going to switch back to the root user okay okay now just simply say CD enter okay yes now we are here now remember it asks for a password this password is a password you entered while creating the droplet that's the password is asking for this understand why creting your droplet you asking a password that's the password you are going to enter here so make sure you have the password kept somewhere save somewhere in the stand so right now I'm going to inser the virtual environment rapper I'm going to say appt get install Python 3 virtual EMV enter so right now just say yes okay it's currently working on that let's wait for it with okay okay just hit enter your on your computer on your keyboard it enter the enter key enter yes okay now we have our virtual environment rapper install right now going to switch back to clean switch back to clean yes and then we going to go down to our G repository which is equal which is inside of let me just say PWD I say CD slom SL cleansing LS okay yeah we're going to say CD jangle blog Jango blog sorry for that bang sorry for the Bang Yeah so we are here now so LS okay right now we going to create our virtual environment inside of our inside of our G Repository now say virtual EMV I'm going to call my virtual environment VV V EnV so right now just hit enter so right now my virtual envirment has been created so I'm going to activate it I'm going to say Source then V MV slban slash activate enter wow so my vir environment has been activated so right now I want to install all the requirements for my jangle project I'm going to say LS LS helps to list out all the files in your current directory so right now to install all the dependencies listed in this file called requirement. CST I'm going to say peep install SLR requirement txt so have install So currently it's installing let's wait for it okay right now it's done installing the requirements so now we are good now so let's go and check what we have on our on the tutorial on the article we've been following so after okay I think now we need to like make migrations and migrates let's make migrations and migrate now remember we have a new database so we going to say python mag of spy make migrations enter okay now let's migrate if you're getting some value support your boy you can support me by subscribing to my channel subscribe oh it says no migrations to apply uh okay no mations to apply okay that's fine the reason is because okay so for you make sure you make migration make sure you make migrations and migrate on your end it's important understand but for me I know why currently my migrations were supposed to have run but I know I know why I know why it didn't run it says no migrations to apply okay that's fine but for you you're going to see your migrations run you get that because currently my migration files are kind of it has currently it has it has to do with my migration files you understand so for you you're going to see your migration run after when you run the migr command you're going to see the tables being created but for me it didn't say so it's fine there's no problem so I'm going I'm going to right now I'm going to like collect I'm going to say py p so I'm going to collect static I'm going to say py manage dopy collect static okay that's fine and then I'm going to create a super user I'm going to say python manage p create super user I just say mik oh mic has been taken okay I'll just say Jamie oh Jimmy has been thinking too okay sorry okay now let me just I just say let me just say Sami oh okay Sami is there the reason this is happening because I already do you know why this is happening that's because I already used this postra database before remember before I made this tutorial I have to go and practice first understand so I I have already used this database in my practice session before coming down before coming down here understand so that's why my migrations did not run and that's why you can see that I having some of these users already being used that's why so that's to let you guys know for your password put in something there put the same thing there again and just say yes okay we are good now okay now so I think we are good okay we making progress okay so now we going to Simply run this command sud sudo allow put 8,000 because currently once you run our we're going to run this command sudo allow P 8,000 just copy it now copy that there just paste it and enter it's asking for your password so put in the password password for cleansing understand so the next command we have there is so we going to run server so now I think okay let's do that now so I'll just copy this part of the command let's copy this copy I'll say Python and I'll paste it and it enter okay now our server is running we are not done so currently let's go down to we're not done we are just starting so now just copy my copy the I IP my I my IP V4 copy it paste it here go down to Port 8,000 and enter you can see my blog application that's nice but I'm surprised there's something wrong over here there's a problem now currently I'm seeing something different instead I'm I was exped to an empty database but right now it's not so I'm going I'm going to go right I'm going to check my code now you can see now I made a mistake I commented out my post base that was why it was not my great thing I'm using the SQ like 3 that the issue so I'm going to Simply comment this guy out sorry for this mistake I really apologize so okay now I think i' okay now this is it now so I'm going to push back to GitHub I'm going to Simply push push again to GitHub currently I'm say get commit I already commit M let me just call it DB change DB database change you get what's happening get add get commit going to say DB this is getting to push okay now I'm going to push get push origin main push push push push P so it pushed already that's nice put down come over here now okay I'm going to simp just C to break out of the server right now I'm going to get pull we are meant to be on our post base right now already get P already perfect so now we're going to make migrations again we going to say python so we going to migrate make migrations again sorry for this back and forth I'm super sorry make migrations let's migrate this time you can see perfect so you can see now the you can see now the table it's you can see it's running this time that's mistake I made the last time so I was I was I was using the SQ like database inste instead of using the post database that was the issue so now I'm going to create a super user create a super user create super user oh I think I spelled it wrongly super user let just say Mike my first okay mik gmail.com enter password putting something there so this this is for your admin session for the jungle admin understand so let me just say y okay perfect so that's fine so we going to run that pseudo I think everything should work well now go to your browser okay no let's so we going to run that sudo allow again yeah are you okay just copy this guy I just paced here hit enter and now we're going to Simply next command is this just copy let say Python and we paste no no sorry sorry for that I me to copy like this manage copy to manage copy and then you going to say Python and then you paste and it enter okay now go to the browser again over here refresh this page I meant to see once you refresh the page you're not going to see these articles again because we on a new L base enter what's happening let's see what the issue is oh it says we me to use HTTP we using https so use HTTP instead of using https that's the issue come over there and make sure it is there is no s there can see now our our website is not empty because we are on a new database and and the DB is also empty that's why you can see there is no article on this side so we making progress now so back to so now we going to come to our article now scroll down so now you can see it says it worked okay okay for it works for them too so right now what we going to do now is this now so we going to Simply we are going to not do this now we're going to Simply run this using G Unicon I'm I'm going to Simply copy this copy and then go back to your server so now to break out now just contr C to break out of the server so why why currently my have to load my terminal again because of my internet went off I have to reload it again so we here again don't wor don't worry we can continue from where we stopped so I'm going to I'm going to say s cling so for you now you don't for you now you don't have to do this again you don't have to you don't have to do this you don't have to do this I'm doing currently you don't yes so I'm going to show I'm going to show you where you're going to continue with me I'm going to say CD I'm I'm trying to go down to my G repository I'm going to say CD home/ cleansing slash Jango blog so okay now we are here again make sure I'm going to activate my virtual environment yes yes yeah yes I want to save let me just say Source V MV SLB SL activate Okay now so now yeah you can continue with me now yes now so right now we want to now run our application with G unicor with G unicorn yeah so I'm going to copy this command make sure you inside of your G repository I'm in I'm inste of my own currently if I see LS this is my repository can see the code you can see everything there so I'm going to paste this now you can see now it says my project WGI so this so our own is called my site so our WGI can be found inside of the my site folder my site is the jungle project itself so I'm going to remove this command now let me show what I'm talking about so I'm going to go into the folder called my site see the my site I say LS you can see now can see my WGI there so you can see so I'm going to paste it again that command there but this time make sure you call that my project my site this should be called my site should be called my site and it enter there's a problem says oh sorry um I was in the wrong directory make sure you come out of the my site folder come out of it make sure you inside of the G repository itself so yeah this so this is the right place to this the right place to run the command so yeah this is the right place okay now perfect is running so now I'm going to test my application again to see if it's going to still work okay it still works that's fine so now right now we going to configure G unicor in such a way that we don't need to run you don't need to add this plus 8,000 it works like a normal web application so let's go that right the way okay guys let's proceed now to the article that we have been following okay now so right now scroll down we've done this so you can read you can read to the article to understand what each of these command truly and what what they really mean right now we going to we going to deactivate our virtual environment let's do that right away or just contr C to break out of the server contr C and then paste deactivate let's deactivate it our virtual environment have been deactivated okay so you proceed proceed okay now we are going to we going to create and open a file called gicon service so just copy this command now copy the command to you can reach what those are doing just hit enter it's asking for my password that's the password for cleansing the user okay now so we want to put in some items in this file called gicon service and here's the content over here so just scroll down this is this is a full content I'll just copy this copy this I'll come back to my come to your text editor we are going to make some changes to that stuff before we final decide to let me just clear out of this stuff okay now so I'll paste it here so now we need to make some changes to this file before we paste on that before we paste it here understand so this so right now right now we are currently on a nano editor on in so we need to place some so now right now okay from here now my user is called cleaning make sure make sure call your user cling no not cling call your user the name you called it Clinton and currently my my working directory is home/ clinton/ Jango blog junglecore blog and over here the same thing home cleaning make sure you careful with this don't make mistake so it's called jangle blog jangle _ blog and my virtual environment is called V MV V MV yes okay over here just scroll here so now I'm going to Simply okay this my sock this my project do sock this file is super important very much important so I'm going to just remove my project make sure this is called Clinton and I'm going to call this F my sight. sock my sit. sock and this is going to be called okay my site remember that's where our WGI file is my site. WGI so these are very very important things you need to do okay I think we've made the necessary changes need we need to make okay I'll now copy this contr C see and I'll comment it out so my and I'll paste you just right click and then paste on I click and paste there just hit CR s to save and CR X to exit and you're good so now that is it now so what's the next command on the list so now we going to run this command called sudo system C St unicorn copy and then paste okay now we going to copy the other commands enable unicor this stuff please subscribe to my channel okay we not done so now we going to copy this other one right now right now want you check the status of G I want to check the status if everything has been working well okay currently it says active and it is running it says enabled active around so nice we have making progress that's good okay now so let's hit control C okay now we out of that yeah so once we out of it now what's the next step okay so now next command says we should check for the for the for the gon socket file so now these we going to go down to right to the code now we going to say LS /le that's where I set my socket file to be you can see let me show you home Clinton my socket file so now let's check if it is if if it is available I'm going to say okay I'm going to just say CD dot dot now see LS you can see I have my site to Sock that's fine okay I'm making progress I'm going to go back to my jangle blog again the next command for us to run you don't need to run this command okay okay we don't need this command you don't need this for now everything is working well face we don't need we don't need this command so we can read to know what it actually does understand we don't need it now so right now I'm going to copy this other command we need this one and now come over here and paste it and I make sure I call this last file should be called jungle blog understand that's of your repository going to call it jungle blog enter so so right now we need to paste another stuff inside here and here it says yeah just copy this guy copy to your editor just come down to your test Editor to make the changes you want to make to read before you paste on the terminal so okay 80 so we need to go get your IP address I'm going to copy that here is my copy I'll simply put that here paste as for your static file for your static fruit now remember I told you you should be called Static and it's going to be in home SL my my name which is cleansing cuz this user I added during the start of this tutorial and I'm going to call my G position which is called Jango blog so I'm I'm going to do the same thing for my media files I'm going to just paste here and I'll call this media and then I just come over here yeah that's perfect and for my sock file I want to make sure my sock file is inside I'm going to say cling slash my site sock yeah I'm going to have my sock F inside of the clean inside of the user folder understand the same happened there the reason why it's not inside of the the reason why it's not inside of my G repository is because okay currently now it should have been ins of inside of the G repository but I said no that's because whenever I update my repository it is likely to affect the stock F so so so to prevent that I have make sure I take away the soof far from the from the G repository in stand and that's and that's why I I have put inside of the user inside of the user folder which is called cleaning the same thing applies here too get so that's that's what is happening okay I think we've I think I think we are good to go I'll just copy this copy contr C and I'll paste it over here paste once you've pasted just hit CR s to save and CR X to exit yeah we're out of it where is it okay and think you're making progress now you just have to copy this copy make sure you call this my blog so right now just paste it over here if I let me just comment out paste it here make sure you call this jungle Blog the name of your G repository don't make the mistake please of calling it something else contr C and you paste it here enter okay we almost done and now after you've done that run this command to test your engine's configuration you can read the blog article to understand what is actually going on I don't to waste much time that's why I have to copy and just space quickly you can see it is it says engineer do SC syntax is okay and the text is successful thank you making progress and then next command to run I don't want to miss anything that's why I'm careful okay now right now we need to restart inex copy and then to your browser and then it enter okay our engine server is running already our site is already up and running before we check it out we need to go remove Port 8,000 we don't want to allow Port 8,000 again remember before we we have ping Port 8,000 before before we can see our site but now I want remove it we don't want it again we don't need it again because right now gicon is able to handle everything by S I'll just copy this sud sudo delete allow 8,000 if you if you use port eight if you use a different poort number just make sure you asside the poort number here understand instead of using get so I'll paste that here enter okay R updated perfect and I'll just say allow engine X full and I'll paste that here enter perfect so now you can so right now this command this command up here is responsible for run for bringing our project to life this command you see here remember that it that is it now so now to the browser once I come up here and refresh I'm going to move for 8,000 enter okay now we have this error called 502 bad gateway so wondering what's the problem we're going to fix it right now so how how do you see the error message okay go down to your to the blog article following so we come down here so you're going to run this command to see what the problem is enter so right now it's telling us that we have the permission Denine issued so you can see now this is error message now go down to the go down to our article to see good here just scroll down you can see now J ocean already told us about the error you can see here this is the same error they faced you can read about it to understand what is going on but right now I want show you how to solve the error you understand the error is C because of I'm going to show why the error is C because of because the Parent Directory that houses jangle blog that Parent Directory has some permission attached to it and because that permission that is attached to it GIC is not able to it's not able to like serve our application you understand that's the issue that's happening right now so right now we want to remove that permission we want to remove that permission want to make sure that we want to make the right now we want to make the Parent Directory to be open for everyone what want to do right now I'm going to run this Command right now so right now as I said before I'm going to run this command let's paste it here so this command is going to make sure that that the Parent Directory is open for every users for the group user for the owner and for any other user I going to make sure the directory /l is open previously it was closed but this change or with this command called CH mode this command over here I'm going to make sure that this directory is open for all understand once I hit enter okay it has been done and once You' done that again you're going to run the server you're going to run the server again this is the okay this is the code over here to run the server again this P sudo system cart engx This Server to run it just run it again copy once you've copied it come down over here and paste it to run the server again and it's enter okay go down to your browser and let's see if the error disappears refresh this page and perfect our application is live on the internet now it is live understand if I go down to my admin I could add SL admin enter remember my user I created a user code mic for this admin mik if I click on log let's see if mic perfect now you can see the blogs there are no articles there because you on a fresh database okay everything is empty our site is now live it's now live so for you know you can go and add some data in your admin session currently the S is live but empty because you're on a different because you're on a new and empty datab base you understand so this how you deplo your jungle app on J ocean droplet understand this unicorn engine and also on a postrace database I really hope you gain some value if you did please smash the Subscribe button like the video and share it to your friends thank you for watching we'll see you in the next video so stay blessed and bye-bye
Info
Channel: Code With Clinton
Views: 1,833
Rating: undefined out of 5
Keywords: deploy django on digitalocean droplets, deploy django using nginx Postgres gunicorn, django digitalocean droplets, deploy django, django deployment tutorial
Id: TvihGU64z-I
Channel Id: undefined
Length: 53min 53sec (3233 seconds)
Published: Wed Oct 25 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.