From 1c835255cc9dc0f00618e6017f2abfc5968a56f2 Mon Sep 17 00:00:00 2001 From: SamyOubouaziz Date: Thu, 7 Aug 2025 17:31:50 +0200 Subject: [PATCH 1/2] docs(srv): add Metabase x VPC x CaaS tutorial MTA-6298 --- .../index.mdx | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 tutorials/metabase-postgre-containers-private-networks/index.mdx diff --git a/tutorials/metabase-postgre-containers-private-networks/index.mdx b/tutorials/metabase-postgre-containers-private-networks/index.mdx new file mode 100644 index 0000000000..522866175e --- /dev/null +++ b/tutorials/metabase-postgre-containers-private-networks/index.mdx @@ -0,0 +1,73 @@ +--- +title: Deploying Metabase in a Private Network using Serverless Containers +description: This page shows you how to deploy Metabase in a Private Network using Serverless Containers. +products: + - serverless-containers + - postgresql-and-mysql + - private-networks + - vpc +tags: deploy metabase virtual private cloud private networks serverless containers +dates: + validation: 2025-08-07 + posted: 2025-08-07 + validation_frequency: 12 +--- + +import Requirements from '@macros/iam/requirements.mdx' + +Metabase is an open-source business intelligence platform. You can use Metabase to ask questions about your data, or embed Metabase in your app to let your customers explore their data on their own. Metabase provides an official Docker image via Docker Hub that can be used for deployments on any system that is running Docker. + +This tutorial guides you through the steps to deploy Metabase with Serverless Containers, backed by a Managed Databases for PostgreSQL Database Instance, in a Private Network for enhanced security. + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization +- Created a [Private Network](/vpc/how-to/create-private-network/) within a dedicated [VPC](/vpc/how-to/create-vpc/) + +## Creating a PostgreSQL Database Instance + +1. [Create a Database Instance](/classic-hosting/how-to/create-postgresql-database/) with the latest PostgreSQL versions in the same region as your Private Network. You can keep the default parameters, or change them according to your needs. + +2. Once your Database Instance is ready, attach your previously created Private Network from the **Network** Section of the **Overview** tab. + +3. Still from the **Network** section of the **Overview** tab, click **Remove** next to ¨¨**Public endpoint** to prevent connections from the public Internet. + +Your Database Instance is now ready to be used with Metabase. + +## Deploying Metabase with Serverless Containers + +1. [Create a VPC-enabled Serverless Containers Namespace](/serverless-containers/how-to/create-manage-delete-containers-namespace/). + +2. [Create a Serverless Container](/serverless-containers/how-to/deploy-container/) with the parameters below. You can keep the other values as default, or change them according to your needs. + - **External** container registry + - **Image URL**: `metabase/metabase` + - **Container port**: `3000` + - **VPC**: the Private Network attached to your Database Instance + +3. Add the following **environment variables**: + + | Key | Value | Comment | + |-----------------|---------------|---------------------------------------------------------------------------------------------------------------| + | `MB_DB_TYPE` | `postgres` | | + | `MB_DB_DBNAME` | `rdb` | From the **Databases** tab of your Database Instance (`rdb` by default) | + | `MB_DB_PORT` | `5432` | Default PostgreSQL port | + | `MB_DB_HOST` | `172.16.0.2` | Private Network endpoint, visible from the **Network** section of the **Overview** of your Database Instance | + | `MB_DB_USER` | `user` | The username defined during Database Instance creation. Visible from the **Users** tab | + | `MB_JETTY_HOST` | `0.0.0.0` | Must be set to prevent Metabase from listening on `localhost` | + +4. Add the following **secret**: + + | Key | Value | Comment | + |-----------------|-------------|---------------------------------------------------------------------------------------------------------------| + | `MB_DB_PASS` | `password` | The password defined during Database Instance creation | + +5. Review the estimated cost, then click **Deploy container** to finish. Deploying a Serverless Container for the first time can take several minutes. + +6. Once your Serverless Container is in a **Ready** state, you can access your Metabase deployment using the container endpoint visible from its **Overview**. + +Refer to the [official documentation](https://www.metabase.com/learn/metabase-basics/getting-started/index) for comprehensive information on how to use Metabase. + +## Going Further + +You can quickly deploy Metabase in a Private Network using Serverless Containers with Terraform/OpenTofu. Refer to our [Serverless Example](https://github.com/scaleway/serverless-examples/tree/main/containers/vpc-metabase) for more information. From ac0d9e9f6ecf871a6f9a949048898841e0d5d8c1 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Mon, 11 Aug 2025 13:18:45 +0200 Subject: [PATCH 2/2] Update tutorials/metabase-postgre-containers-private-networks/index.mdx Co-authored-by: Jessica <113192637+jcirinosclwy@users.noreply.github.com> --- .../metabase-postgre-containers-private-networks/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/metabase-postgre-containers-private-networks/index.mdx b/tutorials/metabase-postgre-containers-private-networks/index.mdx index 522866175e..c2ded1f5b8 100644 --- a/tutorials/metabase-postgre-containers-private-networks/index.mdx +++ b/tutorials/metabase-postgre-containers-private-networks/index.mdx @@ -31,7 +31,7 @@ This tutorial guides you through the steps to deploy Metabase with Serverless Co 2. Once your Database Instance is ready, attach your previously created Private Network from the **Network** Section of the **Overview** tab. -3. Still from the **Network** section of the **Overview** tab, click **Remove** next to ¨¨**Public endpoint** to prevent connections from the public Internet. +3. Still from the **Network** section of the **Overview** tab, click **Remove** next to **Public endpoint** to prevent connections from the public Internet. Your Database Instance is now ready to be used with Metabase.