变更内容: - 删除 `src` 子目录,将模块引用路径从 `src.functional_scaffold` 更新为 `functional_scaffold`。 - 修改相关代码、文档、测试用例及配置文件中的路径引用,包括 `README.md`、`Dockerfile`、`uvicorn` 启动命令等。 - 优化项目目录结构,提升代码维护性和可读性。
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
# 阿里云函数计算配置
|
|
ROSTemplateFormatVersion: '2015-09-01'
|
|
Transform: 'Aliyun::Serverless-2018-04-03'
|
|
Resources:
|
|
functional-scaffold:
|
|
Type: 'Aliyun::Serverless::Service'
|
|
Properties:
|
|
Description: '算法工程化 Serverless 脚手架'
|
|
LogConfig:
|
|
Project: functional-scaffold-logs
|
|
Logstore: function-logs
|
|
VpcConfig:
|
|
VpcId: 'vpc-xxxxx'
|
|
VSwitchIds:
|
|
- 'vsw-xxxxx'
|
|
SecurityGroupId: 'sg-xxxxx'
|
|
prime-checker:
|
|
Type: 'Aliyun::Serverless::Function'
|
|
Properties:
|
|
Description: '质数判断算法服务'
|
|
Runtime: custom-container
|
|
MemorySize: 512
|
|
Timeout: 60
|
|
InstanceConcurrency: 10
|
|
CAPort: 8000
|
|
CustomContainerConfig:
|
|
Image: 'registry.cn-hangzhou.aliyuncs.com/your-namespace/functional-scaffold:latest'
|
|
Command: '["uvicorn", "functional_scaffold.main:app", "--host", "0.0.0.0", "--port", "8000"]'
|
|
EnvironmentVariables:
|
|
APP_ENV: production
|
|
LOG_LEVEL: INFO
|
|
METRICS_ENABLED: 'true'
|
|
Events:
|
|
httpTrigger:
|
|
Type: HTTP
|
|
Properties:
|
|
AuthType: ANONYMOUS
|
|
Methods:
|
|
- GET
|
|
- POST
|