Fix voulume mapping
Mapping the whole folder instead of single files.
@@ -43,7 +43,8 @@ def create_node():
port_map = ast.literal_eval(request.form.get("port_map"))
volumes = [
'/var/run/:/host/var/run/',
- '/opt/fabric/{}/msp:/etc/hyperledger/fabric/msp'.format(node_name),
+ '/opt/fabric/{}:/etc/hyperledger/fabric'.format(node_name),
+ '/opt/production/{}:/var/hyperledger/production'.format(node_name)
]
if request.form.get('type') == "peer":
peer_envs = {
@@ -65,11 +66,6 @@ def create_node():
'CORE_OPERATIONS_LISTENADDRESS': '0.0.0.0:17051'
}
env.update(peer_envs)
- volumes.extend([
- #'/opt/fabric/{}/core.yaml:/etc/hyperledger/fabric/core.yaml'.format(node_name),
- '/opt/fabric/{}/chaincodes:/var/hyperledger/fabric/production/chaincodes'.format(node_name),
- '/opt/fabric/{}/ledgersData:/var/hyperledger/fabric/production/ledgersData'.format(node_name)
- ])
else:
order_envs = {
'FABRIC_LOGGING_SPEC':'DEBUG',
@@ -87,11 +83,6 @@ def create_node():
'ORDERER_GENERAL_CLUSTER_ROOTCAS': '[/etc/hyperledger/fabric/tls/ca.crt]',
}
env.update(order_envs)
- volumes.extend([
- #'/opt/fabric/{}/orderer.yaml:/etc/hyperledger/fabric/orderer.yaml'.format(node_name),
- '/opt/fabric/{}/orderer:/var/hyperledger/fabric/production/orderer'.format(node_name)
- ])
-
try:
# same as `docker run -dit yeasy/hyperledge-fabric:2.2.0 -e VARIABLES``
container = client.containers.run(
