-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsst.config.ts
56 lines (49 loc) · 1.41 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { SSTConfig } from "sst";
import { Config, NextjsSite } from "sst/constructs"
import type { OpenNextConfig } from "./open-next.config";
import { OpenNextCdkReferenceImplementation } from "./openNextReferenceImplementation";
export default {
config(_input) {
return {
name: "next-app-dir",
region: "eu-west-1",
};
},
stacks(app) {
app.stack(function Site({ stack }) {
//@ts-ignore
const site = new NextjsSite<OpenNextConfig>(stack, "site", {
// buildCommand:
// "/mnt/ssd2/projects/open-next/packages/open-next/dist/index.js build",
buildCommand: "npx [email protected] build",
logging: "combined",
waitForInvalidation: false,
environment: {
AWS_LAMBDA_RUNTIME_VERBOSE: "3"
},
cdk: {
servers: {
pageSsr: {
memorySize: 1536,
warm: 5
},
ssr: {
memorySize: 1536
},
edge: {
timeout:2,
}
}
}
});
const url = site.url;
// const site = new OpenNextCdkReferenceImplementation(stack, "site", {
// openNextPath: ".open-next",
// })
// const url = site.distribution.distributionDomainName;
stack.addOutputs({
SiteUrl: url || "http://localhost:3000",
});
});
},
} satisfies SSTConfig;