-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yml
179 lines (171 loc) · 5.63 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
# Welcome to Serverless!
#
# This file is the main config file for your service.
# It's very minimal at this point and uses default values.
# You can always add more config options for more control.
# We've included some commented out config examples here.
# Just uncomment any of them to get that config option.
#
# For full config options, check the docs:
# docs.serverless.com
#
# Happy Coding!
service: meem-api
configValidationMode: warn
provider:
name: aws
runtime: nodejs16.x
memorySize: 256
timeout: 30
# logs:
# websocket: true
environment:
SERVERLESS: true
LOG_LEVEL: ${env:LOG_LEVEL, 'debug'}
ENABLE_REQUEST_LOGGING: ${env:ENABLE_REQUEST_LOGGING, 'false'}
ORM_DISABLE: ${env:ORM_DISABLE, 'false'}
WALLET_PRIVATE_KEY: ${env:WALLET_PRIVATE_KEY, ''}
CORS_ALLOW_ALL: ${env:CORS_ALLOW_ALL, 'true'}
APP_AWS_ACCESS_KEY_ID: ${env:APP_AWS_ACCESS_KEY_ID, ''}
APP_AWS_SECRET_ACCESS_KEY: ${env:APP_AWS_SECRET_ACCESS_KEY, ''}
ENABLE_TEST_ENDPOINTS: ${env:ENABLE_TEST_ENDPOINTS, ''}
DYNAMODB_SOCKETS_TABLE: ${env:DYNAMODB_SOCKETS_TABLE, ''}
AWS_WEBSOCKET_GATEWAY_URL: ${env:AWS_WEBSOCKET_GATEWAY_URL, ''}
MAX_GAS_PRICE_GWEI: ${env:MAX_GAS_PRICE_GWEI, '50'}
MIN_GAS_PRICE_GWEI: ${env:MIN_GAS_PRICE_GWEI, '31'}
GAS_ESTIMATE_THRESHOLD_GWEI: ${env:GAS_ESTIMATE_THRESHOLD_GWEI, '10'}
DISABLE_MIGRATIONS: ${env:DISABLE_MIGRATIONS, 'true'}
DISABLE_ORM_SYNC: ${env:DISABLE_ORM_SYNC, 'true'}
DATABASE_URL: ${env:DATABASE_URL, ''}
TWITTER_BEARER_TOKEN: ${env:TWITTER_BEARER_TOKEN, ''}
TWITTER_AUTH_CALLBACK_URL: ${env:TWITTER_AUTH_CALLBACK_URL, ''}
ENABLE_VERBOSE_ERRORS: ${env:ENABLE_VERBOSE_ERRORS, 'false'}
DEFAULT_PAGINATION_LIMIT: ${env:DEFAULT_PAGINATION_LIMIT, '20'}
TWITTER_IDENTITY_INTEGRATION_ID: ${env:TWITTER_IDENTITY_INTEGRATION_ID, ''}
DISCORD_IDENTITY_INTEGRATION_ID: ${env:DISCORD_IDENTITY_INTEGRATION_ID, ''}
EMAIL_IDENTITY_INTEGRATION_ID: ${env:EMAIL_IDENTITY_INTEGRATION_ID, ''}
AUTH0_APP_DOMAIN: ${env:AUTH0_APP_DOMAIN, ''}
AUTH0_CLIENT_ID: ${env:AUTH0_CLIENT_ID, ''}
AUTH0_CLIENT_SECRET: ${env:AUTH0_CLIENT_SECRET, ''}
AUTH0_VERIFY_EMAIL_CALLBACK_URL: ${env:AUTH0_VERIFY_EMAIL_CALLBACK_URL, ''}
JSON_RPC_MAINNET: ${env:JSON_RPC_MAINNET, ''}
ALCHEMY_API_KEY_MAINNET: ${env:ALCHEMY_API_KEY_MAINNET, ''}
ALCHEMY_API_KEY_RINKEBY: ${env:ALCHEMY_API_KEY_RINKEBY, ''}
ALCHEMY_API_KEY_POLYGON: ${env:ALCHEMY_API_KEY_POLYGON, ''}
ALCHEMY_API_KEY_GOERLI: ${env:ALCHEMY_API_KEY_GOERLI, ''}
ALCHEMY_API_KEY_ARBITRUM_GOERLI: ${env:ALCHEMY_API_KEY_ARBITRUM_GOERLI, ''}
ALCHEMY_API_KEY_OPTIMISM_GOERLI: ${env:ALCHEMY_API_KEY_OPTIMISM_GOERLI, ''}
ALCHEMY_API_KEY_MUMBAI: ${env:ALCHEMY_API_KEY_MUMBAI, ''}
SEGMENT_WRITE_KEY: ${env:SEGMENT_WRITE_KEY, ''}
ENCRYPTION_KEY: ${env:ENCRYPTION_KEY, ''}
TWITTER_OAUTH_CALLBACK_URL: ${env:TWITTER_OAUTH_CALLBACK_URL, ''}
DISCORD_PUBLIC_KEY: ${env:DISCORD_PUBLIC_KEY, ''}
DISCORD_APP_ID: ${env:DISCORD_APP_ID, ''}
DISCORD_ENABLE_LISTENERS: ${env:DISCORD_ENABLE_LISTENERS, ''}
DISCORD_APP_TOKEN: ${env:DISCORD_APP_TOKEN, ''}
SLACK_CLIENT_ID: ${env:SLACK_CLIENT_ID, ''}
SLACK_CLIENT_SECRET: ${env:SLACK_CLIENT_SECRET, ''}
TWITTER_APP_ID: ${env:TWITTER_APP_ID, ''}
TWITTER_OAUTH_CLIENT_ID: ${env:TWITTER_OAUTH_CLIENT_ID, ''}
TWITTER_OAUTH_CLIENT_SECRET: ${env:TWITTER_OAUTH_CLIENT_SECRET, ''}
API_URL: ${env:API_URL, ''}
MEEM_DOMAIN: ${env:MEEM_DOMAIN, ''}
package:
excludeDevDependencies: true
include:
- build/**
- src/types/meem.generated.ts
- src/lib/meem-badge.png
- .env
exclude:
- .circleci/**
- .vscode/**
- backup/**
- coverage/**
- docker/**
- docs/**
- load-testing/**
- scripts/**
- src/**
- tmp/**
functions:
queue:
handler: build/serverless/queue.handle
events:
- sqs: ${env:SQS_QUEUE_ARN, ''}
timeout: 600
images:
handler: build/serverless/handler.handle
memorySize: 768
events:
- httpApi:
method: '*'
path: '/images/1.0/{p1}'
- httpApi:
method: '*'
path: '/images/1.0/{p1}/{p2}'
- httpApi:
method: '*'
path: '/images/1.0/{p1}/{p2}/{p3}'
catchAll:
handler: build/serverless/handler.handle
events:
- httpApi:
method: '*'
path: '/api/1.0/{p1}'
- httpApi:
method: '*'
path: '/api/1.0/{p1}/{p2}'
- httpApi:
method: '*'
path: '/api/1.0/{p1}/{p2}/{p3}'
- httpApi:
method: '*'
path: '/api/1.0/{p1}/{p2}/{p3}/{p4}'
- httpApi:
method: '*'
path: '/api/1.0/{p1}/{p2}/{p3}/{p4}/{p5}'
- httpApi:
method: '*'
path: '/admin/1.0/{p1}'
- httpApi:
method: '*'
path: '/admin/1.0/{p1}/{p2}'
- httpApi:
method: '*'
path: '/admin/1.0/{p1}/{p2}/{p3}'
- httpApi:
method: '*'
path: '/admin/1.0/{p1}/{p2}/{p3}/{p4}'
- httpApi:
method: '*'
path: '/admin/1.0/{p1}/{p2}/{p3}/{p4}/{p5}'
- httpApi:
method: '*'
path: '/'
sockets:
handler: build/serverless/socket.handle
events:
- websocket: $connect
- websocket: $disconnect
- websocket: $default
cron:
handler: build/serverless/cron.handle
timeout: 600
events:
- schedule:
rate: rate(5 minutes)
enabled: true
input:
job: ENSCron
- schedule:
rate: rate(5 minutes)
enabled: true
input:
job: AgreementCron
plugins:
- serverless-prune-plugin
custom:
prune:
automatic: true
number: 3