-
Notifications
You must be signed in to change notification settings - Fork 1
/
s.yaml
55 lines (53 loc) · 1.72 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
# This file is referenced from: https://help.aliyun.com/document_detail/337825.html?spm=a2c4g.337824.0.0.620b784aoRsfNf
edition: 1.0.0
name: feishu-new_bing_bot
access: "default"
# 可以填自己喜欢的服务器位置:
# https://help.aliyun.com/document_detail/140601.html?spm=a2c4g.43984.0.i4
vars:
region: "ap-southeast-1"
services:
chat_bot:
component: fc
actions:
pre-deploy:
- run: docker pull aliyunfc/runtime-python3.9:1.10.8
- run: docker run --platform linux/amd64 --rm -v $(pwd):/code
registry.cn-beijing.aliyuncs.com/aliyunfc/runtime-python3.9:build-1.10.8
sh -c '[ "$(ls -A /code/depends 2>/dev/null)" ] && echo "Dependence has been installed, skip..." || pip install -r /code/requirements.txt -t /code/depends --ignore-installed'
path: ./code
props:
region: ${vars.region}
service:
name: "feishu-new_bing_bot"
description: "Serverless Devs Website Service"
function:
name: "chatbot"
description: "A simple feishu-bot by serverless devs"
codeUri: "./code"
cAPort: 9000
environmentVariables:
PYTHONPATH: "${env:PYTHONPATH}:/code/depends/"
handler: index.app
instanceConcurrency: 20
instanceType: e1
memorySize: 128
timeout: 120
runtime: python3.9
internetAccess: true
triggers:
- name: httpTrigger
type: http
config:
authType: anonymous
methods:
- GET
- POST
customDomains:
- domainName: auto
protocol: HTTP
routeConfigs:
- path: /*
methods:
- GET
- POST