# 欢迎使用 ⚡️serverless⚡️ 组件
#
# serverless组件是基于具体使用场景(Express, 静态网站等)提供的定制云资源编排和组织的解决方案。
# 这是serverless的主要配置文件，包含了一些使用示例以及注释说明。
# 您只需几行配置描述，即可进行云函数、API 网关、COS、DB 等
# Serverless 资源进行快速创建、部署和修改。
#
# 有关完整的配置选项，请检查文档：
# https://cloud.tencent.com/document/product/1154/51080
#
# 👩‍💻 Happy Coding 👨‍💻

# ##应用信息##
# app,stage 会被根目录配置文件覆写
app: wecanmanage # app名称(app唯一识别标识)。同账号下需唯一
component: nestjs # [必选]要使用组件，更多组件请查看 https://github.com/serverless-components
name: api # [必选]组件实例名称
# stage: ${env:STAGE} # app环境名称，默认为dev

# ##nest 组件配置##
# 更多内容请查看：https://github.com/serverless-components/tencent-nest/tree/master/docs/configure.md
inputs:
  name: ${stage}-${app}-${name}
  src: # 执行目录 更多配置请参考配置文档
    src: ./ # 本地需要打包的文件目录
    exclude:
      - .env
      - 'auth/**'
      - 'node_modules/**'
      - 'common/**'
      - 'exceptions/**'
      - 'guards/**'
      - 'image-resource/**'
      - 'middlewares/**'
      - 'pips/**'
      - 'scene/**'
      - 'schedules/**'
      - 'user/**'
      - 'utils/**'
      - app.controller.ts
      - app.module.ts
      - global.d.ts
      - main.ts
      - orglogs.log
  functionName: ${name} # 云函数名称。使用此配置文件中的name（组件实例名称）
  region: ${env:REGION} # 部署目标地区。 更多参考 https://cloud.tencent.com/document/api/583/17238#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8
  runtime: Nodejs16.13 # 运行环境。[Nodejs10.15, Nodejs12.16]
  functionConf: # 函数配置
    timeout: 30 # 超时时间，单位秒
    vpcConfig: # 私有网络配置
      vpcId: ${output:${stage}:${app}:vpc.vpcId} # 私有网络Id
      subnetId: ${output:${stage}:${app}:vpc.subnetId} # 子网Id
    environment: # 环境变量
      variables:
        PG_CONNECT_STRING: ${output:${stage}:${app}:db.private.connectionString}
  apigatewayConf: # API 网关
    enableCORS: true # 允许跨域
    protocols:
      - http
      - https
  layers:
    - name: ${output:${stage}:${app}:layer.name}
      version: ${output:${stage}:${app}:layer.version}