Skip to content

Commit cdee0d0

Browse files
committed
update docs
1 parent 19567c0 commit cdee0d0

File tree

2 files changed

+53
-4
lines changed

2 files changed

+53
-4
lines changed

custom-container-function/fc-custom-container-event-cpp/publish.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,52 @@ Service:
1616
- AliyunFCFullAccess
1717
- AliyunContainerRegistryFullAccess
1818
Runtime: custom container
19+
Parameters:
20+
type: object
21+
additionalProperties: false # 不允许增加其他属性
22+
required: # 必填项
23+
- region
24+
- serviceName
25+
- functionName
26+
- acrRegistry
27+
properties:
28+
region:
29+
title: 地域
30+
type: string
31+
default: cn-hangzhou
32+
description: 创建应用所在的地区
33+
enum:
34+
- cn-beijing
35+
- cn-hangzhou
36+
- cn-shanghai
37+
- cn-qingdao
38+
- cn-zhangjiakou
39+
- cn-huhehaote
40+
- cn-shenzhen
41+
- cn-chengdu
42+
- cn-hongkong
43+
- ap-southeast-1
44+
- ap-southeast-2
45+
- ap-southeast-3
46+
- ap-southeast-5
47+
- ap-northeast-1
48+
- eu-central-1
49+
- eu-west-1
50+
- us-west-1
51+
- us-east-1
52+
- ap-south-1
53+
serviceName:
54+
title: 服务名
55+
type: string
56+
default: hello-world-service
57+
description: 服务名称,只能包含字母、数字、下划线和中划线。不能以数字、中划线开头。长度在 1-128 之间
58+
functionName:
59+
title: 函数名
60+
type: string
61+
default: custom-cpp-event-function
62+
description: 函数名称,只能包含字母、数字、下划线和中划线。不能以数字、中划线开头。长度在 1-64 之间
63+
acrRegistry:
64+
title: 镜像仓库
65+
type: string
66+
examples: ['registry.cn-hangzhou.aliyuncs.com/fc-demo/fc-cpp-event:v0.1']
67+
description: 镜像仓库地址,需要在 https://cr.console.aliyun.com/ 中开通服务、创建仓库以及设置访问凭证

custom-container-function/fc-custom-container-event-cpp/src/s.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ name: hello-world-app
2222
access: "{{ access }}"
2323

2424
vars: # 全局变量
25-
region: cn-hangzhou
25+
region: {{ region }}
2626
service:
27-
name: hello-world-service
27+
name: {{ serviceName }}
2828
description: 'hello world by serverless devs'
2929

3030
services:
@@ -47,14 +47,14 @@ services:
4747
region: ${vars.region} # 关于变量的使用方法,可以参考:https://www.serverless-devs.com/serverless-devs/yaml#变量赋值
4848
service: ${vars.service}
4949
function:
50-
name: custom-cpp-event-function
50+
name: {{ functionName }}
5151
description: 'hello world by serverless devs'
5252
caPort: 9000
5353
memorySize: 256
5454
timeout: 60
5555
runtime: custom-container
5656
customContainerConfig:
57-
image: registry.cn-hangzhou.aliyuncs.com/fc-demo/fc-cpp-event:v0.1 # 需要换成自己的registry地址
57+
image: {{ acrRegistry }}
5858
codeUri: ./code
5959
# next-function: # 第二个函数的案例,仅供参考
6060
# # 如果在当前项目下执行 s deploy,会同时部署模块:

0 commit comments

Comments
 (0)