-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
82 lines (76 loc) · 1.91 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
service: ${env:SERVICE_NAME}
frameworkVersion: "^2.1.0"
useDotenv: true
plugins:
- serverless-domain-manager
- serverless-offline
- serverless-api-gateway-caching
- serverless-bundle
provider:
name: aws
apiGateway:
minimumCompressionSize: 1024
shouldStartNameWithService: true
runtime: nodejs14.x
versionFunctions: false
environment:
ARCHIVIST_MONGO_USERNAME: ${env:ARCHIVIST_MONGO_USERNAME}
ARCHIVIST_MONGO_PASSWORD: ${env:ARCHIVIST_MONGO_PASSWORD}
ARCHIVIST_MONGO_DOMAIN: ${env:ARCHIVIST_MONGO_DOMAIN}
ARCHIVIST_MONGO_DATABASE: ${env:ARCHIVIST_MONGO_DATABASE}
timeout: 29
custom:
apiGatewayCaching:
enabled: true
ttlInSeconds: 3600
perKeyInvalidation:
requireAuthorization: false
bundle:
sourceMaps: true
caching: true
stats: true
linting: true
tsconfig: "tsconfig.json"
externals:
- firebase-admin
- aws-lambda
- mongodb
- lodash
domain:
dev: localhost
beta: beta.${env:DOMAIN}
prod: ${env:DOMAIN}
customDomains:
- rest:
certificateName: ${env:CERTIFICATE_NAME}
domainName: ${self:custom.domain.${opt:stage, 'dev'}}
stage: ${opt:stage, 'dev'}
functions:
block-sample:
handler: src/archive/block/sample/get.entryPoint
events:
- http:
path: /archive/{archive}/block/sample/{size}
method: GET
cors: true
block-get-hash:
handler: src/archive/block/hash/get.entryPoint
events:
- http:
path: /archive/{archive}/block/hash/{hash}
method: GET
cors: true
block-get-recent:
handler: src/archive/block/recent/get.entryPoint
events:
- http:
path: /archive/{archive}/block/recent/{limit}
method: GET
cors: true
reflect-get:
handler: src/reflect/get.entryPoint
events:
- http:
path: /reflect
method: GET
cors: true