-
Notifications
You must be signed in to change notification settings - Fork 5
/
s.yaml
58 lines (56 loc) · 1.56 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
edition: 1.0.0
name: feishuBot-bot
access: "aliyun" # 秘钥别名
vars: # 全局变量
region: "cn-hangzhou"
services:
helloworld:
component: fc
actions:
pre-deploy:
- run: go mod tidy
path: ./code
- run: GO111MODULE=on GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o
target/main main.go
path: ./code
# post-deploy:
# - run: rm -rf target
# path: ./code
# 配置参考https://docs.serverless-devs.com/fc/yaml/readme
props: # 组件的属性值
region: ${vars.region} # 关于变量的使用方法,可以参考:https://www.serverless-devs.com/serverless-devs/yaml#变量赋值
service:
name: "feishubot"
description: "Serverless Devs Website Service"
function:
name: "feishu-wenxin"
description: 'a simple feishubot by serverless devs'
codeUri: './code'
caPort: 9000
customRuntimeConfig:
command:
- ./target/main
environmentVariables: {}
handler: index.handler
instanceConcurrency: 20
instanceType: e1
memorySize: 256
runtime: custom
timeout: 120
internetAccess: true
triggers:
- name: httpTrigger
type: http
config:
authType: anonymous
methods:
- GET
- POST
customDomains:
- domainName: auto
protocol: HTTP
routeConfigs:
- path: /*
methods:
- GET
- POST