Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

ci: add SUPABSE_DB_URL

Brad Barbin91de68e86d94
diff --git a/.env.example b/.env.example
index 944f583310..ad18f4b652 100644
--- a/.env.example
+++ b/.env.example
@@ -24,6 +24,7 @@ STRIPE_WEBHOOK_SECRET="whsec_************"
SUPABASE_ANON_KEY="******************"
SUPABASE_SERVICE_ROLE_KEY="*****************"
SUPABASE_URL="http://localhost:54321"
+SUPABASE_DB_URL="postgresql://postgres:postgres@localhost:54322/postgres"
SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID="************.apps.googleusercontent.com"
SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_SECRET="GOCSPX-****************************"
diff --git a/ci/src/deploy.ts b/ci/src/deploy.ts
index a7c29bc13b..df3c4fb7ef 100644
--- a/ci/src/deploy.ts
+++ b/ci/src/deploy.ts
@@ -21,6 +21,7 @@ export type Workspace = {
// Database Configuration
connection_string: string | null;
database_url: string | null;
+ database_connection_pooler_url: string | null;
project_id: string | null;
access_token: string | null;
anon_key: string | null;
@@ -89,6 +90,7 @@ async function deploy(): Promise<void> {
cert_arn_erp,
cert_arn_mes,
database_url,
+ database_connection_pooler_url,
database_password,
slug,
anon_key,
@@ -163,6 +165,11 @@ async function deploy(): Promise<void> {
continue;
}
+ if (!database_connection_pooler_url) {
+ console.log(`🔴🍳 Missing database connection pooler url for ${workspace.id}`);
+ continue;
+ }
+
if (!database_password) {
console.log(`🔴🍳 Missing database password for ${workspace.id}`);
continue;
@@ -281,6 +288,7 @@ async function deploy(): Promise<void> {
SUPABASE_ANON_KEY: anon_key,
SUPABASE_ANON_PUBLIC: anon_key,
SUPABASE_API_URL: database_url,
+ SUPABASE_DB_URL: database_connection_pooler_url,
SUPABASE_SERVICE_ROLE: service_role_key,
SUPABASE_SERVICE_ROLE_KEY: service_role_key,
SUPABASE_URL: database_url,
diff --git a/sst.config.ts b/sst.config.ts
index 554fea4a52..417694e418 100644
--- a/sst.config.ts
+++ b/sst.config.ts
@@ -74,6 +74,7 @@ export default $config({
SUPABASE_ANON_KEY: process.env.SUPABASE_ANON_KEY,
SUPABASE_ANON_PUBLIC: process.env.SUPABASE_ANON_PUBLIC,
SUPABASE_API_URL: process.env.SUPABASE_API_URL,
+ SUPABASE_DB_URL: process.env.SUPABASE_DB_URL,
SUPABASE_SERVICE_ROLE: process.env.SUPABASE_SERVICE_ROLE,
SUPABASE_SERVICE_ROLE_KEY: process.env.SUPABASE_SERVICE_ROLE_KEY,
SUPABASE_URL: process.env.SUPABASE_URL,
@@ -151,6 +152,7 @@ export default $config({
SUPABASE_ANON_KEY: process.env.SUPABASE_ANON_KEY,
SUPABASE_ANON_PUBLIC: process.env.SUPABASE_ANON_PUBLIC,
SUPABASE_API_URL: process.env.SUPABASE_API_URL,
+ SUPABASE_DB_URL: process.env.SUPABASE_DB_URL,
SUPABASE_SERVICE_ROLE: process.env.SUPABASE_SERVICE_ROLE,
SUPABASE_SERVICE_ROLE_KEY: process.env.SUPABASE_SERVICE_ROLE_KEY,
SUPABASE_URL: process.env.SUPABASE_URL,