Blog

Hosting a static web app on Google Cloud using GCS

January 29, 2021 by in Agency

therefore welcomed get cooking in gloom where we share the best recipes to apply in your cloud kitchen I am Priyanka Vergara and in this episode we will talk about creating static websites on Google cloud let’s say you’re a small company looking to set up a basic network proximity you don’t expect a lot of traffic and don’t want to pay a lot to get up and online so let’s walk through how to start small-minded deploying a static website static web pages can contain client-side technologies such as HTML CSS and JavaScript they cannot contain dynamic content such as server-side scripts like PHP before you begin make sure that you have a google mas programme developed a billing note set up and you have a domain that you own or oversee this should be your top-level domain to verify that you finagle the domain check the link in the specific characteristics below now that you’ve included the logistics there are four steps to setup static websites the first step is to connect your subject to Google Cloud storage to do that create a cname record that points to CDOT storage Google API is calm the second stair is to create a Google Cloud storage bucket to do this browse to the Google Cloud console click on gloom storage and sound organize pail make sure the bucket identify equals the cname you created for your discipline in such cases the storage bucket is advisable to mentioned www.example.com the third stair is to upload the records you crave your website to serve you can do this in one of two ways firstly by instantly uploading the documents applying the Google cloud console or second by abusing gsutil require cable which is great for when you have an existing website once the data are uploaded accessing them is going to be based on how you choose to share your files if you adjust the permission at the bucket statu you can easily and quickly conclude every file for your area publicly for finer switch you can choose to set the permission at the objective elevation so that merely specific registers are accessible through your website at this target you have a functioning static website and you could call it a period but we recommend naming an indicator page suffix and a practice mistake page to better leader your users this helps in situations when a used might request your URL but you do not have an Associated file with that word in your bucket in our pattern when there isn’t a register identified Apple cloud storage will attempt to serve an indexed our HTML if that datum also doesn’t exist mas storage will return an error page with the 404 response now the fourth and final step is to test our static web site verify that the content is served from the bucket by request the domain name in a browser one important thing to note here is that Google Cloud Storage exclusively patronage HTTP in order to serve HTTPS and get all the security goodness you need to either abuse steer your eyes abusing a cname redirect or move to using a consignment balancer as a front-end so today we learned how to start big and deploy a static website on Google cloud platform we exploited Google Cloud Storage to host the static content and targeted the domain name to the storage bucket that’s all for today on do cooking in cloud here’s hoping you can whip up something great join us next time because we will share the recipe to host websites on administer scaffold vapour led if you like this video then check out our first occurrence as well and to see more such content don’t forget to Like and subscribe to our Channel you[ Music][ Applause][ Music]

null - Hosting a static web app on Google Cloud using GCS

Leave a Reply

Your email address will not be published. Required fields are marked *

    X
    Cart