-
Notifications
You must be signed in to change notification settings - Fork 32
/
s.yaml
41 lines (39 loc) · 1.43 KB
/
s.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# ------------------------------------
# 官方手册: https://manual.serverless-devs.com/user-guide/aliyun/#fc3
# 常见小贴士: https://manual.serverless-devs.com/user-guide/tips/
# 有问题快来钉钉群问一下吧:33947367
# ------------------------------------
edition: 3.0.0
name: hello-world-app
access: "{{ access }}"
vars: # 全局变量
region: "{{ region }}"
resources:
hello_world:
component: fc3
actions:
pre-${regex('deploy|local')}:
- run: GO111MODULE=on go mod tidy
path: ./code
- run: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o target/main main.go
path: ./code
props:
region: ${vars.region}
functionName: "{{ functionName }}"
description: 'hello world by serverless devs'
runtime: "{{ runtime }}"
code: ./code/target
handler: main
memorySize: 128
timeout: 10
# triggers:
# - triggerName: httpTrigger # 触发器名称
# triggerType: http # 触发器类型
# description: 'xxxx'
# qualifier: LATEST # 触发服务的版本
# triggerConfig:
# authType: anonymous # 鉴权类型,可选值:anonymous、function
# disableURLInternet: false # 是否禁用公网访问 URL
# methods: # HTTP 触发器支持的访问方法,可选值:GET、POST、PUT、DELETE、HEAD
# - GET
# - POST