-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy paths.yaml
More file actions
141 lines (132 loc) · 5.88 KB
/
s.yaml
File metadata and controls
141 lines (132 loc) · 5.88 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# ------------------------------------
# 欢迎您使用阿里云函数计算 FC 组件进行项目开发
# 组件仓库地址:https://github.com/devsapp/fc
# 组件帮助文档:https://www.serverless-devs.com/fc/readme
# Yaml参考文档:https://www.serverless-devs.com/fc/yaml/readme
# 关于:
# - Serverless Devs和FC组件的关系、如何声明/部署多个函数、超过50M的代码包如何部署
# - 关于.fcignore使用方法、工具中.s目录是做什么、函数进行build操作之后如何处理build的产物
# 等问题,可以参考文档:https://www.serverless-devs.com/fc/tips
# 关于如何做CICD等问题,可以参考:https://www.serverless-devs.com/serverless-devs/cicd
# 关于如何进行环境划分等问题,可以参考:https://www.serverless-devs.com/serverless-devs/extend
# 更多函数计算案例,可参考:https://github.com/devsapp/awesome/
# 有问题快来钉钉群问一下吧:33947367
# ------------------------------------
edition: 1.0.0 # 命令行YAML规范版本,遵循语义化版本(Semantic Versioning)规范
name: ffmpeg-app # 项目名称
# access 是当前应用所需要的密钥信息配置:
# 密钥配置可以参考:https://www.serverless-devs.com/serverless-devs/command/config
# 密钥使用顺序可以参考:https://www.serverless-devs.com/serverless-devs/tool#密钥使用顺序与规范
access: "{{ access }}"
vars:
region: "{{ region }}"
service:
name: "{{ serviceName }}"
description: Scenarios that can be solved by OSS + FC
internetAccess: true
role: "{{ roleArn }}"
runtime: python3
timeout: 900
handler: index.handler
services:
AudioConvert: # 业务名称/模块名称
component: fc # 组件名称,Serverless Devs 工具本身类似于一种游戏机,不具备具体的业务能力,组件类似于游戏卡,用户通过向游戏机中插入不同的游戏卡实现不同的功能,即通过使用不同的组件实现不同的具体业务能力
# actions: # 自定义执行逻辑,关于actions 的使用,可以参考:https://www.serverless-devs.com/serverless-devs/yaml#行为描述
# pre-deploy: # 在deploy之前运行
# - run: s version publish -a demo
# path: ./src
# - run: docker build xxx # 要执行的系统命令,类似于一种钩子的形式
# path: ./src # 执行系统命令/钩子的路径
# - plugin: myplugin # 与运行的插件 (可以通过s cli registry search --type Plugin 获取组件列表)
# args: # 插件的参数信息
# testKey: testValue
props: # 组件的属性值
region: ${vars.region}
service: ${vars.service}
function:
name: AudioConvert
description: 音频格式转换器
runtime: ${vars.runtime}
codeUri: ./functions/audio_convert
handler: ${vars.handler}
memorySize: 1024
timeout: ${vars.timeout}
GetMediaMeta: # 服务名称
component: fc
props: # 组件的属性值
region: ${vars.region}
service: ${vars.service}
function:
name: GetMediaMeta
description: 获取音视频 meta
runtime: ${vars.runtime}
codeUri: ./functions/get_multimedia_meta
handler: ${vars.handler}
memorySize: 1024
timeout: ${vars.timeout}
GetDuration: # 服务名称
component: fc
props: # 组件的属性值
region: ${vars.region}
service: ${vars.service}
function:
name: GetDuration
description: 获取音视频时长
runtime: ${vars.runtime}
codeUri: ./functions/get_duration
handler: ${vars.handler}
memorySize: 1024
timeout: ${vars.timeout}
VideoGif: # 服务名称
component: fc
props: # 组件的属性值
region: ${vars.region}
service: ${vars.service}
function:
name: VideoGif
description: 功能强大的 video 提取为 gif 函数
runtime: ${vars.runtime}
codeUri: ./functions/video_gif
handler: ${vars.handler}
memorySize: 1024
timeout: ${vars.timeout}
GetSprites: # 服务名称
component: fc
props: # 组件的属性值
region: ${vars.region}
service: ${vars.service}
function:
name: GetSprites
description: 功能强大雪碧图制作函数
runtime: ${vars.runtime}
codeUri: ./functions/get_sprites
handler: ${vars.handler}
memorySize: 1024
timeout: ${vars.timeout}
VideoWatermark: # 服务名称
component: fc
props: # 组件的属性值
region: ${vars.region}
service: ${vars.service}
function:
name: VideoWatermark
description: 功能强大的视频添加水印功能
runtime: ${vars.runtime}
codeUri: ./functions/video_watermark
handler: ${vars.handler}
memorySize: 1024
timeout: ${vars.timeout}
# next-function: # 第二个函数的案例,仅供参考
# # 如果在当前项目下执行 s deploy,会同时部署模块:
# # helloworld:服务hello-world-service,函数cpp-event-function
# # next-function:服务hello-world-service,函数next-function-example
# # 如果想单独部署当前服务与函数,可以执行 s + 模块名/业务名 + deploy,例如:s next-function deploy
# # 如果想单独部署当前函数,可以执行 s + 模块名/业务名 + deploy function,例如:s next-function deploy function
# # 更多命令可参考:https://www.serverless-devs.com/fc/readme#文档相关
# component: fc
# props:
# region: ${vars.region}
# service: ${vars.service} # 应用整体的服务配置
# function: # 定义一个新的函数
# name: next-function-example
# description: 'hello world by serverless devs'