What is Google Cloud Platform ?
Google Cloud Platform is a data center infrastructure that Google uses for their products like Youtube, Search, etc. GCP is one of the popular cloud services especially for startups and websites since its price is cheaper and affordable than other cloud computing providers. Other popular cloud service providers are Amazon Web Services, Microsoft Azure, Oracle and IBM Cloud.
Google provides 300$ credit for free to new users. We can use this to host a new html site for free.
Steps for hosting a website in Google Cloud Platform :
- Signup for free quota from Google cloud website https://cloud.google.com/ using your google account and validate credit card details.
Then Create a project by giving your needed website name.
Create an app in App Engine https://console.cloud.google.com/appengine to your project
To Deploy your website to the created app, download Google Cloud SDK from the link https://cloud.google.com/sdk/docs/quickstarts .
Run Google Cloud SDK
Create a website design for your startup in
path_to_website_root_folder
Point command prompt to the folder the website files exists
cd ../../path_to_website_root_folder/
Create
app.yaml
file and map website files in the website root folder. Follow the standards and code snippets in the link https://cloud.google.com/appengine/docs/standard/php/config/apprefDeploy the app using command
gcloud app deploy
https://cloud.google.com/appengine/docs/standard/php/tools/uploadinganappThe files will be uploaded successfully and a subdomain will be generated on appspot domain. You can use that subdomain or connect your own domain to the project. https://console.cloud.google.com/appengine/settings/domains.