Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Add docs for deploying Infisical with GCP Cloud Run

Tuan Dang44fd35baf5e7
diff --git a/docs/images/self-hosting/deployment-options/deployment-flyio-secrets.png b/docs/images/self-hosting/deployment-options/flyio/flyio-secrets.png
similarity index 100%
rename from docs/images/self-hosting/deployment-options/deployment-flyio-secrets.png
rename to docs/images/self-hosting/deployment-options/flyio/flyio-secrets.png
diff --git a/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-project-2.png b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-project-2.png
new file mode 100644
index 0000000000..d5071cad2d
Binary files /dev/null and b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-project-2.png differ
diff --git a/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-project.png b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-project.png
new file mode 100644
index 0000000000..18f81b36d9
Binary files /dev/null and b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-project.png differ
diff --git a/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service-docker-image.png b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service-docker-image.png
new file mode 100644
index 0000000000..33451a3d11
Binary files /dev/null and b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service-docker-image.png differ
diff --git a/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service-envars.png b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service-envars.png
new file mode 100644
index 0000000000..6b8ed71e2f
Binary files /dev/null and b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service-envars.png differ
diff --git a/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service.png b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service.png
new file mode 100644
index 0000000000..cf43dbd0bd
Binary files /dev/null and b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service.png differ
diff --git a/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-select-cloud-run.png b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-select-cloud-run.png
new file mode 100644
index 0000000000..c977d575ef
Binary files /dev/null and b/docs/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-select-cloud-run.png differ
diff --git a/docs/mint.json b/docs/mint.json
index ecb2bb2581..4057f50c58 100644
--- a/docs/mint.json
+++ b/docs/mint.json
@@ -161,6 +161,7 @@
"self-hosting/deployment-options/standalone-infisical",
"self-hosting/deployment-options/kubernetes-helm",
"self-hosting/deployment-options/aws-ec2",
+ "self-hosting/deployment-options/gcp-cloud-run",
"self-hosting/deployment-options/docker-compose",
"self-hosting/deployment-options/digital-ocean-marketplace",
"self-hosting/deployment-options/fly.io"
diff --git a/docs/self-hosting/deployment-options/fly.io.mdx b/docs/self-hosting/deployment-options/fly.io.mdx
index 35e962130b..dacd9476be 100644
--- a/docs/self-hosting/deployment-options/fly.io.mdx
+++ b/docs/self-hosting/deployment-options/fly.io.mdx
@@ -75,7 +75,7 @@ Prerequisites:
<Tab title="Dashboard">
In Fly.io, head to your Project > Secrets and add the required variables.
- ![Fly.io deployment secrets](/images/self-hosting/deployment-options/deployment-flyio-secrets.png)
+ ![Fly.io deployment secrets](/images/self-hosting/deployment-options/flyio/flyio-secrets.png)
</Tab>
</Tabs>
diff --git a/docs/self-hosting/deployment-options/gcp-cloud-run.mdx b/docs/self-hosting/deployment-options/gcp-cloud-run.mdx
index 2a7f833a2d..ebd0ef39af 100644
--- a/docs/self-hosting/deployment-options/gcp-cloud-run.mdx
+++ b/docs/self-hosting/deployment-options/gcp-cloud-run.mdx
@@ -3,3 +3,61 @@ title: "GCP Cloud Run"
description: "Deploy Infisical with GCP Cloud Run"
---
+Prerequisites:
+- Have an account with [Google Cloud Platform (GCP)](https://cloud.google.com/)
+
+<Steps>
+ <Step title="Create a project in GCP">
+ In GCP, create a new project and give it a friendly name like Infisical.
+
+ ![GCP create project](/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-project.png)
+
+ ![GCP create project](/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-project-2.png)
+ </Step>
+ <Step title="Create a service in GCP Cloud Run">
+ 2.1. Inside the GCP project, navigate to the **Cloud Run** product and create a new service.
+
+ ![GCP Cloud Run](/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-select-cloud-run.png)
+
+ ![GCP Cloud Run create service](/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service.png)
+
+ 2.2. In the service creation form, select the **Deploy one revision from an existing container image** option and fill in your intended [Infisical public Docker image](https://hub.docker.com/r/infisical/infisical) in the container image URL.
+
+ For example, in order to opt for Infisical `v0.43.4`, you would use the following URL: `docker.io/infisical/infisical:v0.43.4`.
+
+ ![GCP Cloud Run create service docker image specification](/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service-docker-image.png)
+
+ 2.3. Running Infisical requires a few environment variables to be set for the GCP Cloud Run service.
+ At minimum, Infisical requires that you set the variables `ENCRYPTION_KEY`, `AUTH_SECRET`, `MONGO_URL`, and `REDIS_URL`
+ which you can read more about [here](/self-hosting/configuration/envars).
+
+ For this step, fill in the required environment variables in the Edit Container > Variables & Secrets > Environment variables section.
+
+ <Note>
+ To use more features like emailing and single sign-on, you can set additional configuration options [here](/self-hosting/configuration/envars).
+ </Note>
+
+ ![GCP Cloud Run create service environment variable specification](/images/self-hosting/deployment-options/gcp-cloud-run/gcp-cloud-run-create-service-envars.png)
+
+ <Note>
+ Depending on your use-case and requirements, you may find it helpful to further configure your GCP Cloud Run service.
+
+ For example, you may want to adjust the **Region** option to specify which region to deploy the underlying container for your
+ instance of Infisical to minimize distance and therefore latency between the instance and your infrastructure.
+ </Note>
+
+ Finally, press **Create** to finish setting up the GCP Cloud Run service.
+ </Step>
+</Steps>
+
+<AccordionGroup>
+ <Accordion title="Do you have any recommendations for deploying Infisical with GCP Cloud Run?">
+ Yes, here are a few that come to mind:
+ - In step 2, we recommend pinning the Docker image to a specific [version of Infisical](https://hub.docker.com/r/infisical/infisical/tags)
+ instead of referring to the `latest` tag to avoid any unexpected version-to-version migration issues.
+ - In step 2, we recommend selecting a **Region** option that is closest to your infrastructure/clients to reduce latency.
+
+ We're working on putting together a fuller list of deployment best practices as well as minimum resource configuration requirements for running Infisical so stay tuned!
+ </Accordion>
+</AccordionGroup>
+
diff --git a/docs/self-hosting/overview.mdx b/docs/self-hosting/overview.mdx
index 975c7ba316..d7a0ff8053 100644
--- a/docs/self-hosting/overview.mdx
+++ b/docs/self-hosting/overview.mdx
@@ -46,4 +46,11 @@ Choose from a variety of deployment options listed below to get started.
>
Deploy Infisical with Fly.io
</Card>
+ <Card
+ title="GCP Cloud Run"
+ color="#ea5a0c"
+ href="deployment-options/gcp-cloud-run"
+ >
+ Deploy Infisical with GCP Cloud Run
+ </Card>
</CardGroup>