-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserverless.yml
More file actions
94 lines (82 loc) · 1.89 KB
/
serverless.yml
File metadata and controls
94 lines (82 loc) · 1.89 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
service: beoi-api
frameworkVersion: ">=1.10.0 <1.11.0"
provider:
name: aws
runtime: nodejs6.10
stage: dev
region: eu-west-1
profile: beoi
timeout: 6
environment:
STAGE: ${self:custom.stage}
DB_DRIVER: ${self:custom.dbconf.driver}
DB_HOST: ${self:custom.dbconf.host}
DB_USER: ${self:custom.dbconf.user}
DB_PASSWORD: ${self:custom.dbconf.password}
DB_DATABASE: ${self:custom.dbconf.database}
vpc: ${self:custom.dbvpc}
custom:
stage: ${opt:stage, self:provider.stage}
dbconf: ${file(config/db.json):${self:custom.stage}}
dbvpc:
securityGroupIds:
- sg-5508df33
subnetIds:
- subnet-1e45c846
- subnet-d7581bb3
- subnet-3e8cf548
functions:
index:
handler: handler.index
events:
- http:
path: ""
method: GET
ping:
handler: handler.ping
events:
- http:
path: ping
method: GET
scores_history:
handler: handler.scores_history
vpc: ${self:custom.dbvpc}
events:
- http:
path: scores/history
method: GET
cors: true
scores_current:
handler: handler.scores_current
vpc: ${self:custom.dbvpc}
events:
- http:
path: scores/current
method: GET
cors: true
scores_compute:
handler: handler.scores_compute
vpc: ${self:custom.dbvpc}
events:
- http:
path: scores/compute
method: POST
cors: true
- schedule: rate(1 hour)
activities_latest:
handler: handler.activities_latest
vpc: ${self:custom.dbvpc}
events:
- http:
path: activities/latest
method: GET
cors: true
activities_compute:
handler: handler.activities_compute
vpc: ${self:custom.dbvpc}
events:
- http:
path: activities/compute
method: POST
cors: true
- schedule: rate(1 hour)