-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathdocker-compose-prod-peer0-vehicle.yaml
68 lines (64 loc) · 2.78 KB
/
docker-compose-prod-peer0-vehicle.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
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
volumes:
prod-peer0.vehicle.example.com:
services:
couchdb_peer0_vehicle:
container_name: couchdb_peer0_vehicle
image: hyperledger/fabric-couchdb
# Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
# for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode.
environment:
- COUCHDB_USER=
- COUCHDB_PASSWORD=
# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,
# for example map it to utilize Fauxton User Interface in dev environments.
network_mode: "host"
ports:
- "5984:5984"
peer0.vehicle.example.com:
container_name: peer0.vehicle.example.com
image: hyperledger/fabric-peer:latest
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host
- FABRIC_LOGGING_SPEC=INFO
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/tls-peer0.vehicle.example.com.pem
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/tls-peer0.vehicle.example.com.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/tlsca.vehicle.example.com.pem
- CORE_PEER_ID=peer0.vehicle.example.com
- CORE_PEER_ADDRESS=peer0.vehicle.example.com:7051
# - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.vehicle.example.com:7051
- CORE_PEER_LOCALMSPID=VehicleMSP
# Below for CouchDB
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=localhost:5984
# The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
# provide the credentials for ledger to connect to CouchDB. The username and password must
# match the username and password set for the associated CouchDB.
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
volumes:
- /var/run/:/host/var/run/
- /bin/ping:/bin/ping
- /usr/bin/telnet:/usr/bin/telnet
# The msp folder is requied
- ./mymsp/localmsp/peer0.vehicle.example.com/msp:/etc/hyperledger/fabric/msp
- ./mymsp/localmsp/peer0.vehicle.example.com/tls:/etc/hyperledger/fabric/tls
- prod-peer0.vehicle.example.com:/var/hyperledger/production
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: peer node start
network_mode: "host"
ports:
- 7051:7051
- 7053:7053
depends_on:
- couchdb_peer0_vehicle