From d90c0456b5be111b491a7f8b017d41f3b1e9dcf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elian=20=E2=98=95=EF=B8=8F?= Date: Tue, 12 Oct 2021 18:35:05 +0200 Subject: [PATCH] Add docs for deploying using Google Cloud (#1533) --- docs/src/pages/guides/deploy.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/src/pages/guides/deploy.md b/docs/src/pages/guides/deploy.md index 760404052d..e8b6f45237 100644 --- a/docs/src/pages/guides/deploy.md +++ b/docs/src/pages/guides/deploy.md @@ -205,6 +205,38 @@ You can skip the `netlify.toml` file and go directly to [Netlify](https://netlif - **Build Command:** `astro build` or `npm run build` - **Publish directory:** `dist` +## Google Cloud + +different from most available deploy options here, [Google Cloud]() requires some UI clicks to deploy projects. (Most of these actions can also be done using the gcloud CLI). + +### Cloud Run + +1. Create a new GCP project, or select one you already have + +2. Make sure the Cloud Run API is enabled + +3. Create a new service + +4. use a container from Docker Hub or build your own using [Cloud Build]() + +5. Configure a port from which the files are served + +6. Enable public access by adding a new permission to `allUsers` called `Cloud Run Invoker` + +### Cloud Storage + +1. Create a new GCP project, or select one you already have + +2. Create a new bucket under [Cloud Storage]() + +3. give it a name and other required settings + +4. Upload your `dist` folder into it or upload using [Cloud Build]() + +5. Enable public acces by adding a new permission to `allUsers` called `Storage Object Viewer` + +6. Edit the website configuration and add `ìndex.html` as entrypoint and `404.html` as errorpage + ## Google Firebase 1. Make sure you have [firebase-tools](https://www.npmjs.com/package/firebase-tools) installed.