# 阿里云函数计算配置 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