-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
166 lines (153 loc) · 7.78 KB
/
docker-compose.yml
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
version: '3.0'
networks:
fabric-network:
services:
ca-tls:
container_name: ca-tls
image: hyperledger/fabric-ca:1.4.9
command: sh -c 'fabric-ca-server start -d -b tls-ca-admin:tls-ca-adminpw --port 7052'
environment:
- FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_CSR_CN=tls-ca
- FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
- FABRIC_CA_SERVER_DEBUG=true
volumes:
- ${BASE_DIR}/hyperledger/tls-ca:/tmp/hyperledger/fabric-ca
networks:
- fabric-network
ports:
- 7052:7052
rca:
container_name: rca-${ORG_NAME}
image: hyperledger/fabric-ca:1.4.9
command: bin/bash -c 'fabric-ca-server $INIT_OR_START -d -b rca-${ORG_NAME}-admin:rca-${ORG_NAME}-adminpw --port 7053'
environment:
- FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_CSR_CN=rca-${ORG_NAME}
- FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
- FABRIC_CA_SERVER_DEBUG=true
volumes:
- ${BASE_DIR}/hyperledger/${ORG_NAME}/ca:/tmp/hyperledger/fabric-ca
networks:
- fabric-network
ports:
- ${BINDABLE_PORT}:7053
peer:
container_name: peer${PEER_NUMBER}-${ORG_NAME}
image: hyperledger/fabric-peer:2.5.0
environment:
- CORE_PEER_ID=peer${PEER_NUMBER}-${ORG_NAME}
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
- CORE_PEER_ADDRESS=peer${PEER_NUMBER}-${ORG_NAME}:7051
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 #mudanca johann
- CORE_PEER_LOCALMSPID=${ORG_NAME_UPPER}
- CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/${ORG_NAME}/peer${PEER_NUMBER}/msp
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_fabric-network #mudanca johann
- FABRIC_LOGGING_SPEC=warn
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/tmp/hyperledger/${ORG_NAME}/peer${PEER_NUMBER}/tls-msp/signcerts/cert.pem
- CORE_PEER_TLS_KEY_FILE=/tmp/hyperledger/${ORG_NAME}/peer${PEER_NUMBER}/tls-msp/keystore/key.pem
- CORE_PEER_TLS_ROOTCERT_FILE=/tmp/hyperledger/${ORG_NAME}/peer${PEER_NUMBER}/tls-msp/tlscacerts/tls-0-0-0-0-7052.pem
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1-${ORG_NAME}:7051 #required to know OTHER PEERS in the same organization
- CORE_PEER_GOSSIP_ENDPOINT=peer${PEER_NUMBER}-${ORG_NAME}:7051 #required for SERVICE DISCOVERY
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer${PEER_NUMBER}-${ORG_NAME}:7051 #required for SERVICE DISCOVERY and outside orgnization gossip
- CORE_LEDGER_STATE_STATEDATABASE=goleveldb #CouchDB to allow calling GetQueryResult(query string) (StateQueryIteratorInterface, error) from interfaces.go
#- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=${COUCHDB_ADDRESS}:5984
#- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=myuser
#- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=mypassword
- CORE_CHAINCODE_MODE=net
- CORE_CHAINCODE_EXECUTETIMEOUT=3000000s
- CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9443
- CORE_METRICS_PROVIDER=prometheus #mudanca johann
- CORE_PEER_DISCOVERY_ENABLED=true
- CORE_PEER_DISCOVERY_ORGMEMBERSALLOWEDACCESS=true
- CORE_PEER_LIMITS_CONCURRENCY_ENDORSERSERVICE=10000 #mudanca johann
- CORE_PEER_LIMITS_CONCURRENCY_DELIVERSERVICE=10000 #mudanca johann
volumes:
- //var/run:/host/var/run
- ${BASE_DIR}/hyperledger/${ORG_NAME}/peer${PEER_NUMBER}:/tmp/hyperledger/${ORG_NAME}/peer${PEER_NUMBER}/
networks:
- fabric-network
ports:
- ${BINDABLE_PORT}:7051
- 1${BINDABLE_PORT}:9443 #metrics server
couch-db:
container_name: couchdb-peer${PEER_NUMBER}-${ORG_NAME}
image: couchdb:latest
environment:
- COUCHDB_USER=myuser
- COUCHDB_PASSWORD=mypassword
volumes:
- ${BASE_DIR}/hyperledger/${ORG_NAME}/peer${PEER_NUMBER}/data/couchdb:/opt/couchdb/data
- ${BASE_DIR}/hyperledger/${ORG_NAME}/peer${PEER_NUMBER}/data/couchdb_config:/opt/couchdb/etc/local.d
networks:
- fabric-network
ports:
- ${BINDABLE_PORT}:5984
orderer:
container_name: orderer${ORDERER_NUMBER}-${ORG_NAME}
image: hyperledger/fabric-orderer:2.5.0
environment:
- ORDERER_HOME=/tmp/hyperledger/orderer${ORDERER_NUMBER}
- ORDERER_HOST=orderer${ORDERER_NUMBER}-${ORG_NAME}
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
# - ORDERER_GENERAL_GENESISFILE=/tmp/hyperledger/ufsc/orderer1/genesis.block CAIU NA VERSAO 2.0.0
- ORDERER_GENERAL_BOOTSTRAPFILE=/tmp/hyperledger/${ORG_NAME}/orderer${ORDERER_NUMBER}/genesis.block
- ORDERER_GENERAL_LOCALMSPID=${ORG_NAME_UPPER}
- FABRIC_LOGGING_SPEC=info
- ORDERER_GENERAL_LOCALMSPDIR=/tmp/hyperledger/${ORG_NAME}/orderer${ORDERER_NUMBER}/msp
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_CERTIFICATE=/tmp/hyperledger/${ORG_NAME}/orderer${ORDERER_NUMBER}/tls-msp/signcerts/cert.pem
- ORDERER_GENERAL_TLS_PRIVATEKEY=/tmp/hyperledger/${ORG_NAME}/orderer${ORDERER_NUMBER}/tls-msp/keystore/key.pem
- ORDERER_GENERAL_TLS_ROOTCAS=[/tmp/hyperledger/${ORG_NAME}/orderer${ORDERER_NUMBER}/tls-msp/tlscacerts/tls-0-0-0-0-7052.pem]
- ORDERER_GENERAL_LOGLEVEL=info
- ORDERER_DEBUG_BROADCASTTRACEDIR=/data/logs
- ORDERER_OPERATIONS_LISTENADDRESS=0.0.0.0:8443
- ORDERER_METRICS_PROVIDER=prometheus
- ORDERER_ADMIN_LISTENADDRESS=0.0.0.0:9443 #to use ADMIN SERVER
- ORDERER_CHANNELPARTICIPATION_ENABLED=true #to use ADMIN SERVER
volumes:
- ${BASE_DIR}/hyperledger/${ORG_NAME}/orderer${ORDERER_NUMBER}:/tmp/hyperledger/${ORG_NAME}/orderer${ORDERER_NUMBER}/
networks:
- fabric-network
ports:
- ${BINDABLE_PORT}:7050
- 1${BINDABLE_PORT}:8443 #metrics server
- 2${BINDABLE_PORT}:9443 #admin server
cli:
container_name: cli
image: hyperledger/fabric-tools:2.5.0
tty: true
stdin_open: true
dns_search: .
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- FABRIC_LOGGING_SPEC=DEBUG
- GRPC_GO_LOG_SEVERITY_LEVEL=debug
- GRPC_GO_LOG_VERBOSITY_LEVEL=2
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/
command: sh
volumes:
- ${BASE_DIR}/hyperledger:/tmp/hyperledger
- ${BASE_DIR}/chaincode:/opt/gopath/src/github.com/hyperledger/chaincode
networks:
- fabric-network
cli-applications-ubuntu:
container_name: cli-applications-${APPLICATION_INSTANCE_ID}
image: energy-network-ubuntu
tty: true
working_dir: /EnergyNetwork/energy-applications
command: sh
stdin_open: true
environment:
- APPLICATION_INSTANCE_ID=${APPLICATION_INSTANCE_ID}
volumes:
- ${BASE_DIR}:/EnergyNetwork
networks:
- fabric-network