Skip to content

Commit

Permalink
Add first version of docker-compose and git sub-modules
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmachado committed Mar 23, 2020
1 parent 4cdbf96 commit ba39ff2
Show file tree
Hide file tree
Showing 11 changed files with 205 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "neo-node"]
path = neo-node
url = https://github.com/neo-project/neo-node.git
[submodule "neo-modules"]
path = neo-modules
url = https://github.com/neo-project/neo-modules.git
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# neo3-privatenet-docker

:fire::fire::fire::fire:

Are you ready? Are you really ready?

This is the **ULTIMATE** GitHub repository to run your Neo3 blockchain node and start developing! :green_heart:

:tada:

## How to run

TBD.

## Thanks

We have to thank [hal0x2328](https://github.com/hal0x2328) for publishing [hal0x2328/neo3-privatenet-tutorial](https://github.com/hal0x2328/neo3-privatenet-tutorial) and inspiring us to make things even simpler. :-)
28 changes: 28 additions & 0 deletions config/config.privatenet3-client.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"ApplicationConfiguration": {
"Storage": {
"Engine": "MemoryStore"
},
"Paths": {
"Chain": "Client_Chain_{0}",
},
"P2P": {
"Port": 50333,
"WsPort": 50334
},
"RPC": {
"BindAddress": "127.0.0.1",
"Port": 50332,
"SslCert": "",
"SslCertPassword": "",
"MaxGasInvoke": 10
},
"UnlockWallet": {
"Path": "wallet.json",
"Password": "one",
"StartConsensus": false,
"IsActive": false
},
"PluginURL": "https://github.com/neo-project/neo-plugins/releases/download/v{1}/{0}.zip"
}
}
28 changes: 28 additions & 0 deletions config/config.privatenet3-consensus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"ApplicationConfiguration": {
"Storage": {
"Engine": "MemoryStore"
},
"Paths": {
"Chain": "Consensus_Chain_{0}",
},
"P2P": {
"Port": 40333,
"WsPort": 40334
},
"RPC": {
"BindAddress": "127.0.0.1",
"Port": 40332,
"SslCert": "",
"SslCertPassword": "",
"MaxGasInvoke": 10
},
"UnlockWallet": {
"Path": "wallet.json",
"Password": "one",
"StartConsensus": true,
"IsActive": true
},
"PluginURL": "https://github.com/neo-project/neo-plugins/releases/download/v{1}/{0}.zip"
}
}
13 changes: 13 additions & 0 deletions config/protocol.privatenet3-client.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"ProtocolConfiguration": {
"Magic": 769,
"AddressVersion": 23,
"MillisecondsPerBlock": 15000,
"StandbyValidators": [
"03f1ec3c1e283e880de6e9c489f0f27c19007c53385aaa4c0c917c320079edadf2",
],
"SeedList": [
"neo-consensus:40333",
]
}
}
13 changes: 13 additions & 0 deletions config/protocol.privatenet3-consensus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"ProtocolConfiguration": {
"Magic": 769,
"AddressVersion": 23,
"MillisecondsPerBlock": 15000,
"StandbyValidators": [
"03f1ec3c1e283e880de6e9c489f0f27c19007c53385aaa4c0c917c320079edadf2",
],
"SeedList": [
"localhost:40333",
]
}
}
48 changes: 48 additions & 0 deletions config/wallet.privatenet3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": null,
"version": "3.0",
"scrypt": {
"n": 16384,
"r": 8,
"p": 8
},
"accounts": [
{
"address": "AK5AmzrrM3sw3kbCHXpHNeuK3kkjnneUrb",
"label": null,
"isDefault": false,
"lock": false,
"key": "6PYLVq2QgQqEdzP6cZRLSQyTbDzw1BqF2qCsE9duWEWj7bgmmPVAG9QQBn",
"contract": {
"script": "DCED8ew8Hig+iA3m6cSJ8PJ8GQB8UzhaqkwMkXwyAHntrfILQQqQatQ=",
"parameters": [
{
"name": "signature",
"type": "Signature"
}
],
"deployed": false
},
"extra": null
},
{
"address": "AHE5cLhX5NjGB5R2PcdUvGudUoGUBDeHX4",
"label": null,
"isDefault": false,
"lock": false,
"key": "6PYLVq2QgQqEdzP6cZRLSQyTbDzw1BqF2qCsE9duWEWj7bgmmPVAG9QQBn",
"contract": {
"script": "EQwhA/HsPB4oPogN5unEifDyfBkAfFM4WqpMDJF8MgB57a3yEQtBMHOzuw==",
"parameters": [
{
"name": "parameter0",
"type": "Signature"
}
],
"deployed": false
},
"extra": null
}
],
"extra": null
}
40 changes: 40 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: '3.6'

services:

build-neo-cli:
build: ./neo-node
image: neo-project/neo-node/neo-cli:latest

neo-consensus:
build:
context: ./neo-modules
dockerfile: ../docker/Dockerfile
target: NeoCliFinal
image: docker.pkg.github.com/axlabs/neo3-privatenet-docker/neo-cli-with-plugins:latest
hostname: neo-consensus
depends_on:
- build-neo-cli
volumes:
- ./config/config.privatenet3-consensus.json:/neo-cli/config.json:ro
- ./config/protocol.privatenet3-consensus.json:/neo-cli/protocol.json:ro
- ./config/wallet.privatenet3.json:/neo-cli/wallet.json:ro
ports:
- "40332:40332"

neo-client:
build:
context: ./neo-modules
dockerfile: ../docker/Dockerfile
target: NeoCliFinal
image: docker.pkg.github.com/axlabs/neo3-privatenet-docker/neo-cli-with-plugins:latest
hostname: neo-client
depends_on:
- build-neo-cli
- neo-consensus
volumes:
- ./config/config.privatenet3-client.json:/neo-cli/config.json:ro
- ./config/protocol.privatenet3-client.json:/neo-cli/protocol.json:ro
- ./config/wallet.privatenet3.json:/neo-cli/wallet.json:ro
ports:
- "50332:50332"
10 changes: 10 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS PluginBuild

COPY ./ /neo-modules

WORKDIR /neo-modules
RUN dotnet restore && dotnet publish -c Release -o /plugins

FROM neo-project/neo-node/neo-cli:latest AS NeoCliFinal

COPY --from=PluginBuild /plugins ./Plugins
1 change: 1 addition & 0 deletions neo-modules
Submodule neo-modules added at bbcfa5
1 change: 1 addition & 0 deletions neo-node
Submodule neo-node added at e81556

0 comments on commit ba39ff2

Please sign in to comment.