mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
99 lines
2.4 KiB
YAML
Executable File
99 lines
2.4 KiB
YAML
Executable File
# Welcome to Serverless!
|
|
#
|
|
# This file is the main config file for your service.
|
|
# It's very minimal at this point and uses default values.
|
|
# You can always add more config options for more control.
|
|
# We've included some commented out config examples here.
|
|
# Just uncomment any of them to get that config option.
|
|
#
|
|
# For full config options, check the docs:
|
|
# docs.serverless.com
|
|
#
|
|
# Happy Coding!
|
|
|
|
# Tencent Cloud serverless.yml Reference
|
|
# https://github.com/serverless-tencent/serverless-tencent-scf/blob/master/docs/en/yaml.md
|
|
|
|
service: my-service # service name
|
|
|
|
provider: # provider information
|
|
name: tencent
|
|
runtime: Python3.6 # Python3.6 or Python2.7
|
|
credentials: ~/credentials
|
|
|
|
# you can overwrite defaults here
|
|
# stage: dev
|
|
# cosBucket: DEFAULT
|
|
# role: QCS_SCFExcuteRole
|
|
# memorySize: 256
|
|
# timeout: 10
|
|
# region: ap-shanghai
|
|
# environment:
|
|
# variables:
|
|
# ENV_FIRST: env1
|
|
# ENV_SECOND: env2
|
|
# vpcConfig:
|
|
# vpcId: test
|
|
# subnetId: test
|
|
|
|
plugins:
|
|
- serverless-tencent-scf
|
|
|
|
# you can add packaging information here
|
|
#package:
|
|
# patterns:
|
|
# - '!exclude-me.py'
|
|
# - '!exclude-me-dir/**'
|
|
# - include-me.py
|
|
# - include-me-dir/**
|
|
|
|
functions:
|
|
hello_world:
|
|
handler: index.main_handler
|
|
# description: Tencent Serverless Cloud Function
|
|
# runtime: Python3.6 # Python3.6 or Python2.7
|
|
# memorySize: 256
|
|
# timeout: 10
|
|
# environment:
|
|
# variables:
|
|
# ENV_FIRST: env1
|
|
# ENV_Third: env2
|
|
# vpcConfig:
|
|
# vpcId: test
|
|
# subnetId: testls
|
|
|
|
# events:
|
|
# - timer:
|
|
# name: timer
|
|
# parameters:
|
|
# cronExpression: '*/5 * * * *'
|
|
# enable: true
|
|
# - cos:
|
|
# name: cli-appid.cos.ap-beijing.myqcloud.com
|
|
# parameters:
|
|
# bucket: cli-appid.cos.ap-beijing.myqcloud.com
|
|
# filter:
|
|
# prefix: filterdir/
|
|
# suffix: .jpg
|
|
# events: cos:ObjectCreated:*
|
|
# enable: true
|
|
# - apigw:
|
|
# name: hello_world_apigw
|
|
# parameters:
|
|
# stageName: release
|
|
# serviceId:
|
|
# httpMethod: ANY
|
|
# - cmq:
|
|
# name: cmq_trigger
|
|
# parameters:
|
|
# name: test-topic-queue
|
|
# enable: true
|
|
# - ckafka:
|
|
# name: ckafka_trigger
|
|
# parameters:
|
|
# name: ckafka-2o10hua5
|
|
# topic: test
|
|
# maxMsgNum: 999
|
|
# offset: latest
|
|
# enable: true
|