This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
/
serverless.yml
79 lines (75 loc) · 1.73 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: DownloadThisVideo
frameworkVersion: "^2.0.0"
plugins:
- serverless-dotenv-plugin
- serverless-offline
provider:
name: aws
runtime: nodejs14.x
stage: beta
memorySize: 128
timeout: 100
logRetentionInDays: 30
iamRoleStatements:
- Effect: Allow
Action:
- sns:Publish
Resource:
- "Fn::Join":
- ':'
- - "arn:aws:sns:us-east-1"
- Ref: AWS::AccountId
- "newMention"
- Effect: Allow
Action:
- cloudwatch:PutMetricData
Resource:
- "*"
- Effect: Allow
Action:
- cloudwatch:GetMetricStatistics
Resource:
- "*"
environment:
TWITTER_CONSUMER_KEY: ${env:TWITTER_CONSUMER_KEY}
TWITTER_CONSUMER_SECRET: ${env:TWITTER_CONSUMER_SECRET}
TWITTER_ACCESS_TOKEN: ${env:TWITTER_ACCESS_TOKEN}
TWITTER_ACCESS_TOKEN_SECRET: ${env:TWITTER_ACCESS_TOKEN_SECRET}
TWITTER_CALLBACK_URL: ${env:TWITTER_CALLBACK_URL}
REDIS_HOSTNAME: ${env:REDIS_HOSTNAME}
REDIS_PORT: ${env:REDIS_PORT}
REDIS_PASSWORD: ${env:REDIS_PASSWORD}
TWITTER_SCREEN_NAME: ${env:TWITTER_SCREEN_NAME}
EXTERNAL_URL: ${env:EXTERNAL_URL}
FIREBASE_PROJECT_ID: ${env:FIREBASE_PROJECT_ID}
SENTRY_DSN: ${env:SENTRY_DSN}
GTAG_ID: ${env:GTAG_ID}
AD_CODE: ${env:AD_CODE}
NODE_ENV: ${env:NODE_ENV}
TOPIC_ARN:
"Fn::Join":
- ':'
-
- "arn:aws:sns:us-east-1"
- Ref: AWS::AccountId
- "newMention"
package:
include:
- views/**
exclude:
- "*.md"
- "*.png"
- "*.ico"
- .*
- .*/**
- awscliv2.zip
- aws/**
- spec/**
- assets/*.png
functions:
getHomePage:
handler: handler.getHomePage
events:
- http:
path: /{any+}
method: get