This repository has been archived by the owner on Mar 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
79 lines (75 loc) · 2.25 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
service:
name: xdd-tribute
plugins:
- serverless-offline
- serverless-plugin-typescript
provider:
name: aws
runtime: nodejs12.x
region: eu-west-1
timeout: 240
apiGateway:
minimumCompressionSize: 1024 # Enable gzip compression for responses > 1 KB
environment:
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1
package:
include:
- firebase-admin-service-account.json
functions:
thank:
handler: src/handler.handlerThank
environment:
DATABASE_NAME: ${env:DATABASE_NAME}
GOOGLE_APPLICATION_CREDENTIALS: firebase-admin-service-account.json
SLACK_TOKEN: ${env:SLACK_TOKEN}
IS_PROD: ${env:IS_PROD}
users:
handler: src/handler.handlerUsers
environment:
SLACK_TOKEN: ${env:SLACK_TOKEN}
IS_PROD: ${env:IS_PROD}
getThanks:
handler: src/handler.handlerGetThanks
environment:
DATABASE_NAME: ${env:DATABASE_NAME}
GOOGLE_APPLICATION_CREDENTIALS: firebase-admin-service-account.json
IS_PROD: ${env:IS_PROD}
deliverPastThankYou:
handler: src/handler.handlerDeliverPastThankYou
environment:
DATABASE_NAME: ${env:DATABASE_NAME}
GOOGLE_APPLICATION_CREDENTIALS: firebase-admin-service-account.json
SLACK_TOKEN: ${env:SLACK_TOKEN}
IS_PROD: ${env:IS_PROD}
events:
- schedule: cron(0 8 1 * ? *)
shareStatistics:
handler: src/handler.handlerStatistics
environment:
DATABASE_NAME: ${env:DATABASE_NAME}
GOOGLE_APPLICATION_CREDENTIALS: firebase-admin-service-account.json
SLACK_TOKEN: ${env:SLACK_TOKEN}
IS_PROD: ${env:IS_PROD}
events:
- schedule: cron(0 8 5 * ? *)
reminder:
handler: src/handler.handlerReminder
environment:
DATABASE_NAME: ${env:DATABASE_NAME}
GOOGLE_APPLICATION_CREDENTIALS: firebase-admin-service-account.json
SLACK_TOKEN: ${env:SLACK_TOKEN}
IS_PROD: ${env:IS_PROD}
events:
- schedule: cron(0 8 25 * ? *)
slack:
handler: src/handler.handlerSlack
environment:
DATABASE_NAME: ${env:DATABASE_NAME}
GOOGLE_APPLICATION_CREDENTIALS: firebase-admin-service-account.json
SLACK_TOKEN: ${env:SLACK_TOKEN}
SIGNING_SECRET: ${env:SIGNING_SECRET}
IS_PROD: ${env:IS_PROD}
events:
- http:
method: post
path: slack