Learn Deploy Laravel in just 60 Minutes | In depth course of deploy laravel on ubuntu server

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] okay so let's now start with digitalocean and use the link in the description and you will get $10 to get started with the digitalocean so similarly you can see I have used that link and now if I go and sign up you will see I have $10 credit applied to my account once I register here so let's now register here so I will give one of my email id and gmail.com and then a secure password that's it now sign up and while it's sign up let's open a new tab to have Gmail because obviously we are going to get and confirmation email from digitalocean so now you can see digitalocean is now asking you to confirm your email so now if i go to my gmail and yes we have this and let's click on this link so that we can verify our digitalocean account so now account is verified and you can see you have $10 in credit via referral so that's how you can get that $10 so now you have to apply a billing information that means simply you can either add your card or people account and don't worry about that until and unless you will use their service that means create the droplet that means the server if you are not going to create they will not going to charge you anything and they are totally totally trustable so I'm going to just fill out these things and then I will come back so now after completing the verification of the payment details and fully activating our digitalocean account it's now time to create a new droplet so to create a droplet you just have to login and the first page will give you to create droplet button let's click on this and fish is doing something okay so here you can choose distributions that means this operating system you want to use so let's use UN - okay and then the configuration of your server so that has many options and you can see it's point zero zero seven per R that means if you use it and try it destroy it somewhat in an hour you were just going to charge point zero zero seven that's just super that's so cheap and if you're going to use it for your real project I think for a normal project $5.00 per month is okay but obviously if you need in the future you don't have to do anything just change your settings via here and they will without doing anything they will upgrade your dissolution server okay so this is good so let's use this one five dollar month and then we have to choose the data center choose the data center as the nearest to your targeted audience so I'm using Bangalore because I am from India and that's why but you can choose it very carefully then I don't want any kind of these things but SSH key we will see this later and how we can log into digital ocean via this and everything is set up and they has named it you into 512 something something you can choose anything you want so let's say bit fumes due to real okay so this is good but in well it host name okay so give a - they will not allow spaces so let's create and in a no time you can see it will start creating it will take some time to configure to install the you going to on your account to various things so we have to wait for that and in just few minute it's now completed and you can see it says created and you are awesome yeah you are always awesome so to have these things to have the configuration of the server we get an email so let's now again go to Gmail so here you can see we have digitalocean emails this one is the bit films tutorial we have just created so this is the IP address this is the username and here is the password don't try to log in with these credentials because I'm going to delete this server as soon as this tutorial completes okay so we can now use these credentials to log into our account so let's just go to terminal and on this terminal we have to just say SSH then root that means the username which is root you can see here and then root at 1 3 9.5 9.2 0.85 so this is the SSH and the IP address now hit enter and now you can say first time because we are using this so it says we have to continue that are you sure you want to continue with this IP address is this secure so I will say yes and that's okay now it's asking for password so simple is the password very easy and paste it you will not get because I'm on Mac and I can't see the password because it's also hidden but trust me I have pasted that password so hit enter and you can see finally we are inside our server and the first time you login server will ask you to change your password obviously I will change my password firstly we have to give the current password then we can create new password so let's give the current password and then new password this is the new password once more and superb so you can see root hat bit films - tutorial this is the server name we have configured and congratulation you have successfully logged in to your server via SSH so this is supremely cool but you can see you have now hash but if I log out from here I will say exit if I am on localhost that means I am using terminal for my computer then have the dollar here and if I go on the server and the new password then you can see we have the hash and if you're not getting that if you are using Windows I highly recommend you to go and download get bash so you have to say just get you just have to search for get and you can download get from here and even that if you want you can download github github also give you the get bash and one of the ways you can get the get bash that will be cool for using all these things I recommend that so go and catch that in this episode we are going to create the ssh key and also going to restrict the login from the root and we will create a new user to enhance the security of our server so let's see how we can create that I am on the server I have already logged in here and then I will create a new tab here to create SSH key you have to type ssh - key gen then you have to specify that type or the encryption one is e d to 55.9 other is RSA i think there is something DSA I'm going to use RSA because it is quite famous then we have to provide how many bytes you want to give so I will say 4 0 9 6 because 1 0 2 4 x 4 is 4 0 9 6 and then the C flag as a identifier so I will say server that's nice it's creating the file and here it's asking for new name I have already ID underscore RSA so I can't create that it will overwrite that and now I have to create a new one so I will paste the whole part then I will say ID underscore server so passphrase I'm not going to give any kind of passphrase it will enhance one more layer of security by giving the passphrase for your SSH key with SSH key you can only low in from your computer where the private SSH key is placed on your computer like so this will enhance one more security one security is that no one can log in from SSH key other than your computer but if your computer it can be accessed by many people you want to restrict login then over SSH key there is passphrase so I'm not going to give that that's okay and you can see the SSH key is created to see where SSH key is placed I will go to CD then dot SSH folder and list out everything and you can see we have ID underscore server and ID underscore server dot bu b dot EU b stands for public one and this key we will go and share with other server or other services like this server we will go and share with that and then when we connect via SSH key to any other service whom we have given the public key it will match with private key and then provide you the access so let's now cat ID underscore server dot PU B's remember to copy dot P UB and I will pipe it with PB copy so it will open and copy in the clipboard so we have that on our clipboard and now on the root of this server I will say ll to list out everything and you can see we have this dotted SSH and this time I will go inside SSH to a dot SSH and once more authorized key we have so let's open this authorized key with vim so we will say vim auth and press tab tour to complete this and now paste that first F is not there so go at the top type s and then press escape : w q WQ stands for save and quit okay so hit enter and it's configured so this means if I now exit from here and you can see I'm on Mac so now if I try to login with SSH only so SSH then - identifier identifier is inside dot SSH and ID underscore server and I don't have to provide bu B because PU be for public and we are going to say ok match with this private key ok then root at and IP address which is one 39.5 9.95 dot 200 ok that's good and try to hit enter and see the magic you can see we have bypassed the password layer that means we don't have to provide the password for logging into this user and that's good but you will say sarthak that's easy way but what the big benefit of using SSH key to show that thing I will create a new user and what I'm trying to do I'm trying to restrict the login with the root I'm trying to list restrict login with the password you can see we can login with SSH key or with the password we have for this user so we will restrict both of these thing and only allow the new user we will create with SSH key so let's say add user and user name is bit fumes and it's asking for new password for bit fumes user so let's give the password and some details but I'm not going to give any detail and that's it this means I can go to this bit fumes user so pseudo pseudo a stands for administrator this means the command you are going to run is as an admin as an administrator so switch user so su sudo su bit fumes and you can see we have now changed the user so let's go to base path ok and now if I try to go back to root sudo su switch user to root okay it's asking for password but here's the problem you can see we cannot run any sudo command because bit films user is not as sued or not as to do or means it's not the admin again so let's make bit fumes as a pseudo ER so exit from here and we will land on root user so let's say user mod - a then G then we have to say admin and which user we want to provide as a admin so big films great nothing happens it look like nothing happens but if I now try to say sudo su bit fumes and yes that's okay and again sudo su root and with the password you can see we have switched to root user so let's once more go to pit fumes user and configure oops configure the SSH key so if I try to see there is no dot SSH folder if there is not Doe dot SSH folder there will be no authorize the key file so let's create mkdir dot SSH directory so go inside dot SSH we are on dot SSH folder okay and now here I will create a new file called authorised and remember Z on the authorized not F and then keys and remember s in the key is plural okay open this and we have to paste that file we have so once more copy this from here paste it and similarly one more F escape : WQ enter and yes so let's exit from here once more exit from here once more exit from here via days kind of exits the ass we have switched between the user we have to log out between the users similarly so once more exit and okay so now I will say SSH with the identifier of dot SSH ID underscore server and not dot tu b we don't have to provide to you B then this time bit fumes at one three nine dot and what that 59.95 dot two hundred is e okay let's try to login and you can see we have locked in as a bit films user without providing any kind of password but how we will restrict the login with password and how we will restrict any type of login from route because route also can login with SSH key so let's now open as a sudo vim and then we have to say et Cie then SSH then SS HD under school config okay provide the password yeah this file so if I scroll down you can see there is permit root login so I will say this as no to go into insert mode I will press I and no then again go to the bottom and here is the new thing password authentication so here also no this means we have restricted the login width password also restricted by any kind of login with root so press escape : WQ save and quit and that's good so exit from here and we are on our mat then let's try as a search root at one 39.5 9.95 dot 200 remember this great and then hit enter and it's asking for password why is that we have done everything correct so let's go inside the server end do one thing to have everything done so go inside okay we just have to do one thing every time you change any kind of configuration to any kind of service you have to restart that service as a pseudo er so pseudo service and services SSH and just say restart and then this means if I now try to log in you can see it's not asking for password it says permission denied similarly if I say as such bit fumes add to one 39.5 9.95 dot 200 it's also restricted but here is the cool part we can still log in with bedrooms as the ssh similarly if I try to login with SSH to route let's see the what happened it's not asking you it's not giving you permission to go to server because we have told the SSH that restrict any kind of login from route this means only way to go to server is wire SSH key two-bit films user so this is great great functionality and great enhancement in our server security so let's now see how we can upload or how we can deploy level app on this server to have level V is firstly need PHP then we need nginx then we also need MySQL as a database and more importantly we need get so let's see how we can deal with these things so what we have to do we have to run every command as a pseudo so to have software's on your Ubuntu server there is a package manager called act get so apt-get it's like a composer or NPM node package manager it will manages your packages or the software's so firstly we what we have to do we have to say apt-get update so first time we will see an update so let's hit enter and it will up everything we have already on our human server so apt-get is updated and firstly to install PHP we have to firstly check what papers are you going to give because you want to already have PHP so to see that we have to say sudo apt then cache it then search for PHP let's search for PHP and then you will see we have yes you can see at the bottom we have PHP 7.0 or we can just say PHP - V to get the PHP version we have PHP 7.0 so how we will install PHP or the latest PHP so to install the latest PHP we have to say sudo apt-get PHP 7.2 - CLI let's see what will be the result see a lie it says PHP 7.2 - CLI doesn't recognize as an invalid operator okay so what we have to do firstly we have to install a repository so again sudo add app rip depository and what that repository is a PPA repository and name is on Gretsch flash PHP it will provide lots of PHP packages so make sure you will provide apt spelling right okay and now it will ask you to continue then hit enter to say yes and this time you can get lots of PHP version so again I will say sudo apt - search for PHP and then you will see we must have somewhere PHP 7.2 but it's not here because we just have to update our apt-get so one small sudo apt-get update and let's see what we are going to get so here in just a few second we get one problem it says launch pad dot net is not there we have to install that first here so once more sudo apt-get and we have to install a repository so not get app add repository you can do ad apt or apt add as you want and then this one and don't worry about this I will paste these things in the description so you don't have to remember or see what I am typing and then you have to tab you can just copy and paste from the description so we have installed that so let's install this is okay this repository we have installed to install our launchpad so sudo apt-get and launch pad - get keys this is the software we have to install so let's hit enter this is because we have to say here install okay so install launch pad keys now it's installing and it's done no unable to locate package if you face this kind of problem once more you can do apt-get update so it will update these things and again obviously we have error for that repository PPA repository so now let's try to install launchpad once more and this time it is successful and now what we have to do we have to say sudo and then Launchpad get teased and it is now getting that key and everything is good this means if I now update we will not get any kind of error for like this okay so let's now one small update lots of time we have to update so successfully done and this means if I say sudo apt cache search PHP and this should get PHP 7.2 this means we can install anything related to PHP 7.2 so now let's install PHP 7.2 so sudo apt-get install and I'm going to give Y flags so that it will not ask are you sure you want to install like that PHP 7.2 and firstly the CLI then PHP 7.2 fpm then PHP 7.2 once more here comes MB a string okay and then PHP 7.2 and here is MySQL so my SQL then PHP is 7.2 curl and then comes PHP 7.1 not - because 7.2 M crypt is depreciated so 7.1 m crypt because level need M crypt okay so everything is set up let's now hit enter and let's see what information we are getting it's installing everything each and everything now our PHP is successfully installed so let's see I will say PHP - V and this time at lost 7.0 it's 7.2 for Ubuntu CLI and everything is set up a lot now we just want to install MySQL server so sudo apt-get install MySQL - server so it's an easy job and it will download it very soon so when first time MySQL install it will ask you to create a new password so I will say password as 1 2 3 4 5 6 ok 1 2 3 4 5 6 1 and till then continue its downloading so now you can see my SQL is successfully installed so if I say my SQL then I will say - you for user which is all already rooted and then password and hit enter and one two three four five six and you can see we are on MySQL so if I say show databases and close this line hit enter yes we have the database so now exit from here okay then what we have to install sudo apt install but apt-get install nginx and that's supremely important thing so yes I want to install that and now index is also completely installed so if I go to flash let's say ll then ET ce / and let's visit the list of the things we have this time on the etc folder EDC folder yes we have nginx folder this proof that yeah we have nginx and then the next part engine X after engine X we need the gitch and so install and get also and get is also install so to have the gate gate - v and it says i think we have to say version is that double okay yeah so gate version is two point seven point four so gate is also installed one last thing we have to say to install which is kit and then zip and unzip this is also required by the composer when it download the package and by the way you can do all these things in a single line I have just shown you two shown you separately the MySQL then engine X then gate you can just simply say zip unzip gate then engine X and then minus QL - server all these things okay so that will save your time so zip unzip and that's all so finishes these things this time to have connection between the server and the github via get to deploy the level app so let's see how we can do all these things so I will go in a new terminal and create a new level project and that inside our desktop so desktop and I will say level new deploy a simple name for a new project while it's deploying let's now go to server and here on our server I have to create a new SSH key for our github so I will say SSH - key gen then type RSA and as I have told you there should be II D - five five one nine also but let's stick with RS a then how many byte 4 0 9 6 then identifier let let's say github ok and name is good because on our server we don't have any kind of SSH key so ID underscore RSA name is good so that's ok no passphrase that's nice and let's now open cap then dot as a setch then ID and the school are f e dot pu b we have to copy the public one so copy this one from here and let's open github here on new tab so github and let's now create a new repository and i will call it deploy and I will say deploy level on digital question okay so that's search create repository and yeah we have this so firstly what we can do before adding this SSH key you can see our level project is installed so let's go inside our project which is deploy and now we have to say git init then get add all then get commit - M and I will say her initial comment then get now comes here these two commands so let's run this - and now this project is on our github so if I now refresh here we will see the app is here okay so now let's connect our server with the github via this SSH key so copy once more go to Settings deploy Keys add deploy key call it for tutorial and then add key there is option called allow write access I don't want to write from server and I think we never write from server we always write from look lost okay so add key that's good but how we will ensure that it's connected properly you can see it's nothing written here and nothing written here so there is a way to check you will say SSH then - capital T then get at github calm let's check this connection and yeah you can see it says halibut films / deploy because this repository we have connected you have successfully authenticated this means if I now go here on github refresh this page we should see it is green this means what we can do we can now clone this repository so I will say git clone and then go here under deploy and now use clone with SSH only then here the address and then I will I want to have this clone on this HTML folder okay so hit enter clothing into HTML folder okay so this will get everything on HTML folder so if I say CD into HTML and I will list everything and you can see we have all these things that's nice that's very nice but we want to composer update so if I try to use composer it will say a composer is not installed to install composer there's a long script and that script need curl so curl then is small F then capital s then here I have to say HTTP colon slash slash then get composer and that should be a sheet EPF get composer dot o-r-g slash installer and then we have to pipe it with sudo PHP then double - then again double - and then install and dir and re and that should be installed - directory is equal to its user then slash local slash bin we have to provide the file name so file name which is we know that it is composer so let's install this one and the defined install directory does not exist yeah because we have to say here / ok now it will continue download ok that's downloading composer and composer is successfully installed so if I say composer here yes we can see we have the composer here so now say composer install and remember I am on HTML directory where we have installed or cloned the repository now say as install and there are many kind of problems here so these problems are it's trying to install PHP unit but we know that we are on server we don't need these dev dependencies so I will say composer install - - no dev and this will install only products level packages and now composer is updated so let's now change our dot e NV dot example file to dot env file so if I list out everything you can see we don't have any dot V file s instead we have dot E and V dot example file so let's type CP dot e NV dot example 2 dot in the only then PHP artisan and then we have to say key generate yeah everything is set up for level aspects let's now go to server and let's see what we are getting so this IP is here and if I go here ah we still get nginx this means now we need to configure the engine X so now the only thing remains is engine X configuration so let's again go to terminal and I am on the server and inside this HTML folder where I have installed this level app so let's go to the base user folder and then we have to configure the engine X so now let's go and see how we will configure that so let's just go to e TC folder then nginx folder and list out the contents we have various contents but the important one is sites available so let's now go to sites available and we have to open this with vim so sudo wim sites available and password ok so only site is default so let's now quit from here and now this means we have to go inside default ok so this means now we are on the configuration of nginx so first thing first you can see it says root is VAR w w but we want inside HTTP there should be a folder called public and where I am typing okay right here we have to first go to insert mode by pressing I and then say public and that's good then what we need we need the nginx to run index dot PHP file not this one so index dot PHP file and then we don't want any four zero four if I go IP address slash something else so let's now see if I go to any of the URL it will say not found but we want to search for that page also so I have to say here firstly slash index dot PHP and then I have to find is there any argument so is underscore arts if there is argument then give that argument so that's good so remember there is no slash there is no - dollar is under for arcs dollar arcs then we have to uncomment this one okay so firstly this one let's uncomment location PHP and then here tell fast CGI I pass UNIX this is actually the path of PHP F p.m. which convert the request but we are using 7.2 PHP so 7.2 have an FP m dot socket and let's remove this one also so everything is good let's now close this so escape : WQ and this is good but if I now go to CD inside var www yeah we have HTML folder but inside HTML folder we don't have the project our project is inside our root HTML folder so CD HTML and yeah we have this so you can see it's on route not on yww HTML so let's now do one thing let's go to this and I will say move this HTML to VAR slash double double double slash HTML but we have to move this into HTML so we don't have to provide HTML here okay so let's hit enter and that should be war okay and now it says there are tree not empty the directory we have on our www and this HTML we have seen that that's not empty so why not delete that so remove our F HTML and it says permission denied okay run as a pseudo and yes so if I now list no HTML this means go to base and then sudo move HTML to var double W yeah we have done that and now cd1 www and list out the contents this means we have the HTML and this means if I now go inside HTML and list out contents yeah we have this so let's go here and refresh and it says again 4:03 forbidden forbidden not four zero four nothing else forbidden that is because we have changes the nginx but we have not restarted the nginx so sudo service nginx restart there is a way to check nginx is working properly or not so I will say engine X - t and you can see it says some error we have on our nginx could not a open file log error dot log okay so let's try this with sudo engine X - t okay so test is successful this means we have some problem on nginx configuration so sudo TDC nginx besides - a label / default default and all these things opening with wim so then okay so the important thing we have missed out we have to uncomment this one also include snippets fast CGI PHP conf this means if I now save and quit and sudo service nginx restart restart okay so let's now go to Safari and reload and this is good at least we are getting some level related thing and we know about this so there is an important thing which is related to permissions I know so you can see it says permission denied so you know that it's because of the permission so here we just have to say sudo CH mo d and then - capital r 777 for storage so we are providing storage read write execute permissions so let's hit enter no storage file because we have to go inside c d VAR www HTML and now run that command ok it's good go refresh and you can see level is here so congratulations everything is set up here so what important thing you have to do if you ever make changes on your github what you have to you just have to say git pull okay so get boy they'll get the changes and do everything so it says already up to date if you change something it will do the change here and everything works fine so let's now connect our little app to our database we have installed the MySQL so if I type here my SQL on our server okay we have to provide the username as root and then also the password which is one two three four five six for this time so show databases so you can see we have this database we have so now let us now create a new database so create database and this database name is tutorial ok tutorial that's great but again my mistake we have to provide semicolon before pressing the enter ok so it is done and let's now exit from here and let's go to one www.h tml and i will open dot env in fame so when is good go to insert mode by pressing i and database we have created just which is tutorial and then username is root so root and the password is one two three four five six so skip : WQ and everything is good this means if I say PHP artisan make on it will create authentification square folding this means now we will get log in register buttons here so refresh and yes we have so now let's register new user here so salzach here then starter CAD bit films.com 1 2 3 4 5 6 1 2 3 4 5 6 and click on this register button and we have this ok unknown database I have misspelled the database so when in them go to database name I think you have spotted this problem okay so not a big deal and let's refresh once more ok so it says user not exist this means we have to run PHP artisan migrate this will create these tables and now if I run send this once more and yes we have successfully logged in that means everything is good so here if I go to MySQL ok again root and then password is 1 2 3 4 5 6 so show the base and this time I know they have to provide the semicolon and databases and then we have this tutorials database so the last thing remains is that let's connect the database with our sequel Pro because we have the habit of viewing the database on these kind of platforms so let's name it tutorial and give the IP address and then route the MySQL user name and then password is 1 2 3 4 5 6 then database name tutorial and standard port 3 3 0 6 again IP address and comes the username and the SSH key and again that has to be the secret for not public one and the port is truly do correct and you can see we have successfully connected and we have this Santa CAD bit feels calm this is the user we have created on our server so in this way we can connect it to database on digital ocean server so as our app is successfully installed or deployed on human to server a digital ocean it's time to have the cue worker on our level app in the localhost we just run PHP artisan cue work but this will not the case in the server in the server you need to have a service called supervisor that's right supervisor but what this supervisor V do it will continuously run that command so firstly we need to install it so let's see how we can install before going to the installation process I highly recommend you to go to bit films.com where I have written each and every step with the codes you need on this episode or even on this whole the course of deploying level to you into server you can see this course having seven blocks or seven articles and if we need this setting up the cue worker okay so let's click here and to install we need to run this command so let's run this command so here we have this command let's run it and it will asking for continuous yeah we want to continue okay it's super easy supervisor is installed let's see the next command okay so we have installed the supervisor but we have to create a new configuration file for our level cube how we will do that let's first see so let's go to CD inside etc' folder and because we have installed the supervisor we can see we have a folder or a directory inside this so if I list out content I will see supervisor directory so let's go inside supervisor supervisor and inside this we have conf dot d directory here in this concept dot d directory we are going to put our configuration file so again let's see D inside conf dot d you can just see d ET c / supervisor / confidant c so we have to firstly create a new file to create a new file you can use this command sudo wim EDC supervisor cons dot d q worker conf so let's just piss this but because i am already on this directory i don't have to say here all these things so i can delete this or you can just go to root of this user and run this so what this command will do this one run as a pseudo it's going to create a new file called queue - worker conf dot conf is important but this can be any name you want so let's just hit enter and yeah we are on Zim and now we have to give the configurations so what the configurations we have to give here whole of the configuration is written in this article I have told you so just copy this from here and paste it and what it will do let's just see one by one so firstly it's not properly pasted and I have missed something so I have to say here program : q - worker ok so this has to be important the file name we have given that has to be exactly same here and this is done we don't have to anything else so let's just give here ok and let's first understand what every line do this is going to define the program name that is Q worker and the same is here process name process name is also the same and now the actual command come is PHP artisan q1 yeah that's okay but where this artisan is inside are you in the server it's inside VAR w w HTML folder and inside that we will going to run artisans so PHP then artisan q work super easy then we have to say auto start yeah true every time we want to auto start or to restart also and username root number of process so it will it will process eight times any job if it is not successful on the first attempt then some of the logs are written on this project worker dot log file so this is good so press escape : WQ and hit enter it is saved now so let's see what the next process okay so we have done and we have understand these lines so we need to read read okay so what this mean we have done a new configuration for supervisor but we have not told supervisor to read that so we have to say pseudo supervisor and supervisor CTL it's like command line tool okay so CTL supervisor CTL then the read and you can see it says queue worker is available it's now available it says available this means it's not included in the service so to include in the service we have to say sudo so providers TTL update same thing but here come update and now added to the process growth so this means it's added to the process group but how we will check that our queue worker is working properly or not for that let's just clone that repository that deploy repository and create a new queue thing so I will open a folder and in this folder I haven't going to copy so I will say git clone and all these things and let's say deploy so it's now cloning is in everything okay passphrase that's good and it's now hat so if I say CD deploy so let's open this project in sublime so as you BL and here that we have so let's go to web dot PHP file and here I will create a new route and that route will be like get off check q okay and let's give a closer and here I will say firstly mill to make films soldered at with films.com and then we have to say send a new test meal and it's done then just going to return working okay and we have to create this test mill so let's go here and I wish the artisan make male and decimal which is going to create it on app mail Testament and here we have to make sure that we implement should queue so we have to make this as a should queue and now let's just going to give welcome page as the email so we just need to have these things at the top use these things at the top so mail is here desta mail is here and now everything we have to push on github so now we have to firstly add everything to staging area then get to commit with the flag of Q over curl and that should be okay and then we get push and this will push everything to our github so give this as H key password and yes we have done everything now let's go to our server here what I will do you can see I'm on the base user folder and let's go to war www HTML and here we have to say git pull we have pushed to deter now we have to pull everything and if this is the case permission denied then use pseudo pseudo and then we have to give the password for this user and now it's going to get everything this means if we try to open routes slash web dot PHP file you can see our check queue is here and let's now quit from here that means skip : + Q and now we have to create the few tables so PHP artisan queue table and it's created migration is created and this time PHP artisan migrate so we don't have any jobs table but after this we will see we have jobs table on our server database so this means if I now go to Safari and here I will say check queue hit enter ah it's taking time and it's something error that's because we have not configured our dot V file so let's say sudo wim dot env and okay and now we have to configure firstly the queue driver you can see queue driver is sink but we don't want sink one we want database and then obviously the male trap username and password user name is that and password is this then the ll s and W Q okay quit saving so this means if I now go refresh this instantly we get working and if I now go to job stable it's has the job it's not attempting this means we have to restart the supervisor so pseudo supervisor CTL reload okay and this is reloaded and one thing more we have to say supervisor that should be like pseudo service supervisor restart okay everything is set up so once more refresh and we should get one more here and you can see the attempt is one this means if I keep refreshing it's not here and now go to Chrome and see here we have the test mail which we have sent so let's delete everything and once more try here and refresh this yes it's working so wait for just two few seconds and five four three two one and hint me live there so Q worker is successfully working on our Ubuntu server so if you have learned something from victims and you want to donate just go and begin patreon even one dollar a month will be a great help and if not just subscribe to this channel because here level knowledge never ends and don't forget to share this video with your developer friends so that everyone get the knowledge of best thing called lateral so we will need in the new series somewhat and till then good bye
Info
Channel: Bitfumes
Views: 23,189
Rating: undefined out of 5
Keywords: digital ocean server, digital ocean droplet, ultimate guide to deploy laravel, deploy laravel, best laravel tutorials, laravel deploy, laravel forge, digital ocean, linode, laravel aws, laravel digitalocean, laravel server, upload laravel project, laravel project deploy, digitalocean droplet, digitalocean server, queue worker, supervisor, queue server, laravel queue ubuntu, server queue work, queue work, laravel supervisor, supervisor ubuntu
Id: T0axT6SJzbk
Channel Id: undefined
Length: 61min 40sec (3700 seconds)
Published: Wed Jan 24 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.