-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
198 lines (175 loc) · 4.52 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
service: retrospective
provider:
name: aws
runtime: python3.7
region: us-east-1
stage: ${env:ENVIRONMENT}
memorySize: 256
timeout: 15
deploymentBucket:
name: serverless-deploy-485419608727
iamManagedPolicies:
- ${env:DATABASE_POLICY}
- ${env:WEBSOCKET_POLICY}
environment:
ENVIRONMENT: ${env:ENVIRONMENT}
ALLOWED_HOST: ${env:ALLOWED_HOST}
WEBSOCKET_ENDPOINT: ${env:WEBSOCKET_ENDPOINT}
package:
exclude:
- ./**
include:
- backend/api/**
- backend/__init__.py
functions:
createRetro:
handler: backend.api.views.generic.retro.create
events:
- http:
path: /api/retro
method: post
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
moveRetro:
handler: backend.api.views.generic.retro.move
events:
- http:
path: /api/retro/{retro_id}
method: put
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
- Authorization
getRetro:
handler: backend.api.views.generic.retro.get
events:
- http:
path: /api/retro/{retro_id}
method: get
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
- Authorization
addParticipant:
handler: backend.api.views.generic.user.add_participant
events:
- http:
path: /api/retro/{retro_id}/user
method: post
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
markAsReady:
handler: backend.api.views.generic.user.mark_as_ready
events:
- http:
path: /api/retro/{retro_id}/user
method: put
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
- Authorization
addIssue:
handler: backend.api.views.generic.issue.add
events:
- http:
path: /api/retro/{retro_id}/issue
method: post
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
- Authorization
voteOrGroupIssue:
handler: backend.api.views.generic.issue.vote_or_group
events:
- http:
path: /api/retro/{retro_id}/issue/{issue_id}
method: put
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
- Authorization
deleteIssue:
handler: backend.api.views.generic.issue.delete
events:
- http:
path: /api/retro/{retro_id}/issue/{issue_id}
method: delete
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
- Authorization
addGroup:
handler: backend.api.views.generic.group.add
events:
- http:
path: /api/retro/{retro_id}/group
method: post
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
- Authorization
voteForGroup:
handler: backend.api.views.generic.group.vote
events:
- http:
path: /api/retro/{retro_id}/group/{group_id}
method: put
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
- Authorization
deleteGroup:
handler: backend.api.views.generic.group.delete
events:
- http:
path: /api/retro/{retro_id}/group/{group_id}
method: delete
cors:
origin: https://${env:ALLOWED_HOST}
headers:
- Api-Version
- Content-Type
- Authorization
websocketConnect:
handler: backend.api.views.generic.websockets.websocket_connect
events:
- websocket:
route: $connect
plugins:
- serverless-python-requirements
resources:
Outputs:
ApiGatewayId:
Description: The ID of the API Gateway
Value:
Ref : "ApiGatewayRestApi"
custom:
pythonRequirements:
fileName: requirements-deploy.txt
noDeploy:
- boto3
- botocore
- docutils
- jmespath