-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
40 lines (40 loc) · 1.38 KB
/
serverless.yml
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
component: scf
name: tencentcfseditor
inputs:
name: tencentcfseditor
region: ap-shanghai
namespace: default
# 指定 SCF 类型为 Web 类型
type: web
memorySize: 128 #
timeout: 20 #
initTimeout: 15 #
environment: #
variables: #
VSCODE_EDITOR_ROOT: /mnt/ # 绝对路径 1.不能用/mnt 必须 /mnt/ 2.必须localMountDir的子目录下 自定义
VSCODE_SDK_API_HTTPS: true #文件请求走https协议
vpcConfig: # 私有网络配置
vpcId: vpc-8ezuc5hk # 私有网络的Id 自定义
subnetId: subnet-7yu9qe5v # 子网ID 自定义
cfs: # cfs配置
- cfsId: cfs-eaplmrx7 #自定义
mountInsId: cfs-eaplmrx7 #自定义
localMountDir: /mnt/
remoteMountDir: /
image:
imageType: personal
imageUrl: 'ccr.ccs.tencentyun.com/afan-public/mini-vscode:v1.0.1@sha256:9d3d15e37f9923548dfa98c921e2dd71a31087be53c127915fe16c24a72ad448' # 请修改为指定镜像版本 URL
#imageUrl: 'ccr.ccs.tencentyun.com/afan/afan:mini-vscode-1@sha256:52124e7dbf013963302be1e557a92334238c59e696c3e8c8c5781630100074f3' # 请修改为指定镜像版本 URL
events:
- apigw:
parameters:
protocols:
- http
- https
environment: release
endpoints:
- path: /
method: ANY
enableCORS: true
function:
type: web