-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yaml
83 lines (74 loc) · 2.59 KB
/
serverless.yaml
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: k2-mw
frameworkVersion: '3'
plugins:
- serverless-offline
- serverless-plugin-ifelse
custom:
currentStage: ${opt:stage, self:provider.stage}
serverlessIfElse:
- If: '"${self:custom.currentStage}" == "local"'
Set:
functions.info.handler: ./handler.info
functions.report.handler: ./handler.report
provider:
name: aws
runtime: nodejs14.x
region: eu-central-1
ecr:
images:
k2_mw:
path: ./
environment:
VERSION: ${file(./env/config.${opt:stage, 'dev'}.json):VERSION}
DEFAULT_SERVICE_PROVIDER_BORROW_ADDRESS: ${file(./env/config.${opt:stage, 'dev'}.json):DEFAULT_SERVICE_PROVIDER_BORROW_ADDRESS}
DESIGNATED_VERIFIER_PRIVATE_KEY: ${file(./env/config.${opt:stage, 'dev'}.json):DESIGNATED_VERIFIER_PRIVATE_KEY}
PROVIDER_URL: ${file(./env/config.${opt:stage, 'dev'}.json):PROVIDER_URL}
K_SQUARED_LENDING_CONTRACT: ${file(./env/config.${opt:stage, 'dev'}.json):K_SQUARED_LENDING_CONTRACT}
K_SQUARED_REPORTER_REGISTRY: ${file(./env/config.${opt:stage, 'dev'}.json):K_SQUARED_REPORTER_REGISTRY}
LIVENESS_ENDPOINT: ${file(./env/config.${opt:stage, 'dev'}.json):LIVENESS_ENDPOINT}
CORRUPTION_VERIFICATION_ENDPOINT: ${file(./env/config.${opt:stage, 'dev'}.json):CORRUPTION_VERIFICATION_ENDPOINT}
DATA_FEED_ENDPOINT: ${file(./env/config.${opt:stage, 'dev'}.json):DATA_FEED_ENDPOINT}
IDENTIFIER_GENERATOR_ENDPOINT: ${file(./env/config.${opt:stage, 'dev'}.json):IDENTIFIER_GENERATOR_ENDPOINT}
CHAIN_ID: ${file(./env/config.${opt:stage, 'dev'}.json):CHAIN_ID}
REPORT_DEADLINE_LENGTH_IN_ETH_BLOCKS: ${file(./env/config.${opt:stage, 'dev'}.json):REPORT_DEADLINE_LENGTH_IN_ETH_BLOCKS}
CORRUPTION_VALIDATION_BEARER_TOKEN: ${file(./env/config.${opt:stage, 'dev'}.json):CORRUPTION_VALIDATION_BEARER_TOKEN}
IDENTIFIER_BEARER_TOKEN: ${file(./env/config.${opt:stage, 'dev'}.json):IDENTIFIER_BEARER_TOKEN}
functions:
info:
image:
name: k2_mw
command:
- handler.info
entryPoint:
- '/lambda-entrypoint.sh'
memorySize: 3500
timeout: 30
events:
- http:
path: info
method: get
cors: true
vpc:
securityGroupIds:
- sg-ebdf849f
subnetIds:
- subnet-0070f2ed34a5f74a7
report:
image:
name: k2_mw
command:
- handler.report
entryPoint:
- '/lambda-entrypoint.sh'
memorySize: 3500
timeout: 30
events:
- http:
path: report
method: post
cors: true
vpc:
securityGroupIds:
- sg-ebdf849f
subnetIds:
- subnet-0070f2ed34a5f74a7