Deploying Laravel with Digital Ocean using Laravel Forge: Creating the Server

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] in this video we're going to demonstrate how to deploy a larval application with digital as the server and laravel forge as the server management and deployment service so in the previous video we tried to explain the the process of deployment and also the different components and technologies that we need in order to to do it so today we're going to create our server with the digital ocean um of course using the larval forge so the application is already up and running so for the sake of the the video i'm going to start from the scratch and delete the server i redo all the configurations so i just need to make some backup on my database just in case something goes wrong um [Music] by the way i'm using a mysql for storing all the data of the application uh we can use other type of database but sql type of database is enough in order to satisfy the requirements of the project so it contains a lots of crowd operations such as create delete edit update [Music] so this is a management system and my sql database is enough to satisfy the requirements so the first thing that we need to set up is the server so the server is actually also a computer or a system that provides resources data services or programs to other computers known as clients over a network so in theory whenever computers share resources with client machines they are considered servers and there are many types of servers and one of which is a web server so in our case we're going to use digitalocean in order to create our server but we're going to manage it using larval forge all right so we're here in digitalocean as you can see it doesn't have any servers yet so it's empty we can create our server using this a droplet but we're not gonna do that so instead we're going to use laravel forge to create our server uh but before we do that uh we need to have an information about this digital ocean to link it to larger forge so they created this api so we can generate a new token and put it in laravel first so that the larval forge will acknowledge this as a legit application so let's generate a new token let's just name it to make it simpler okay so the token has been generated so this is the profile name and this is the actual api token um a different token will be created for you so don't copy this i'll do this i'll delete this later so i'm just gonna go ahead and copy this and put it here in the server providers part of laravel forge um you need to select the digital ocean so there are other options for a new provider like me node amazon hedge engineer cloud so previously we used amazon to create server but because we wanted to save money but it turned out um it cost us a lot and so amazon has a free tier that anyone can use to avail one year free of charge access to all the resources but instead of saving money it costs us a lot because we're always exceeding the limit of the future so last time that i checked we spent almost 70 dollars a month just to host our one website in one server so instead we migrated to the digital ocean the digital ocean is basically the simpler version of aws and it's cheaper and it's so easy to use uh in analogy if you would like to buy a toiletries you can go to walmart to buy your toiletries so in walmart there are a lot of options and you need to go to that specific section just to buy your toiletries so instead of going to amazon walmart uh why don't you just go to watson's or a boutique just to buy your toiletries so that's what we did we go to digital ocean and pick up what we only need so we don't need that much so we just need this that's why we go to digital ocean also digital ocean has this motto that make it simpler so it's easy to use and you won't feel overwhelmed when you go to their website it's so user friendly it has like the shark the ocean all the concepts are user-friendly so anyways let's um enter the profile name that we've created earlier which is the forge and the api token and let's hit the add credential so let's just wait for a second and then it will appear here so now the laravel forge um know that we have a server located in the digital ocean so instead of um inputting login credentials the username and password every time that we link uh this larval force to digitalocean they've created an api um as a way for verification for authentication so just put it there and it will do the rest all right so that now that we've linked the larval force to digital ocean let's create our server let's go server management [Music] in this section of laravel forge under the billing page there are plans that you can avail depending on the depending on your application and your needs so in our case we have availed the hubby so it's the cheapest one just 12 dollars per month on top of the um the digital ocean expenses so with the happy plan you can only create one server and you can but you can host multiple sites so just one server and then multiple size plus the other disadvantage of hubby compared to other plants is that you can't monitor the performance of your application so if you would like to see more features of the laravel you can go with growth or you can go with business so let's go with the server to create our server servers alright so again we have different options but we're going to select the digital oceans so automatically the credentials will be selected and then also the type of the server so it's an observer and then let's put the name of our server as digital ocean and then for the region this is the different data centers of digitalocean so we're going to select the data center that is nearest to my place so i'm from the philippines so we're going to select singapore and then the next one would be selecting the server size so each option here has a specific amount of payment that you need to pay so we're just going to select the four gigabytes of rom with two cpu cores and then into gigabyte ssd storage so that's enough for our application in the future if we realize that our applications are getting a lot of um visitors and the users are interesting then we can easily upgrade our server size so we'll leave everything as it is the php versions 7.4 and then post revision recipes just none and then we're going to use as i mentioned earlier a database that is my sequel with version 8.0 and then the name of our database would be the name of our application so let's just name it the pmo code um if this one would be automatically selected so we're just gonna leave what it is and then we're not gonna enable digital weekly backups because uh we're going to do it manually so after all of those are filled in we're going to hit end with our server so it will take some time to provision um probably 10 to 15 minutes depending on your internet speed so this are the credentials for our application so we're gonna copy and paste this and save it to a note tab uh so i'm just gonna do that while waiting for the provisioning i'll be back [Music] so while waiting for laravel forge as you can see here in the digital ocean our server has been created and it's showing here that it is being provisioned now so let's go and take a look at inside so the droplet has been created but it doesn't have any information about our applications yet of course we haven't linked our applications yet so you see i'm using larval forge we are able to create our server in the digital ocean so this is the specification of our our server let's take a look at that four gigabyte and then 80 gigabyte disk um so let's explain that plan uh let's just go and search for digital ocean plants okay so here basic droplets so there are other plants that we can choose from but we have selected this one this row so it's two vcpus for terabyte transfer 80 gigabyte ssd disk and it will cost us 20 dollars a month so this is a lot cheaper compared to amazon 70 dollars per month right um so we've selected this because this is like the server that is enough for what we need we can depending on the result of the performance for the first month then we can even downgrade our server or we can upgrade it up depending on the performance um so this is what we call the basic droplets so this is the cheapest of the cheapest um if you go down here there are other options category for the plan like general purpose droplets and then we have the cpu optimized um we have the memory and then we also have the storage droplets another thing about basic droplet is that it is a shared server which means that there are lots of applications in that server and all of you are actually sharing that resources so if it uh just happened that one applications in your server has a lot of users and um can consume a lot of resources then um your application will be compromised all will suffer because of that but i think we're not gonna be experiencing that i don't know um it depends on the performance so that's what the plantative selected basic chop that's for four gigabyte to vcp use for db 18 gigabyte for 20 per month and 0.0 30 uh an hour so actually digital ocean has this technology called the hypervisor so if you're you create a droplet aka server then a virtual server will be created for you and then let's go back to laravel forge and see the progress of our server so there are different steps that are happening here and currently we're still here installing base dependencies so we have prepared the server configuration config configuring swap installing page dependent thing installing php installing jinx which is the web server and then the database the redis the memcache and then finishing up so i think it will take more [Music] uh 10 minutes more to finish so let's go back again later
Info
Channel: Carpio Tech
Views: 1,049
Rating: undefined out of 5
Keywords: #laravel, web, server, digitalocean, cloudservices, deployment, laravelforge, filipinoprogrammer
Id: EfxQgqECNWo
Channel Id: undefined
Length: 16min 15sec (975 seconds)
Published: Sat Feb 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.