-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy paths.yaml
47 lines (45 loc) · 1.78 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
# 内存吃不消
edition: 1.0.0
name: fc-danmaku
access: default
vars: # 全局变量
region: us-west-1
certId: 12106443
service:
name: fc-danmaku
# logConfig: auto
triggers:
- name: http_t
type: http
config:
authType: anonymous
methods:
- GET
- POST
services:
subweb: # 业务名称/模块名称
component: fc # 组件名称,Serverless Devs 工具本身类似于一种游戏机,不具备具体的业务能力,组件类似于游戏卡,用户通过向游戏机中插入不同的游戏卡实现不同的功能,即通过使用不同的组件实现不同的具体业务能力
actions: # 自定义执行逻辑,关于actions 的使用,可以参考:https://www.serverless-devs.com/serverless-devs/yaml#行为描述
pre-deploy: # 在deploy之前运行
- component: fc build --use-docker --dockerfile ./Dockerfile # 要运行的组件,格式为【component: 组件名 命令 参数】(可以通过s cli registry search --type Component 获取组件列表)
post-deploy:
- run: curl -I -X GET https://fc.lyz05.cn/
props:
region: ${vars.region} # 关于变量的使`1用方法,可以参考:https://www.serverless-devs.com/serverless-devs/yaml#变量赋值
service: ${vars.service}
function:
name: danmaku
caPort: 3000
memorySize: 256
timeout: 30
runtime: custom-container
customContainerConfig:
image: registry.us-west-1.aliyuncs.com/lyz05/danmaku:latest
instanceConcurrency: 50 # 单实例多并发
triggers: ${vars.triggers}
customDomains:
- domainName: fc.lyz05.cn
protocol: HTTP,HTTPS
routeConfigs:
- path: /*
certId: ${vars.certId}