Skip to content

Commit

Permalink
⚡️ Reduce warm instance + downgrade image optimisation lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Sep 13, 2024
1 parent c5b5b11 commit eb7092a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
7 changes: 5 additions & 2 deletions iac/DashboardWebApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ export function DashboardWebApp({ stack }: StackContext) {
domainName: `${subDomain}.frak.id`.toLowerCase(),
hostedZone: "frak.id",
},
// Enable image optimization
imageOptimization: {
memorySize: 512,
staticImageOptimization: true
},
// Bind to the configs
bind: [...configs, reloadCampaignQueue, readPubKeyFunction],
openNextVersion: openNextVersion,
// Number of server side instance to keep warm
warm: isProdStack(stack) ? 10 : 1,
});

stack.addOutputs({
Expand Down
14 changes: 10 additions & 4 deletions iac/ExampleWebApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ export function ExampleAppStack({ stack }: StackContext) {
// Bind to the configs
bind: [nexusUrl],
openNextVersion: openNextVersion,
// Number of server side instance to keep warm
warm: 10,
// Set the custom domain
customDomain: {
domainName: "ethcc.news-paper.xyz",
hostedZone: "news-paper.xyz",
},
// Enable image optimization
imageOptimization: {
memorySize: 512,
staticImageOptimization: true
},
});

// Declare the next js site on news-paper.xyz
Expand All @@ -41,13 +44,16 @@ export function ExampleAppStack({ stack }: StackContext) {
// Bind to the configs
bind: [nexusUrl, mongoExampleUri],
openNextVersion: openNextVersion,
// Number of server side instance to keep warm
warm: 10,
// Set the custom domain
customDomain: {
domainName: "news-paper.xyz",
hostedZone: "news-paper.xyz",
},
// Enable image optimization
imageOptimization: {
memorySize: 512,
staticImageOptimization: true
},
});

stack.addOutputs({
Expand Down
7 changes: 6 additions & 1 deletion iac/WalletWebApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,16 @@ export function WalletAppStack({ stack }: StackContext) {
domainName: `${subDomain}.frak.id`.toLowerCase(),
hostedZone: "frak.id",
},
// Enable image optimization
imageOptimization: {
memorySize: 512,
staticImageOptimization: true
},
// Bind to the configs
bind: [...configs, interactionQueue],
openNextVersion: openNextVersion,
// Number of server side instance to keep warm
warm: isProdStack(stack) ? 10 : 1,
warm: 1,
dev: {
deploy: false,
},
Expand Down
1 change: 1 addition & 0 deletions packages/backend-v2
Submodule backend-v2 added at c7b00a

0 comments on commit eb7092a

Please sign in to comment.