Google Cloud is a full-featured web app hosting platform that can be used to deploy an Astro site.
Deploying a project to Google Cloud requires some UI clicks. (Most of these actions can also be done using the gcloud CLI).
Create a new GCP project, or select one you already have.
Make sure the Cloud Run API is enabled.
Create a new service.
Use a container from Docker Hub or build your own using Cloud Build.
Configure a port from which the files are served.
Enable public access by adding a new permission to allUsers
called Cloud Run Invoker
.
Create a new GCP project, or select one you already have.
Create a new bucket under Cloud Storage.
Give it a name and other required settings.
Upload your dist
folder into it or upload using Cloud Build.
Enable public access by adding a new permission to allUsers
called Storage Object Viewer
.
Edit the website configuration and add ìndex.html
as entrypoint and 404.html
as errorpage.
© 2021 Fred K. Schott
Licensed under the MIT License.
https://docs.astro.build/en/guides/deploy/google-cloud/