-
Notifications
You must be signed in to change notification settings - Fork 0
/
sst.config.ts
42 lines (39 loc) · 1.21 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
import { type SSTConfig } from "sst";
import { NextjsSite, Function } from "sst/constructs";
import githubActionsStack from "~/infra/githubActionsStack";
export default {
config(_input) {
return {
name: "lyricsu",
region: "us-east-1",
};
},
stacks(app) {
app.stack(githubActionsStack).stack(function Site({ stack }) {
const ichiranLambda = new Function(stack, "ichiran", {
handler: "src/lambda/ichiran.handler",
copyFiles: [{ from: "src/lambda/ichiran-cli" }],
url: true,
});
const site = new NextjsSite(stack, "site", {
timeout: "60 seconds",
environment: {
ICHIRAN_URL: ichiranLambda.url!,
DATABASE_URL: process.env.DATABASE_URL!,
SPOTIFY_CLIENT_ID: process.env.SPOTIFY_CLIENT_ID!,
SPOTIFY_CLIENT_SECRET: process.env.SPOTIFY_CLIENT_SECRET!,
SPOTIFY_SP_DC: process.env.SPOTIFY_SP_DC!,
ICHIRAN_CONNECTION: process.env.ICHIRAN_CONNECTION!,
},
bind: [ichiranLambda],
experimental: {
streaming: true,
}
});
stack.addOutputs({
SiteUrl: site.url,
Function: ichiranLambda.url,
});
});
},
} satisfies SSTConfig;