This repository has been archived by the owner on Feb 17, 2020. It is now read-only.
forked from olegabu/fabric-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
multihost.yaml
79 lines (68 loc) · 3.06 KB
/
multihost.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#
# Copyright . All Rights Reserved.
#
# export COMPOSE_FLAGS="-fmultihost.yaml"
#
# fow AWS machine
# export WORK_DIR=/home/ubuntu
# ./generate-peer.sh
version: '3.7'
services:
ca:
volumes:
- ${WORK_DIR-/home/docker}/crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/ca/:/etc/hyperledger/fabric-ca-server-config
- ${WORK_DIR-/home/docker}/crypto-config/fabric-ca-server-config-${ORG:-org1}.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml
peer0:
environment:
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fabric-overlay
volumes:
- ${WORK_DIR-/home/docker}/crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/peers/peer0.${ORG:-org1}.${DOMAIN:-example.com}/:/etc/hyperledger/crypto/peer
# extra_hosts:
# - "orderer.example.com:192.168.99.100"
peer1:
environment:
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fabric-overlay
volumes:
- ${WORK_DIR-/home/docker}/crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/peers/peer1.${ORG:-org1}.${DOMAIN:-example.com}/:/etc/hyperledger/crypto/peer
# extra_hosts:
# - "orderer.example.com:192.168.99.100"
cli.peer:
volumes:
- ${WORK_DIR-/home/docker}/chaincode:/opt/chaincode
- ${WORK_DIR-/home/docker}/chaincode/go:/opt/gopath/src
- ${WORK_DIR-/home/docker}/crypto-config:/etc/hyperledger/crypto-config
- ${WORK_DIR-/home/docker}/templates:/etc/hyperledger/templates
- ${WORK_DIR-/home/docker}/crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/users/Admin@${ORG:-org1}.${DOMAIN:-example.com}:/etc/hyperledger/crypto/peeradmin
- ${WORK_DIR-/home/docker}/crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/peers/peer0.${ORG:-org1}.${DOMAIN:-example.com}:/etc/hyperledger/crypto/peer
- ${WORK_DIR-/home/docker}/crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/peers/peer1.${ORG:-org1}.${DOMAIN:-example.com}:/etc/hyperledger/crypto/peer1
- ${WORK_DIR-/home/docker}/crypto-config/ordererOrganizations/${DOMAIN:-example.com}/msp:/etc/hyperledger/crypto/orderer
# extra_hosts:
# - "orderer.example.com:192.168.99.100"
# - "www.example.com:192.168.99.100"
# fabric-rest api server
api:
# environment:
# - P=${WORK_DIR-/home/docker}
volumes:
- ${WORK_DIR-/home/docker}/crypto-config:/usr/src/app/crypto-config
- ${WORK_DIR-/home/docker}/webapp:/usr/src/app/webapp
# extra_hosts:
# - "orderer.example.com:192.168.99.100"
# simple http server to disseminate certificates
www.peer:
volumes:
- ${WORK_DIR-/home/docker}/crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/msp:/usr/share/nginx/html/msp
- ${WORK_DIR-/home/docker}/crypto-config/configtx:/usr/share/nginx/html/configtx
# need to run before to force join overlay network
# docker run -dit --name alpine2 --network fabric-overlay alpine
networks:
default:
external:
name: fabric-overlay
#networks:
# default:
# name: fabric-overlay
#networks:
# default:
# name: fabric-overlay
# driver: overlay