Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

major update after tests #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions lite-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

> Running docker on your machine will get you up and running quickly but should not be considered production level.
> This requires a lot more orchestration that is not in scope of this document.
> This doc is still under development!

There are docker images available at:
* `ghcr.io/aiblockofficial/network/node-user:latest`
Expand All @@ -18,9 +19,9 @@ AIBlock nodes use a `node_settings.toml` file for configuration.
This is located in `/etc/node_settings.toml` and has to be mounted as the container starts.

The sample settings file for a lite node can be found here:
* [user](node_settings_user.toml)
* [user](node_settings.toml)

They are currently referencing `testnet`
They are currently referencing `testnet`.

### Running docker directly

Expand All @@ -29,14 +30,12 @@ docker run -d -p --name aiblock-user 3000:3000 \
-v /tmp/user:/src \
-v ./node_settings_user.toml:/etc/node_settings_user.toml \
-e ADDRESS="127.0.0.1:12340" \
-e WITH_USER_ADDRESS="127.0.0.1:12350" \
ghcr.io/aiblockofficial/network/node-miner:latest user
ghcr.io/aiblockofficial/node-user:latest user
```

* `-p 3000:3000` sets ports used for the miner's REST API.
* `-p 3000:3000` sets ports used for the lite node's REST API.
* `-v /tmp/wallet:/src` mounts your local filesystem so the miner's wallet may be persisted.
* `-e ADDRESS` sets the ip:port of the node. If more than one node will be running from the same IP address, the port number has to be different for each node.
* `-e WITH_USER_ADDRESS` also starts a user node with a wallet to hold the tokens.

You might also need to run with `--user` on some Linux systems for mounting permission purposes.

Expand Down
4 changes: 2 additions & 2 deletions lite-node/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:
- '12350:12350'
- '3001:3001'
volumes:
- /tmp/wallet:/src
- ./node_settings_user.toml:/etc/node_settings.toml
- /tmp/user-0:/src
- ./node_settings.toml:/etc/node_settings.toml
command: user
environment:
- RUST_LOG = info,debug
Expand Down
File renamed without changes.
24 changes: 6 additions & 18 deletions miner-node/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,14 @@ services:
image: ghcr.io/aiblockofficial/node-miner:latest
ports:
- '12340:12340'
- '12350:12350'
- '3000:3000'
volumes:
- /tmp/wallet:/src
- ./node_settings_miner.toml:/etc/node_settings.toml
- /tmp/miner-0:/src
- ./node_settings.toml:/etc/node_settings.toml
command: miner
environment:
- WITH_USER_ADDRESS = "127.0.0.1:12350"
- RUST_LOG = info,debug
### uncomment for Linux
user: "${UID}:${GID}"
user-0:
image: ghcr.io/aiblockofficial/node-user:latest
ports:
- '12350:12350'
- '3001:3001'
volumes:
- /tmp/wallet:/src
- ./node_settings_user.toml:/etc/node_settings.toml
command: user
environment:
- RUST_LOG = info,debug
- WITH_USER_INDEX=0
- RUST_LOG=info,debug
### uncomment for Linux
user: "${UID}:${GID}"
#user: "${UID}:${GID}"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ address = "34.65.95.17:8116"
# address = "34.65.95.17:8333"

[[miner_nodes]]
address = "127.0.0.1:12360"
address = "127.0.0.1:12340"

[[user_nodes]]
address = "127.0.0.1:12350"
11 changes: 0 additions & 11 deletions miner-node/node_settings_user.toml

This file was deleted.

32 changes: 32 additions & 0 deletions miner-nodes/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '3'
services:
miner-0:
image: ghcr.io/aiblockofficial/node-miner:latest
ports:
# - '12340:12340'
# - '12350:12350'
- '3000:3000'
volumes:
- /tmp/miner-0:/src
- ./node_settings_miner_0.toml:/etc/node_settings.toml
command: miner
environment:
- WITH_USER_INDEX=0
- RUST_LOG=info,debug
### uncomment for Linux
#user: "${UID}:${GID}"
miner-1:
image: ghcr.io/aiblockofficial/node-miner:latest
ports:
# - '12341:12341'
# - '12351:12351'
- '3001:3001'
volumes:
- /tmp/miner-1:/src
- ./node_settings_miner_1.toml:/etc/node_settings.toml
command: miner
environment:
- WITH_USER_INDEX=0
- RUST_LOG=info,debug
### uncomment for Linux
#user: "${UID}:${GID}"
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ miner_db_mode = { Live = 0 }
miner_api_port = 3000

user_db_mode = { Live = 0 }
user_api_port = 3001
user_api_port = 3000

[[mempool_nodes]]
# testnet
address = "34.65.95.17:9116"
address = "34.65.95.17:8116"
# mainnet
# address = "34.65.95.17:9333"
# address = "34.65.95.17:8333"

[[miner_nodes]]
address = "172.28.0.4:12340"
address = "127.0.0.1:12342"

[[user_nodes]]
address = "172.28.0.5:12350"
address = "127.0.0.1:12352"
17 changes: 17 additions & 0 deletions miner-nodes/node_settings_miner_1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
miner_db_mode = { Live = 0 }
miner_api_port = 3001

user_db_mode = { Live = 0 }
user_api_port = 3001

[[mempool_nodes]]
# testnet
address = "34.65.95.17:8116"
# mainnet
# address = "34.65.95.17:8333"

[[miner_nodes]]
address = "127.0.0.1:12341"

[[user_nodes]]
address = "127.0.0.1:12351"
6 changes: 0 additions & 6 deletions miner-with-lite-node/README.md

This file was deleted.

39 changes: 0 additions & 39 deletions miner-with-lite-node/docker-compose.yml

This file was deleted.

Loading