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: seed self-hosted database

Brad Barbinf2437a0836d8
diff --git a/ci/src/migrations.ts b/ci/src/migrations.ts
index 7baa0d14aa..423fa80cd7 100644
--- a/ci/src/migrations.ts
+++ b/ci/src/migrations.ts
@@ -89,11 +89,10 @@ async function migrate(): Promise<void> {
await $$`supabase db push --db-url ${connection_string} --include-all`;
} else {
await $$`supabase db push --include-all`;
+ console.log(`✅ 🐣 Starting deployments for ${customer.id}`);
+ await $$`supabase functions deploy`;
}
- console.log(`✅ 🐣 Starting deployments for ${customer.id}`);
- await $$`supabase functions deploy`;
-
if (!customer.seeded) {
try {
console.log(`✅ 🌱 Seeding ${customer.id}`);
diff --git a/scripts/govcloud-test.ts b/scripts/govcloud-test.ts
new file mode 100644
index 0000000000..f710f0a4e9
--- /dev/null
+++ b/scripts/govcloud-test.ts
@@ -0,0 +1,21 @@
+// import type { User } from "@supabase/supabase-js";
+import { createClient } from "@supabase/supabase-js";
+import * as dotenv from "dotenv";
+
+dotenv.config();
+(async () => {
+ const supabase = createClient(
+ process.env.GOVCLOUD_SUPABASE_URL!,
+ process.env.GOVCLOUD_SUPABASE_SERVICE_ROLE_KEY!
+ );
+
+ try {
+ // Upload to test bucket
+ const { data, error } = await supabase.functions.invoke("ping", {});
+
+ console.log(data);
+ console.log(error);
+ } catch (err) {
+ console.error("Error reading file or uploading:", err);
+ }
+})();