Skip to content

Commit

Permalink
feat: make the image modulable with docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-napoleone committed Jun 10, 2019
1 parent 223c916 commit 09e2d33
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 54 deletions.
6 changes: 6 additions & 0 deletions AWS/private_network/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Private network image

This image contain all the necessary tools to run:
- a masternode
- a bootnode
- a stats page
24 changes: 24 additions & 0 deletions AWS/private_network/masternode.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Tags for the tomochain/node image
# You'd normally only need stable
TAG=stable
# The name of this masternode
IDENTITY=
# The private key of the masternode account
PRIVATE_KEY=
# The bootnodes this node will connect to
# Should be a comma separated list of value with no whitespaces
BOOTNODES=
# Your chain network id
# Should match the one in your genesis
NETWORK_ID=
# Log level
# 1 = FATAL, 2 = ERROR, 3 = INFO, 4 = DEBUG, 5 and upper = TRACE
VERBOSITY=3
# Address of the stats page
STATS_HOST=localhost
# Port of the stats page
STATS_PORT=443
# Secret of the stats page
WS_SECRET=
# Path or existing docker volume name where to store the chain data
DATA_LOCATION=
27 changes: 27 additions & 0 deletions AWS/private_network/masternode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: "3.4"
services:

masternode:
env_file:
-masternode.env
image: tomochain/node:$TAG
environment:
IDENTITY: $IDENTITY
PRIVATE_KEY: $PRIVATE_KEY
BOOTNODES: $BOOTNODES
NETWORK_ID: $NETWORK_ID
VERBOSITY: $VERBOSITY
NETSTATS_HOST: $STATS_HOST
NETSTATS_PORT: $STATS_PORT
WS_SECRET: $WS_SECRET
volumes:
- $DATA_LOCATION:/tomochain/data
networks:
- masternode
ports:
- 30303:30303/tcp
- 30303:30303/udp
restart: always

networks:
masternode:
19 changes: 17 additions & 2 deletions AWS/private_network/private-18-04.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,24 @@
"sudo chmod +x /usr/local/bin/docker-compose",
"git clone https://github.com/tomochain/tomochain",
"cd tomochain",
"make",
"sudo mv build/bin/tomo /usr/local/bin/"
"make puppeth",
"sudo mv build/bin/puppeth /usr/local/bin/"
]
},
{
"type": "file",
"source": "README.md",
"destination": "README.md"
}
{
"type": "file",
"source": "masternode.yml",
"destination": "masternode.yml"
}
{
"type": "file",
"source": "masternode.env",
"destination": "masternode.env"
}
],
"builders": [{
Expand Down
52 changes: 0 additions & 52 deletions AWS/private_network/quickstart.sh

This file was deleted.

0 comments on commit 09e2d33

Please sign in to comment.