Permalink
Browse files

explorer and geth-client

  • Loading branch information...
jmunsch
jmunsch committed Sep 17, 2017
1 parent 4235cd6 commit 7ce6ddc3e8205851f7f1259a069de49150b42d3e
View
@@ -1,44 +1,47 @@
version: '2'
version: '3'
services:
lamden-api:
container_name: 'lamden-api'
image: 'lamden-api'
ports: ['9001:9001']
labels: ['com.lamden.role=api']
explorer-server:
container_name: 'explorer-server'
image: 'explorer-server'
ports: ['8001:8000']
geth-client:
container_name: 'geth-client'
image: 'ethereum/client-go'
ports: ['30303:30303', '8545:8545']
volumes: ['./geth_mount:/root/.ethereum']
explorer-server:
container_name: 'explorer-server'
image: 'explorer-server'
ports: ['8000:8001']
mongodb:
image: 'bitnami/mongodb:latest'
volumes:
- 'mongodb_data:/bitnami'
parse:
image: 'bitnami/parse:latest'
labels:
kompose.service.type: nodeport
ports:
- '1337:1337'
volumes:
- 'parse_data:/bitnami'
depends_on:
- mongodb
raiden:
container_name: 'raiden'
image: 'raiden'
ports: ['40001:8003']
remix:
container_name: 'remix'
image: 'remix'
ports: ['8080:8004']
volumes:
mongodb_data:
driver: local
parse_data:
driver: local
volumes: ['/Users/jmunsch/.lamden/newCoin:/root/.ethereum']
build:
context: https://github.com/ethereum/go-ethereum.git
dockerfile: ../Dockerfile.geth-client
# lamden-api:
# container_name: 'lamden-api'
# image: 'lamden-api'
# ports: ['9001:9001']
# labels: ['com.lamden.role=api']
# mongodb:
# image: 'bitnami/mongodb:latest'
# volumes:
# - 'mongodb_data:/bitnami'
# parse:
# image: 'bitnami/parse:latest'
# labels:
# kompose.service.type: nodeport
# ports:
# - '1337:1337'
# volumes:
# - 'parse_data:/bitnami'
# depends_on:
# - mongodb
# raiden:
# container_name: 'raiden'
# image: 'raiden'
# ports: ['40001:8003']
# remix:
# container_name: 'remix'
# image: 'remix'
# ports: ['8080:8004']
# volumes:
# mongodb_data:
# driver: local
# parse_data:
# driver: local
@@ -0,0 +1,16 @@
# Build Geth in a stock Go builder container
FROM golang:1.9-alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers git
ADD . /go-ethereum
RUN cd /go-ethereum && make geth
# Pull Geth into a second stage deploy alpine container
FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
EXPOSE 8545 8546 30303 30303/udp
ENTRYPOINT ["geth", "--rpc", "--rpcaddr", "0.0.0.0", "--rpcport", "8545", "--rpccorsdomain", "*", "--datadir", "/root/.ethereum", "--port", "30303", "--rpcapi", "db,eth,net,web3,personal", "--networkid", "1900", "--gasprice", "0", "--mine"]
@@ -1,14 +1,22 @@
FROM mhart/alpine-node
FROM alpine
MAINTAINER james.a.munsch@protonmail.com
RUN apk update && apk add git curl libtool libevent-dev make xz libstdc++ libffi-dev libressl-dev musl-dev gcc python-dev libxslt pcre libxml2-dev python py-pip ca-certificates py-setuptools \
RUN apk update && apk add nodejs git curl perl libtool libevent-dev make xz libstdc++ libffi-dev libressl-dev musl-dev gcc python-dev libxslt pcre libxml2-dev python py-pip ca-certificates py-setuptools curl \
&& git clone https://github.com/npm/npm.git \
&& cd npm \
&& /bin/bash ./configure \
&& make install \
&& cd .. \
&& git clone https://github.com/carsenk/explorer \
&& cd explorer \
&& echo '{ "allow_root": true }' > /root/.bowerrc \
&& npm install -g bower \
&& npm install \
&& bower install
&& echo '{ "allow_root": true }' > /root/.bowerrc
RUN /usr/bin/npm install -g bower
RUN /usr/bin/npm install
RUN cd /explorer && /explorer/app/node_modules/bower/bin/bower install
RUN rm -rf /usr/local/bin/geth
COPY explorer/package.json /explorer/package.json
COPY explorer/app/app.js /explorer/app/app.js
EXPOSE 8000
ENTRYPOINT ['npm', 'start']
WORKDIR "/explorer"
ENTRYPOINT ["/usr/bin/npm", "start"]
Submodule explorer added at 9acbd9
Submodule go-ethereum added at 9f7a9b
View
@@ -66,7 +66,8 @@ def __init__(self, name, sol_file_path):
assert name != None, 'A name identifier must be provided to create a new contract instance.'
_name, _address = database.contract_exists(name=name)
assert _name is None and _address is None
self.web3 = Web3(Web3.HTTPProvider("http://127.0.0.1:8000"))
node_info = json.loads(open(os.environ['NODE_INFO_JSON']).read())
self.web3 = Web3(Web3.HTTPProvider("http://127.0.0.1:{port}".format(port=node_info.get('rpcport'))))
self.name = name
self.is_deployed = None
with open(sol_file_path) as f:
View
@@ -39,7 +39,7 @@
NODE_INFO_TEMPLATE = {
'identity' : 'GenesisNode',
'rpc' : True,
'rpcport' : 8000,
'rpcport' : 8001,
'rpccorsdomain' : '*',
'port' : 30303,
'nodiscover' : True,
@@ -138,7 +138,7 @@ def run_generator(chain_name):
user_input = input('Master Node Identity (optional, default = MasterNode): ')
node_info['identity'] = user_input if user_input else node_info['identity']
user_input = input('RPC Port (optional, default = 8000): ')
user_input = input('RPC Port (optional, default = 8001): ')
node_info['rpcport'] = formatting(user_input) if formatting(user_input) > 0 else node_info['rpcport']
user_input = input('General Port (optional, default = 30303): ')

0 comments on commit 7ce6ddc

Please sign in to comment.