简体   繁体   中英

Google Cloud Platform files location

I wanted to move a website from a shared server to Google Cloud but I cannot wrap my head around it. Before giving up completely, I decided to make this question:

I already completed the Hello World tutorial ( https://cloud.google.com/php/getting-started/hello-world ). But what if I want to update the index.html file? Where would I find it?

I was expecting to see it in one of the storage Buckets, but that's not the case... even when installing a Kubernetes Engine.

If you decide to use Google App Engine Flexible (as the hello world sample app that you linked to) you need to understand the idea of this additional layer of abstraction over your server(s). App Engine Flexible is designed to make things easier for you - you focus on your code in your local machine where you modify it, update it and then with one command ( gcloud app deploy ) you instruct the App Engine to do one of the following:

  • start a VM (your server) and a Docker container with your app in it if it's not already running
  • in case you are updating an existing app, it will update the code in the VM which is your server. If your app receives a lot of traffic, you may have more than one container and VM running and all of them will get updated.

Both things are presented schematically in the image in this section .

This way you can develop your app locally and not worry about actually getting inside the server with for eg ssh . Your code is there in those VM(s) and App Engine manages it for you (however, if you really need to, it is still possible to ssh into the VM in App Engine Flex environment ).

If you have a static website, it can be hosted in the Storage buckets , which is a different scenario. However, as you're using PHP I assume it's more likely that your website is dynamic.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM