-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-composetemplate-peer.yaml
145 lines (133 loc) · 4.66 KB
/
docker-composetemplate-peer.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#
# Author: a0b013g - Supply Chain Architcture @WalmartLabs
#
version: '2'
volumes:
peer0.ORG.DOMAIN:
peer1.ORG.DOMAIN:
services:
ca.ORG.DOMAIN:
container_name: ca.ORG.DOMAIN
image: hyperledger/fabric-ca:$IMAGE_TAG
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.ORG.DOMAIN-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_PRIVATE_KEY
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.ORG.DOMAIN-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_PRIVATE_KEY
# ports:
# - CA_PORT:7054
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
volumes:
- ../artifacts/crypto-config/peerOrganizations/ORG.DOMAIN/ca/:/etc/hyperledger/fabric-ca-server-config
- ../artifacts/fabric-ca-server-config-ORG.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml
peer0db.ORG.DOMAIN:
container_name: peer0db.ORG.DOMAIN
image: hyperledger/fabric-couchdb:0.4.14
environment:
- COUCHDB_USER=
- COUCHDB_PASSWORD=
peer1db.ORG.DOMAIN:
container_name: peer1db.ORG.DOMAIN
image: hyperledger/fabric-couchdb:0.4.14
environment:
- COUCHDB_USER=
- COUCHDB_PASSWORD=
peer0.ORG.DOMAIN:
container_name: peer0.ORG.DOMAIN
extends:
file: base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.ORG.DOMAIN
- CORE_PEER_LOCALMSPID=ORGMSP
- CORE_PEER_ADDRESS=peer0.ORG.DOMAIN:7051
- CORE_PEER_CHAINCODEADDRESS=peer0.ORG.DOMAIN:7052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.ORG.DOMAIN:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.ORG.DOMAIN:7051
# Added for CouchDB as State DB
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=peer0db.ORG.DOMAIN:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
ports:
- PEER0_PORT:7051
- PEER0_EVENT_PORT:7053
volumes:
- /var/run/:/host/var/run/
- ../artifacts/crypto-config/peerOrganizations/ORG.DOMAIN/peers/peer0.ORG.DOMAIN/:/etc/hyperledger/crypto/peer
- peer0.ORG.DOMAIN:/var/hyperledger/production
depends_on:
- peer0db.ORG.DOMAIN
PEER_EXTRA_HOSTS
peer1.ORG.DOMAIN:
container_name: peer1.ORG.DOMAIN
extends:
file: base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.ORG.DOMAIN
- CORE_PEER_LOCALMSPID=ORGMSP
- CORE_PEER_ADDRESS=peer1.ORG.DOMAIN:7051
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
- CORE_PEER_CHAINCODEADDRESS=peer1.ORG.DOMAIN:7052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.ORG.DOMAIN:7051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.ORG.DOMAIN:7051
# Added for CouchDB as State DB
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=peer1db.ORG.DOMAIN:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
ports:
- PEER1_PORT:7051
- PEER1_EVENT_PORT:7053
volumes:
- /var/run/:/host/var/run/
- ../artifacts/crypto-config/peerOrganizations/ORG.DOMAIN/peers/peer1.ORG.DOMAIN/:/etc/hyperledger/crypto/peer
- peer1.ORG.DOMAIN:/var/hyperledger/production
depends_on:
- peer1db.ORG.DOMAIN
PEER_EXTRA_HOSTS
# fabric-rest api server
api.ORG.DOMAIN:
extends:
file: base.yaml
service: api-base
container_name: api.ORG.DOMAIN
ports:
- API_PORT:4000
environment:
- ORG=ORG
- PORT=4000
depends_on:
- peer0.ORG.DOMAIN
- peer1.ORG.DOMAIN
API_EXTRA_HOSTS
cli.DOMAIN:
container_name: cli.DOMAIN
extends:
file: base.yaml
service: cli-base
volumes:
- ../artifacts/crypto-config/ordererOrganizations/DOMAIN/orderers/orderer.DOMAIN/tls:/etc/hyperledger/crypto/orderer/tls
cli.ORG.DOMAIN:
container_name: cli.ORG.DOMAIN
extends:
service: cli.DOMAIN
environment:
- CORE_PEER_LOCALMSPID=ORGMSP
- CORE_PEER_ADDRESS=peer0.ORG.DOMAIN:7051
volumes:
- ../artifacts/crypto-config/peerOrganizations/ORG.DOMAIN/users/[email protected]:/etc/hyperledger/crypto/peer
CLI_EXTRA_HOSTS
# simple http server to disseminate certificates
www.ORG.DOMAIN:
extends:
file: base.yaml
service: www-base
container_name: www.ORG.DOMAIN
ports:
- WWW_PORT:80