-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsst.config.ts
39 lines (37 loc) · 993 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
38
39
/// <reference path="./.sst/platform/config.d.ts" />
export default $config({
app(input) {
return {
name: "weather-timmo-dev",
removal: input?.stage === "production" ? "retain" : "remove",
home: "aws",
providers: {
aws: {
region: process.env.AWS_REGION!,
},
cloudflare: {},
},
};
},
async run() {
const domain =
$app.stage === "production"
? "forecast.timmo.dev"
: `${$app.stage}.forecast.timmo.dev`;
new sst.aws.Nextjs("WeatherApp", {
domain: {
name: domain,
dns: sst.cloudflare.dns(),
},
environment: {
// Tomorrow.io
WEATHER_API_KEY: process.env.WEATHER_API_KEY!,
// Sentry
SENTRY_AUTH_TOKEN: process.env.SENTRY_AUTH_TOKEN!,
// Posthog
NEXT_PUBLIC_POSTHOG_KEY: process.env.NEXT_PUBLIC_POSTHOG_KEY!,
NEXT_PUBLIC_POSTHOG_HOST: process.env.NEXT_PUBLIC_POSTHOG_HOST!,
},
});
},
});