Files
danmaku/s.yaml
2024-03-23 15:45:08 +08:00

47 lines
1.8 KiB
YAML
Raw 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: fc-danmaku
access: default
vars: # 全局变量
region: us-west-1
certId: 12106443
service:
name: fc-danmaku
# logConfig: auto
triggers:
- name: http_t
type: http
config:
authType: anonymous
methods:
- GET
- POST
services:
subweb: # 业务名称/模块名称
component: fc # 组件名称Serverless Devs 工具本身类似于一种游戏机,不具备具体的业务能力,组件类似于游戏卡,用户通过向游戏机中插入不同的游戏卡实现不同的功能,即通过使用不同的组件实现不同的具体业务能力
actions: # 自定义执行逻辑关于actions 的使用可以参考https://www.serverless-devs.com/serverless-devs/yaml#行为描述
pre-deploy: # 在deploy之前运行
- component: fc build --use-docker --dockerfile ./Dockerfile # 要运行的组件格式为【component: 组件名 命令 参数】可以通过s cli registry search --type Component 获取组件列表)
post-deploy:
- run: curl -I -X GET https://fc.lyz05.cn/
props:
region: ${vars.region} # 关于变量的使`1用方法可以参考https://www.serverless-devs.com/serverless-devs/yaml#变量赋值
service: ${vars.service}
function:
name: danmaku
caPort: 3000
memorySize: 256
timeout: 30
runtime: custom-container
customContainerConfig:
image: registry.us-west-1.aliyuncs.com/lyz05/danmaku:latest
instanceConcurrency: 50 # 单实例多并发
triggers: ${vars.triggers}
customDomains:
- domainName: fc.lyz05.cn
protocol: HTTP,HTTPS
routeConfigs:
- path: /*
certId: ${vars.certId}