-
Notifications
You must be signed in to change notification settings - Fork 6
/
serverless.yml
109 lines (104 loc) · 2.56 KB
/
serverless.yml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
service: checkfirst
frameworkVersion: '2'
plugins:
- serverless-plugin-custom-binary
custom:
apiGateway:
binaryMediaTypes:
- '*/*'
provider:
name: aws
runtime: nodejs20.x
stage: ${env:LAMBDA_NODE_ENV}
region: ap-southeast-1
memorySize: 256
apiGateway:
shouldStartNameWithService: true
environment:
NODE_ENV: ${env:LAMBDA_NODE_ENV}
vpc:
subnetIds:
- ${env:VPC_SUBNET_A}
- ${env:VPC_SUBNET_B}
- ${env:VPC_SUBNET_C}
iamRoleStatements:
- Effect: 'Allow'
Action:
- 'ses:SendRawEmail'
Resource:
'*'
package:
exclude:
- node_modules/@chakra-ui/**
- node_modules/@emotion/**
- node_modules/@loadable/**
- node_modules/react*/**
functions:
api:
description: commit-${env:GITHUB_SHA}/run-${env:GITHUB_RUN_ID}
handler: build/server/serverless/api.handler
timeout: 30
vpc:
securityGroupIds:
- ${env:VPC_SECURITY_GROUP_API}
environment:
DATABASE_URL: ${env:DATABASE_URL}
SESSION_SECRET: ${env:SESSION_SECRET}
OTP_SECRET: ${env:OTP_SECRET}
OTP_EXPIRY: ${env:OTP_EXPIRY}
FRONTEND_SENTRY_DSN: ${env:FRONTEND_SENTRY_DSN}
BACKEND_SENTRY_DSN: ${env:BACKEND_SENTRY_DSN}
CSP_REPORT_URI: ${env:CSP_REPORT_URI}
APP_HOST: ${env:APP_HOST}
DEPLOY_TIMESTAMP: ${env:DEPLOY_TIMESTAMP}
MAIL_SUFFIX: ${env:MAIL_SUFFIX}
events:
- http:
path: api/v1/{proxy+}
method: any
static:
description: commit-${env:GITHUB_SHA}/run-${env:GITHUB_RUN_ID}
handler: build/server/serverless/static.handler
timeout: 30
vpc:
securityGroupIds:
- ${env:VPC_SECURITY_GROUP_STATIC}
environment:
FRONTEND_SENTRY_DSN: ${env:FRONTEND_SENTRY_DSN}
CSP_REPORT_URI: ${env:CSP_REPORT_URI}
DEPLOY_TIMESTAMP: ${env:DEPLOY_TIMESTAMP}
events:
- http:
path: ""
method: get
- http:
path: logo.svg
method: get
- http:
path: robots.txt
method: get
- http:
path: debug
method: get
- http:
path: login
method: get
- http:
path: dashboard
method: get
- http:
path: dashboard/{proxy+}
method: get
- http:
path: builder/{proxy+}
method: get
- http:
path: c/{proxy+}
method: get
- http:
path: "assets/js/{bundle+}"
method: get
- http:
path: assets/{proxy+}
method: get
contentHandling: CONVERT_TO_BINARY