🐜 fix(infra): Remove db on team member stages

This commit is contained in:
Wanjohi
2025-06-29 17:12:56 +03:00
parent 0a1a4cd9b6
commit 77f47a0306
6 changed files with 273 additions and 60 deletions

View File

@@ -2,8 +2,4 @@ export const domain =
{
production: "nestri.io",
dev: "dev.nestri.io",
}[$app.stage] || $app.stage + ".dev.nestri.io";
export const zone = cloudflare.getZoneOutput({
name: "nestri.io",
});
}[$app.stage] || $app.stage + ".dev.nestri.io";

View File

@@ -1,39 +1,42 @@
import { vpc } from "./vpc";
import { isPermanentStage } from "./stage";
export const postgres = new sst.aws.Aurora("Database", {
vpc,
engine: "postgres",
scaling: {
min: "0 ACU",
max: "1 ACU",
},
transform: {
clusterParameterGroup: {
parameters: [
{
name: "rds.logical_replication",
value: "1",
applyMethod: "pending-reboot",
},
{
name: "max_slot_wal_keep_size",
value: "10240",
applyMethod: "pending-reboot",
},
{
name: "rds.force_ssl",
value: "0",
applyMethod: "pending-reboot",
},
{
name: "max_connections",
value: "1000",
applyMethod: "pending-reboot",
},
],
export const postgres = !isPermanentStage
? sst.aws.Aurora.get("Database", "nestri-dev-databasecluster-vmeeabek")
: new sst.aws.Aurora("Database", {
vpc,
engine: "postgres",
scaling: {
min: "0 ACU",
max: "1 ACU",
},
},
});
transform: {
clusterParameterGroup: {
parameters: [
{
name: "rds.logical_replication",
value: "1",
applyMethod: "pending-reboot",
},
{
name: "max_slot_wal_keep_size",
value: "10240",
applyMethod: "pending-reboot",
},
{
name: "rds.force_ssl",
value: "0",
applyMethod: "pending-reboot",
},
{
name: "max_connections",
value: "1000",
applyMethod: "pending-reboot",
},
],
},
},
});
new sst.x.DevCommand("Studio", {