-
Notifications
You must be signed in to change notification settings - Fork 0
/
s.yaml
69 lines (67 loc) · 2.03 KB
/
s.yaml
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
edition: 1.0.0
name: hello-world-app
access: "default_serverless_devs_access"
# access: wss-root
vars: # 全局变量
region: "cn-shenzhen"
service:
name: "assembly-line"
description: 'hello world by serverless devs'
logConfig: auto
role: acs:ram::1899690531354629:role/aliyunfcdefaultrole
services:
gateway:
component: fc
props:
region: ${vars.region}
service: ${vars.service}
function:
name: "gateway"
description: 'hello world by serverless devs'
runtime: nodejs16
codeUri: ./gateway
handler: index.handler
memorySize: 128
timeout: 20
instanceConcurrency: 128
environmentVariables:
WEBHOOK_PASSWORD: ${env.password}
REF: main
triggers:
- name: httpTrigger
type: http
config:
authType: anonymous
methods:
- GET
- POST
- OPTIONS
engine:
component: fc
actions:
pre-deploy:
- run: npm install --registry=https://registry.npmmirror.com
path: './engine'
post-deploy:
- component: fc api UpdateFunction --region ${vars.region} --header
'{"x-fc-disable-container-reuse":"True"}' --path
'{"serviceName":"${vars.service.name}","functionName":"engine"}'
props:
region: ${vars.region}
service: ${vars.service}
function:
name: "engine"
description: 'hello world by serverless devs'
runtime: nodejs16
codeUri: ./engine
handler: index.handler
memorySize: 640
timeout: 600
layers:
- acs:fc:${vars.region}:1899690531354629:layers/s-dumi/versions/1
environmentVariables:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/fc/lang/nodejs16_alinode/bin:/opt/bin:/opt/nodejs/node_modules/.bin:/opt/nodejs/node_modules
TOKEN: ${env.token}
asyncConfiguration:
maxAsyncRetryAttempts: 1
statefulInvocation: true