forked from meemproject/meem-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
140 lines (132 loc) · 3.41 KB
/
serverless.yml
File metadata and controls
140 lines (132 loc) · 3.41 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
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
# 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: epm-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, ''}
package:
excludeDevDependencies: true
include:
- build/**
- src/types/api.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