Merge branch 'hotfix/repoAndScriptsUpdate'
This commit is contained in:
commit
4f6280aed1
16
README.md
16
README.md
|
@ -5,7 +5,7 @@ DECA's Carbon Credits OrbitDB Code and configs, everything you need for setting
|
||||||
**IMPORTANT: Please verify that the database address matches the smart contract address**
|
**IMPORTANT: Please verify that the database address matches the smart contract address**
|
||||||
|
|
||||||
|
|
||||||
# OrbitDB4CC
|
# CarbonCreditsBacklog
|
||||||
|
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
@ -143,8 +143,8 @@ OrbitDB is a **serverless, distributed, peer-to-peer database**. OrbitDB uses [I
|
||||||
**Clone the repo**
|
**Clone the repo**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ git clone https://gitlab.com/deca-currency/decascarboncreditsbacklog.git
|
$ git clone https://gitlab.com/deca-currency/carboncreditsbacklog.git
|
||||||
$ cd orbitdb4cc
|
$ cd carboncreditsbacklog
|
||||||
```
|
```
|
||||||
|
|
||||||
**Install the dependencies:**
|
**Install the dependencies:**
|
||||||
|
@ -220,7 +220,7 @@ that holds this repository and that runs the orbitdb.
|
||||||
*Append the following line at the end of the editor and write it*
|
*Append the following line at the end of the editor and write it*
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
0,5,10,15,20,25,30,35,40,45,50,55 * * * * sleep 28 ; /home/nodemaster/orbitdb4cc/connectNodes.sh >> /tmp/NodeStatus.log 2>&1 &
|
0,5,10,15,20,25,30,35,40,45,50,55 * * * * sleep 28 ; /home/nodemaster/carboncreditsbacklog/connectNodes.sh >> /tmp/NodeStatus.log 2>&1 &
|
||||||
```
|
```
|
||||||
**NOTE: in this example the path is nodemaster user directory, you should change it with your username and the path to the script connectNodes.sh**
|
**NOTE: in this example the path is nodemaster user directory, you should change it with your username and the path to the script connectNodes.sh**
|
||||||
|
|
||||||
|
@ -256,8 +256,8 @@ connect QmZL1otpiCzWMEJTHXbQ5Hb4aFE7TKLjAuuBAAet1WAgtD success
|
||||||
Description=Public Node Updater
|
Description=Public Node Updater
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/home/nodemaster/orbitdb4cc/
|
WorkingDirectory=/home/nodemaster/carboncreditsbacklog/
|
||||||
ExecStart=/usr/local/bin/node /home/nodemaster/orbitdb4cc/index.js
|
ExecStart=/usr/local/bin/node /home/nodemaster/carboncreditsbacklog/index.js
|
||||||
User=nodemaster
|
User=nodemaster
|
||||||
Restart=always
|
Restart=always
|
||||||
LimitNOFILE=10240
|
LimitNOFILE=10240
|
||||||
|
@ -268,9 +268,9 @@ WantedBy=multi-user.target
|
||||||
```
|
```
|
||||||
**NOTE: in this example user that runs ipfs, node and orbitdb instance is nodemaster, also the node location is at /usr/local/bin/node**
|
**NOTE: in this example user that runs ipfs, node and orbitdb instance is nodemaster, also the node location is at /usr/local/bin/node**
|
||||||
|
|
||||||
**NOTE1: set WorkingDirectory where is the repository, for this example /home/nodemaster/orbitdb4cc/**
|
**NOTE1: set WorkingDirectory where is the repository, for this example /home/nodemaster/carboncreditsbacklog/**
|
||||||
|
|
||||||
**NOTE2: set where is index.js mostly in the repository as follow path to node path, for this example /home/nodemaster/orbitdb4cc/index.js**
|
**NOTE2: set where is index.js mostly in the repository as follow path to node path, for this example /home/nodemaster/carboncreditsbacklog/index.js**
|
||||||
|
|
||||||
> Enable the service
|
> Enable the service
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
node0=`host node0.deca.eco | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node0}/tcp/4001/ipfs/Qmd4Cv2fNwixP6cabEnTVFkF57GUGD6VBEcDhUkqHPG4X9"
|
node0=`host node0.deca.green | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node0}/tcp/4001/ipfs/Qmd4Cv2fNwixP6cabEnTVFkF57GUGD6VBEcDhUkqHPG4X9"
|
||||||
node2=`host node2.deca.eco | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node2}/tcp/4001/ipfs/QmfBASmqe3Az9AUjCxx3dtomSmbZEiJCsXusPxznjNnjU5"
|
node2=`host node2.deca.green | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node2}/tcp/4001/ipfs/QmfBASmqe3Az9AUjCxx3dtomSmbZEiJCsXusPxznjNnjU5"
|
||||||
node4=`host node4.deca.eco | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node4}/tcp/4001/ipfs/QmQBAsbA49q7QrKhetJpbo5gKxQQiL6sxVXCep5skmuHsq"
|
node4=`host node4.deca.green | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node4}/tcp/4001/ipfs/QmQBAsbA49q7QrKhetJpbo5gKxQQiL6sxVXCep5skmuHsq"
|
||||||
node5=`host node5.deca.eco | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node5}/tcp/4001/ipfs/QmZL1otpiCzWMEJTHXbQ5Hb4aFE7TKLjAuuBAAet1WAgtD"
|
node5=`host node5.deca.green | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'`;/usr/local/bin/ipfs swarm connect "/ip4/${node5}/tcp/4001/ipfs/QmZL1otpiCzWMEJTHXbQ5Hb4aFE7TKLjAuuBAAet1WAgtD"
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
Description=Public Node Updater
|
Description=Public Node Updater
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/home/nodemaster/orbitdb4cc/
|
WorkingDirectory=/home/nodemaster/carboncreditsbacklog/
|
||||||
ExecStart=/usr/local/bin/node /home/nodemaster/orbitdb4cc/index.js
|
ExecStart=/usr/local/bin/node /home/nodemaster/carboncreditsbacklog/index.js
|
||||||
User=nodemaster
|
User=nodemaster
|
||||||
Restart=always
|
Restart=always
|
||||||
LimitNOFILE=10240
|
LimitNOFILE=10240
|
||||||
|
|
Loading…
Reference in New Issue