Oapi-Feishu/s.yaml
2024-01-28 01:20:44 +08:00

59 lines
1.6 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

edition: 1.0.0
name: feishuBot-chatGpt
access: "aliyun" # 秘钥别名
vars: # 全局变量
region: "ap-southeast-1"
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-chatgpt"
description: 'a simple feishubot by serverless devs'
codeUri: './code'
cAPort: 9000
customRuntimeConfig:
command:
- ./target/main
environmentVariables: {}
handler: index.handler
instanceConcurrency: 20
instanceType: e1
memorySize: 128
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