mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
🐜 fix(infra): Remove db on team member stages
This commit is contained in:
@@ -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";
|
||||
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user