Skip to content
This repository was archived by the owner on Mar 17, 2022. It is now read-only.

Commit 3633aae

Browse files
authored
Merge pull request #3 from easy2stake/master
Add docker support
2 parents 70ddf10 + 569d2e3 commit 3633aae

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM node:alpine
2+
3+
WORKDIR /synth-index-cc-adapter
4+
ADD . .
5+
6+
RUN yarn install
7+
8+
CMD node ./app.js

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
This adapter pulls the indexes for Synthetix's index synths, retrieves the current market price for each asset from CryptoCompare, and calculates a weighted index.
44

5+
## Environment variables
6+
7+
| Variable | | Description | Example |
8+
|---------------|:-------------:|------------- |:---------:|
9+
| `API_KEY` | **Required** | Your CryptoCompare API Key | `ABCDEFGHJIKLMo64FtaRLRR5BdHEESmha49TM` |
10+
11+
To get CryptoCompare API credentials, check out https://min-api.cryptocompare.com/.
12+
513
## Install
614

715
```bash
@@ -20,6 +28,16 @@ npm test
2028
zip -r cl-synth-index-cc.zip .
2129
```
2230

31+
## Run with Docker
32+
33+
```bash
34+
docker build . -t synth-index-cc-adapter
35+
docker run -itd \
36+
-p 8080:8080 \
37+
-e API_KEY="Your_cryptocompare_API_key" \
38+
synth-index-cc-adapter
39+
```
40+
2341
## Install to AWS Lambda
2442

2543
- In Lambda Functions, create function

0 commit comments

Comments
 (0)