-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsst.config.ts
44 lines (41 loc) · 1.17 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
/// <reference path="./.sst/platform/config.d.ts" />
export default $config({
app(input) {
return {
name: "sgcarstrends-updater",
removal: input?.stage === "prod" ? "retain" : "remove",
home: "aws",
providers: {
aws: {
region: "ap-southeast-1",
},
},
};
},
async run() {
const environment = {
DATABASE_URL: process.env.DATABASE_URL,
UPSTASH_REDIS_REST_URL: process.env.UPSTASH_REDIS_REST_URL,
UPSTASH_REDIS_REST_TOKEN: process.env.UPSTASH_REDIS_REST_TOKEN,
};
// TODO: Temporary remove Secrets
// const DATABASE_URL = new sst.Secret(
// "DATABASE_URL",
// environment.DATABASE_URL,
// );
// const UPSTASH_REDIS_REST_URL = new sst.Secret(
// "UPSTASH_REDIS_REST_URL",
// environment.UPSTASH_REDIS_REST_URL,
// );
// const UPSTASH_REDIS_REST_TOKEN = new sst.Secret(
// "UPSTASH_REDIS_REST_TOKEN",
// environment.UPSTASH_REDIS_REST_TOKEN,
// );
// TODO: Might create an API in the future
// new sst.aws.Function("Updater", {
// handler: "src/index.handler",
// environment,
// url: true,
// });
},
});