-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsst.config.ts
39 lines (36 loc) · 1.06 KB
/
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
38
39
import { SSTConfig } from "sst";
import { StaticSite } from "sst/constructs";
import { Certificate } from "aws-cdk-lib/aws-certificatemanager";
export default {
config(_input) {
return {
name: "placetopay-docs",
region: "us-east-1",
};
},
stacks(app) {
app.stack(function Site({ stack }) {
const site = new StaticSite(stack, "site", {
buildOutput: "out",
buildCommand: "npm run build",
customDomain: {
domainName: process.env.APP_DOMAIN_NAME,
isExternalDomain: true,
cdk: {
certificate: Certificate.fromCertificateArn(stack, "MyCert", process.env.AWS_CERT_ARN),
}
},
environment: {
NEXT_PUBLIC_FEEDBACK_FORM_URL: process.env.NEXT_PUBLIC_FEEDBACK_FORM_URL,
NEXT_PUBLIC_GITHUB_REPO_URL: process.env.NEXT_PUBLIC_GITHUB_REPO_URL,
}
});
stack.addOutputs({
SiteUrl: site.url,
});
if (app.stage !== "prod") {
app.setDefaultRemovalPolicy("destroy");
}
});
},
} satisfies SSTConfig;