Supabase

How to set up Supabase with Google Cloud Run?

Learn how to set up Supabase on Google Cloud Run effortlessly. This easy-to-follow guide breaks it down for both beginners and cloud veterans.

Developer profile skeleton
a developer thinking

Overview

This question dives into combining Supabase, an open-source substitute for Firebase, with Google Cloud Run, a serverless platform. The answer spells out how to get Supabase running in Google Cloud Run. Typically, this involves creating a new Google Cloud Run service, configuring the right database credentials, and deploying Supabase. Handy info for developers who want to build scalable apps without the headache of managing servers. Both services come with great tools for database and server management in a serverless setting. However, the exact steps might change based on your current setup and the specific needs of your project.

Get a Free No-Code Consultation
Meet with Will, CEO at Bootstrapped to get a Free No-Code Consultation
Book a Call
Will Hawkins
CEO at Bootstrapped

How to set up Supabase with Google Cloud Run?

Step 1: Setting up a New Project in Google Cloud Run

Head over to the Cloud Run homepage on Google Cloud Console. Click that 'Create Service' button. Give your service a name and pick a region. Then, hit 'Next'. This is where you'll set up the service's settings.

Step 2: Building and Deploying the Service

In Cloud Run, click 'Create Service' again. Go to the 'Container image URL' section and pop in the URL of your Docker container for the Supabase app. If you haven't built your Docker image yet, you'll need to do that first and add it to the Google Container Registry.

Step 3: Enable Unauthenticated Invocations

Under 'Configure the service's first revision', find the 'Authentication' field and choose 'Allow unauthenticated invocations'. This makes your service publicly accessible.

Step 4: Finalizing and Deploying

Double-check all your settings and configurations. If everything looks good, click 'Create' to deploy the service. This might take a few seconds or minutes. Once it's done, Google Cloud Run will give you a URL where you can access your service.

Step 5: Setting up Supabase

Make sure to check out the Supabase.js library to interact with your Supabase project. In your code, you'll need to initialize the Supabase client with the URL of your Google Cloud Run service and the Supabase project's public API key. Save these as environment variables in your code.

In JavaScript, the initialization would look something like this:

const { createClient } = require('@supabase/supabase-js')
const SUPABASE_URL = process.env.SUPABASE_URL
const SUPABASE_ANON_KEY = process.env.SUPABASE_ANON_KEY
const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY)

Step 6: Using Supabase

After initializing the Supabase client, you can use it in your code to interact with your Supabase project. This could involve anything from querying data, inserting new data, listening to database events, working with user accounts, and so on. Check out the Supabase documentation for more detailed instructions on using Supabase with your project.

Explore more Supabase tutorials

Complete Guide to Supabase: Tutorials, Tips, and Best Practices

Explore our Supabase tutorials directory - an essential resource for learning how to create, deploy and manage robust server-side applications with ease and efficiency.

Why are companies choosing Bootstrapped?

40-60%

Faster with no-code

Nocode tools allow us to develop and deploy your new application 40-60% faster than regular app development methods.

90 days

From idea to MVP

Save time, money, and energy with an optimized hiring process. Access a pool of experts who are sourced, vetted, and matched to meet your precise requirements.

1 283 apps

built by our developers

With the Bootstrapped platform, managing projects and developers has never been easier.

hero graphic

Our capabilities

Bootstrapped offers a comprehensive suite of capabilities tailored for startups. Our expertise spans web and mobile app development, utilizing the latest technologies to ensure high performance and scalability. The team excels in creating intuitive user interfaces and seamless user experiences. We employ agile methodologies for flexible and efficient project management, ensuring timely delivery and adaptability to changing requirements. Additionally, Bootstrapped provides continuous support and maintenance, helping startups grow and evolve their digital products. Our services are designed to be affordable and high-quality, making them an ideal partner for new ventures.

Engineered for you

1

Fast Development: Bootstrapped specializes in helping startup founders build web and mobile apps quickly, ensuring a fast go-to-market strategy.

2

Tailored Solutions: The company offers customized app development, adapting to specific business needs and goals, which ensures your app stands out in the competitive market.

3

Expert Team: With a team of experienced developers and designers, Bootstrapped ensures high-quality, reliable, and scalable app solutions.

4

Affordable Pricing: Ideal for startups, Bootstrapped offers cost-effective development services without compromising on quality.

5

Supportive Partnership: Beyond development, Bootstrapped provides ongoing support and consultation, fostering long-term success for your startup.

6

Agile Methodology: Utilizing agile development practices, Bootstrapped ensures flexibility, iterative progress, and swift adaptation to changes, enhancing project success.

Yes, if you can dream it, we can build it.