-
Notifications
You must be signed in to change notification settings - Fork 0
/
sst.config.ts
37 lines (36 loc) · 1000 Bytes
/
sst.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import {} from "aws-cdk-lib";
import type { SSTConfig } from "sst";
import { Cron, SvelteKitSite } from "sst/constructs";
export default {
config(_input) {
return {
name: "corporate-dashboard",
region: "us-east-1",
};
},
stacks(app) {
app.stack(function Site({ stack }) {
const site = new SvelteKitSite(stack, "site", {
customDomain: {
domainName:
stack.stage === "prod"
? "corporate.internal.icssc.club"
: `${stack.stage}-corporate.internal.icssc.club`,
hostedZone: "icssc.club",
},
});
stack.addOutputs({ url: site.url });
});
if (app.stage !== "prod") {
app.setDefaultRemovalPolicy("destroy");
}
if (app.stage === "prod") {
app.stack(function SendEmail({ stack }) {
new Cron(stack, "sendEmail", {
schedule: "rate(10 minutes)",
job: "services/send-email.main",
});
});
}
},
} satisfies SSTConfig;