-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathserverless.yml
54 lines (48 loc) Β· 1017 Bytes
/
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
service: ${file(./package.json):name}
frameworkVersion: "3"
plugins:
- "@yandex-cloud/serverless-plugin"
provider:
name: yandex-cloud
runtime: nodejs18
# environment:
# NODE_OPTIONS: "--experimental-specifier-resolution=node"
httpApi:
payload: "1.0"
package:
patterns:
- "!**"
- .env
- package.json
# - package-lock.json
- build/**/*.js
functions:
main:
handler: build/index.handler
memorySize: 128
timeout: 30 # seconds
account: function-sa
events:
- http:
path: /webhook
method: post
# timer:
# handler: build/index.hello
# memorySize: 128
# timeout: '5'
# events:
# - cron:
# expression: "* * * * ? *"
# account: trigger-sa
# retry:
# attempts: 1
# interval: 10
resources:
# trigger-sa:
# type: yc::ServiceAccount
# roles:
# - serverless.functions.invoker
function-sa:
type: yc::ServiceAccount
roles:
- editor