-
Notifications
You must be signed in to change notification settings - Fork 38
/
template.yaml
69 lines (69 loc) · 2.54 KB
/
template.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
ROSTemplateFormatVersion: '2015-09-01'
Transform: 'Aliyun::Serverless-2018-04-03'
Resources:
service-mw2:
Type: 'Aliyun::Serverless::Service'
Properties:
Description: 测试serverless的服务
Role: 'acs:ram::1591526048690788:role/aliyunfcdefaultrole'
LogConfig:
Project: service-mw2
Logstore: service-mw2
EnableRequestMetrics: true
VpcConfig:
VpcId: vpc-wz9je35dho09vagpuawl9
VSwitchIds:
- vsw-wz9w8z1jkwnsr3eedgsnv
SecurityGroupId: sg-wz9egg8kg0g6dkf89sp9
TracingConfig: Enable
InternetAccess: true
app_index:
Type: 'Aliyun::Serverless::Function'
Properties:
Initializer: index.initializer
InitializationTimeout: 30
Handler: index.handler
Runtime: custom-container
Timeout: 30
MemorySize: 256
EnvironmentVariables:
LD_LIBRARY_PATH: >-
/code/.fun/root/usr/local/lib:/code/.fun/root/usr/lib:/code/.fun/root/usr/lib/x86_64-linux-gnu:/code/.fun/root/usr/lib64:/code/.fun/root/lib:/code/.fun/root/lib/x86_64-linux-gnu:/code/.fun/root/python/lib/python2.7/site-packages:/code/.fun/root/python/lib/python3.6/site-packages:/code:/code/lib:/usr/local/lib
MYSQL_DATABASE: service-mw2
MYSQL_HOST: 10.0.0.228
MYSQL_PASSWORD: XPPYP6NGHXmyTBM6
MYSQL_PORT: '3306'
MYSQL_USER: service-mw2
NODE_PATH: '/code/node_modules:/usr/local/lib/node_modules'
PATH: >-
/code/.fun/root/usr/local/bin:/code/.fun/root/usr/local/sbin:/code/.fun/root/usr/bin:/code/.fun/root/usr/sbin:/code/.fun/root/sbin:/code/.fun/root/bin:/code:/code/node_modules/.bin:/code/.fun/python/bin:/code/.fun/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/sbin:/bin
PYTHONUSERBASE: /code/.fun/python
REDIS_DB: '1'
REDIS_HOST: 10.0.0.228
REDIS_PORT: '6379'
NODE_ENV: 'production'
InstanceType: e1
InstanceLifecycleConfig:
PreFreeze:
Handler: ''
Timeout: 3
PreStop:
Handler: ''
Timeout: 3
CAPort: 9000
CustomContainerConfig:
Args: ''
Command: ''
Image: 'registry.cn-shenzhen.aliyuncs.com/service-mw2/midway:1.0.14'
Events:
http-app_index:
Type: HTTP
Properties:
AuthType: anonymous
Methods:
- GET
- PUT
- POST
- DELETE
- HEAD
- PATCH