Deploy a Strapi headless CMS backend site with Cleavr

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let's deploy a strappy cms with cleaver right here we see the splash screen for a newly deployed strappy cms let's see how we could use cleaver to deploy a new headless strappy cms out into production in cleaver you can see that i already have a provision server the cool thing about this is that this production server right here is on hetzner and i use one of their cheapest plans that they have you may think that's not super special but it actually is once we get to the build process of building the strappy cms site and deploying it later on we're going to talk a little bit more about why that is a common issue and how cleaver helps you get around it let's get started and click into the server and add a new site now on this server let's add a new site and what we're going to add is a node.js ssr app all right so i'm going to select that option and then for domain name i'm just going to use a free domain for this example and then click on add now that we have our strappy site configured i want to go into the database area and add a database for our strappy site to use i'll click on the database icon and in here i already have my sql 8.0 installed all i need to do is add a new database name a database user and a password let's call this strappy for the database name for user i'm going to put admin and password password okay i have the new database here with the user i'm going to use these credentials and add it to the strappy.env file so that strappy could connect to this database we'll now head over to the web app section and then complete the setup for our scrappy cms site first we're going to have to tie this to a repo and for this i want to use github and i'll show you why in a bit so i'm going to select github as my vc provider and repository i have this under my strappy and i'm going to click on update to save this information next thing under npm build i want to change the entry point and argument from just index.js to npm start for arguments for the build command we'll leave that as is and for the artifact path we'll add in build and then i'm going to save these details time to move on to the github's actions tab and this is really where the special sauce comes into play so before i said we're on the cheapest server that hetzner has to offer the problem with this is during the build stage of your app on that server there's not enough processing power for the server to be able to build successfully the application on that server so what we can do is actually use github actions to act as our build server that way github will build the application for us and then send us the output so we could then activate it on our server which not only allows us to host our strappy headless cms on a cheap server but also helps maintain server resources so that our server can concentrate on doing what it needs to do which is hosting our cms and not acting as just a build server so let's enable this and what this is going to do is it's going to create a new workflow file on the github repository for this project and then it's immediately going to build the project and send that output back to cleaver where cleaver will then deploy it out from there but before github completes that action let's real quick go into our environment section and add the environment variables for our project and that's just the database information i added in before and sync that up cool let's go to github and see if it's building our project all right here on github we could see this folder with the workflow file that cleaver added which shows github how to build the project and send it back to cleaver then under actions what we see is this current process underway right now let's see if we can click into it and it looks like it's currently building it we can see that github finished building the project and was completed sent the output information back to cleaver and if we go back to cleaver and look under deployments hey we could see that cleaver actually already picked it up and deployed it out and it took about 85 seconds to do that we could also see that we have some 200 responses from different areas around the globe and some latency times therefore i'm thinking that this successfully deployed let's take a look we'll just click to visit the site and all right here we go we have a strappy site that we're able to deploy without using our own server as a build server but to use github instead which then allows us to use one of the more economic plans that vps providers have
Info
Channel: Cleavr
Views: 1,928
Rating: undefined out of 5
Keywords: strapi, cms, deploy, cheap server, vps, cleavr, headless cms, headless, nodejs
Id: VTflJbYUob8
Channel Id: undefined
Length: 4min 34sec (274 seconds)
Published: Thu Jan 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.