so in the first episode we have signed up on the digital ocean with the link in
the description to get the $10 credit on the digital ocean then we have created
the SSH key and then in the last episode we have installed various things like
PHP Nginx MySQL server git zip and unzip this time to have connection
between the server and the github via git 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 desktops or 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 a 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 RF a dot tu 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 ok so
that's what 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 here 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 hey big films slash
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 on the 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 here that's nice
that's very nice 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 directory 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 production level packages and now composer is updated so let's now
change our dot e NV dot example file to dot in V 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 e 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 and that nginx configuration part we will do in
the next episode but before going let me tell you that all the episodes related
to this series you will get in the description so if you have missed out
anyone or if you have directly launched directly get this video you can move
other videos because that videos will benefit you extremely good way so if you
have not subscribed go and subscribe to this channel don't forget to like but
films on Facebook Twitter and Instagram don't forgot share this video with your
developer friends so that everyone get the knowledge of best thing called level
and the server configuration bye bye