-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsst.config.ts
45 lines (39 loc) · 1.08 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
import { getStage } from '@purple/serverless-git-branch-stage-plugin'
import type { SSTConfig } from 'sst'
import { AppApiStack } from './stacks/app-api'
import { FrontendStack } from './stacks/frontend'
import { IotStack } from './stacks/iot'
import { ResourcesStack } from './stacks/resources'
import { ServiceApiStack } from './stacks/service-api'
import { SpotLightsStack } from './stacks/spotLights'
const config: SSTConfig = {
config() {
const stage = getStage()
return {
name: 'slsws',
region: 'eu-central-1',
stage
}
},
stacks(app) {
if (app.stage !== 'master') {
app.setDefaultRemovalPolicy('destroy')
}
app.setDefaultFunctionProps({
runtime: 'nodejs16.x',
architecture: 'arm_64',
logRetention: 'three_months',
nodejs: {
format: 'esm'
}
})
app
.stack(ResourcesStack, { id: 'resources' })
.stack(SpotLightsStack, { id: 'spotLights' })
.stack(ServiceApiStack, { id: 'serviceApi' })
.stack(AppApiStack, { id: 'appApi' })
.stack(FrontendStack, { id: 'frontend' })
.stack(IotStack, { id: 'iot' })
}
}
export default config