-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsst.config.ts
More file actions
57 lines (51 loc) Β· 1.25 KB
/
sst.config.ts
File metadata and controls
57 lines (51 loc) Β· 1.25 KB
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
57
/// <reference path="./.sst/platform/config.d.ts" />
//this is prepared for cases where the git stage should be part of the url
//const { stageToUrlPart } = await import('./packages/sst-extensions/src/index')
export default $config({
app(input) {
return {
name: 'purple-stack',
removal: input?.stage === 'master' ? 'retain' : 'remove',
protect: ['master', 'staging'].includes(input?.stage),
home: 'aws',
providers: {
aws: {
region: 'eu-central-1'
}
}
}
},
async run() {
$transform(sst.aws.Function, (args) => {
args.runtime = 'nodejs22.x'
})
// stacks
await import('./domains/transaction/features/deposit/stack')
const api = await import('./infra/api')
// dev commands visible when running sst dev
new sst.x.DevCommand('tRPC', {
link: [api.tRPCAPI],
dev: {
autostart: true,
command: 'pnpm --filter @purple-stack/trpc-api start:panel'
}
})
const web = new sst.aws.StaticSite('Web', {
build: {
command: 'pnpm run --filter @purple-stack/web build',
output: 'web/dist'
},
dev: {
autostart: true,
command: 'pnpm --filter @purple-stack/web dev',
directory: 'web'
},
environment: {
VITE_tRPCAPI_url: api.tRPCAPI.url
}
})
return {
Web: web.url
}
}
})