tencent cloud

TencentDB for PostgreSQL

Release Notes and Announcements
Release Notes
Product Announcements
Product Introduction
Overview
Features
Strengths
Scenarios
Information Security
Regions and AZs
Product Feature List
Large version lifecycle description
MSSQL Compatible Version
Billing
Billing Overview
Instance Type and Specification
Purchase Methods
Refund
Overdue Payments
Backup Space Billing
Database Audit Billing Overview
Getting Started
Creating TencentDB for PostgreSQL Instance
Connecting to TencentDB for PostgreSQL Instance
Managing TencentDB for PostgreSQL Instance
Importing Data
Migrating Data with DTS
Kernel Version Introduction
Kernel Version Overview
Kernel Version Release Notes
Viewing Kernel Version
Proprietary Kernel Features
Database Audit
Audit Service Description
Activating Audit Service
View Audit Logs
Modify audit services
Audit Performance Description
User Guide
Instance Management
Upgrading Instance
CPU Elastic Scaling
Read-Only Instance
Account Management
Database Management
Parameter Management
Log Management and Analysis
Backup and Restoration
Data Migration
Extension Management
Network Management
Access Management
Data Security
Tenant and Resource Isolation
Security Groups
Monitoring and Alarms
Tag
AI Practice
Using the Tencentdb_ai Plug-In to Call Large Models
Building Ai Applications with the Tencentdb Ai Plug-In
Combining Supabase to Quickly Build Backend Service Based on TencentDB for PostgreSQL
Use Cases
postgres_fdw Extension for Cross-database Access
Automatically Creating Partition in PostgreSQL
Searching in High Numbers of Tags Based on pg_roaringbitmap
Querying People Nearby with One SQL Statement
Configuring TencentDB for PostgreSQL as GitLab's External Data Source
Supporting Tiered Storage Based on cos_fdw Extension
Implement Read/Write Separation via pgpool
Implementing Slow SQL Analysis Using the Auto_explain Plugin
Using pglogical for Logical Replication
Using Debezium to Collect PostgreSQL Data
Set Up a Remote Disaster Recovery Environment for PostgreSQL Locally on CVM
Read-Only Instance and Read-Only Group Practical Tutorial
How to Use SCF for Scheduled Database Operations
Fix Table Bloat
Performance White Paper
Test Methods
Test Results
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Read-Only Instance APIs
Backup and Recovery APIs
Parameter Management APIs
Security Group APIs
Performance Optimization APIs
Account APIs
Specification APIs
Network APIs
Data Types
Error Codes
FAQs
Service Agreement
Service Level Agreement
Terms of Service
Glossary
Contact Us
문서TencentDB for PostgreSQLAI PracticeCombining Supabase to Quickly Build Backend Service Based on TencentDB for PostgreSQL

Combining Supabase to Quickly Build Backend Service Based on TencentDB for PostgreSQL

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-09-16 10:15:45
Supabase provides a full-stack development platform based on PostgreSQL, integrating real-time database, identity verification, auto-generated APIs, Cloud Object Storage (COS), and edge functions. It possesses ready-to-use real-time data sync, fine-grained permission control, and Serverless scaling capability, supporting developers to quickly build AI-integrated modern applications while maintaining full control over SQL and the open-source ecosystem. For more detailed Supabase features, refer to official documentation.
This document will guide you to quickly deploy Supabase, configure connection to TencentDB for PostgreSQL as the backend database, and rapidly build your application.

Environment Preparation

You need to first create a CVM instance and a TencentDB for PostgreSQL instance under the same VPC network.

Pulling Supabase Code

# Get the code
git clone --depth 1 https://github.com/supabase/supabase

# Make your new supabase project directory
mkdir supabase-project

# Tree should look like this
# .
# ├── supabase
# └── supabase-project

# Copy the compose files over to your project
cp -rf supabase/docker/* supabase-project

# Copy the fake env vars
cp supabase/docker/.env.example supabase-project/.env

# Switch to your project directory
cd supabase-project

# Pull the latest images
docker compose pull

Modifying the Env File

Modify the following items in the supabase-project/.env file. Please ensure the corresponding account has been created in the TencentDB for PostgreSQL instance.
POSTGRES_HOST=TencentDB for PostgreSQL instance vip
POSTGRES_DB=postgres
POSTGRES_USER=supabase_admin
POSTGRES_PORT=5432
POSTGRES_PASSWORD=TencentDB for PostgreSQL Instance Account Password

Modifying the Docker-Compose.Yml File

Modify the supabase-project/docker-compose.yml file, search for the external Postgres database keyword. There is a note in the file: if using an external PG, comment out the corresponding part.
depends_on:
# db:
# Disable this if you are using an external Postgres database
# condition: service_healthy

Creating Objects in TencentDB for PostgreSQL

Before pulling up Supabase, we need to create some objects (user, database, schema), otherwise lead to unable to pull up Supabase. Here the password should match the POSTGRES_PASSWORD.
CREATE USER supabase_admin pg_tencentdb_superuser password 'your password';
CREATE DATABASE _supabase;
create schema _analytics;

Purging Cache

If Supabase was not started before, no need to execute this step.
# Stop docker and remove volumes:
docker compose down -v
# Remove Postgres data:
rm -rf volumes/db/data/


Starting Up Supabase

After the above configurations are completed, Supabase is bootable.
docker compose up -d


Logging in to the Supabase Interface

Access the following link for the virtual machine instance's public IP: http://[public IP]:8000/. The Initialize Account Password is provided by Supabase.
supabase
this_password_is_insecure_and_should_be_updated
The interface after successful login:


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백