-
Notifications
You must be signed in to change notification settings - Fork 6
/
s-test.yaml
56 lines (54 loc) · 1.53 KB
/
s-test.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
# ------------------------------------
# 官方手册: https://manual.serverless-devs.com/user-guide/aliyun/#fc3
# 有问题快来钉钉群问一下吧:33947367
# ------------------------------------
edition: 3.0.0
name: flask-app
access: default
vars:
region: cn-hangzhou
resources:
framework:
component: fc3
props:
timeout: 60
cpu: 1
memorySize: 2048
diskSize: 512
instanceConcurrency: 100
region: ${vars.region}
description: Serverless Devs Web Framework Function
runtime: custom.debian10
customRuntimeConfig:
command:
- python3
- index.py
port: 9000
environmentVariables:
PATH: /var/fc/lang/python3.10/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ruby/bin:/opt/bin:/code:/code/bin
PYTHONPATH: /opt/python:/code/python:/code
TZ: Asia/Shanghai
functionName: devs-website-test
code: ./
layers:
- acs:fc:${this.props.region}:official:layers/Python3-Flask2x/versions/2
triggers:
- triggerName: httpTrigger
triggerType: http
triggerConfig:
methods:
- GET
- POST
- PUT
- DELETE
authType: anonymous
fc3_domain_0:
component: fc3-domain
props:
region: ${vars.region}
domainName: auto
protocol: HTTP
routeConfig:
routes:
- path: /*
functionName: ${resources.framework.props.functionName}