Skip to content

Commit c3bccaa

Browse files
josedahlquistpamgonzalez
authored andcommitted
Add mongodb connection
1 parent 738211f commit c3bccaa

File tree

7 files changed

+213
-12207
lines changed

7 files changed

+213
-12207
lines changed

Diff for: .env.test

+7
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ RSK_NODE_HOST='https://public-node.testnet.rsk.co'
1919
LOCAL_TEST=1
2020
TEST_FEDERATION_ADDRESS='2ND7Zf42GPg1JJb5TQGYXkM4Ygz74spV8MR'
2121
TTL_SESSIONDB_EXPIRE_MILLISECONDS=172800000
22+
23+
# MONGODB CONNECTION
24+
RSK_DB_USER='api-user'
25+
RSK_DB_PASS='pwd'
26+
RSK_DB_URL='localhost'
27+
RSK_DB_PORT=27017
28+
RSK_DB_NAME=rsk

Diff for: .gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Logs
22
logs
3-
*.log
3+
*.log*
44
npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
@@ -70,3 +70,6 @@ data/*
7070
SessionDB/data/redis-data
7171
sonar-project.properties
7272
.scannerwork
73+
74+
# rsk db data
75+
rsk-database/db

Diff for: README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@ npm ci
1919
Move to the `SessionDB` folder and run:
2020

2121
```sh
22-
docker-compose up
22+
docker-compose up -d
2323
```
2424

25+
### RSK DB
26+
Move to the `rsk-database` folder, copy your `.env` file in it and then run:
27+
```sh
28+
docker-compose up -d
29+
```
30+
31+
For some reason passing `--env-file` argument to docker-compose doesn't seem to be working fine. That's why we need to copy the `.env` file here too.
32+
2533
## Run the application
2634
```sh
2735
npm start

0 commit comments

Comments
 (0)