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
/
docker-compose-orderer.yaml
117 lines (107 loc) · 4.79 KB
/
docker-compose-orderer.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
#
# Copyright . All Rights Reserved.
#
version: '3.7'
volumes:
orderer:
services:
orderer:
container_name: orderer.${DOMAIN:-example.com}
image: hyperledger/fabric-orderer:${FABRIC_VERSION:-latest}
environment:
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.pb
- ORDERER_GENERAL_LOCALMSPID=orderer
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/crypto/orderer/msp
- ORDERER_GENERAL_TLS_ENABLED=${ORDERER_GENERAL_TLS_ENABLED:-true}
- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/crypto/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/crypto/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt]
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderers
command: orderer
volumes:
- ./crypto-config/configtx:/etc/hyperledger/configtx
- ./crypto-config/ordererOrganizations/${DOMAIN:-example.com}/orderers/orderer.${DOMAIN:-example.com}/:/etc/hyperledger/crypto/orderer
- orderer:/var/hyperledger/production/orderer
restart: always
cli.orderer:
container_name: cli.${DOMAIN:-example.com}
# build: ./fabric-tools-extended
image: olegabu/fabric-tools-extended
tty: true
environment:
- DOMAIN=${DOMAIN:-example.com}
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.pb
- ORDERER_GENERAL_LOCALMSPID=orderer
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/crypto/orderer/msp
- ORDERER_GENERAL_TLS_ENABLED=${ORDERER_GENERAL_TLS_ENABLED:-true}
- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/crypto/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/crypto/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt]
- CORE_PEER_LOCALMSPID=orderer
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/ordereradmin/msp
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/orderer/tls/ca.crt
working_dir: /etc/hyperledger
volumes:
- ./crypto-config:/etc/hyperledger/crypto-config
- ./templates:/etc/hyperledger/templates
- ./crypto-config/ordererOrganizations/${DOMAIN:-example.com}/orderers/orderer.${DOMAIN:-example.com}:/etc/hyperledger/crypto/orderer
- ./crypto-config/ordererOrganizations/${DOMAIN:-example.com}/users/Admin@${DOMAIN:-example.com}:/etc/hyperledger/crypto/ordereradmin
restart: always
# fabric-rest api server
api.orderer:
# build: ../fabric-starter-rest
image: olegabu/fabric-starter-rest
container_name: api.${DOMAIN:-example.com}
ports:
- ${ORDERER_API_PORT:-4500}:3000
environment:
- ORG=${ORG:-orderer}
- DOMAIN=${DOMAIN:-example.com}
- CRYPTO_CONFIG_DIR=/usr/src/app/crypto-config
- WEBAPP_DIR=/usr/src/app/webapp
- MSP_DIR=/usr/src/app/msp
- ORGS=${ORGS:-"orderer":"peer0.org1.example.com:7051"}
- CAS=${CAS:-"org1":"ca.org1.example.com:7054"}
- DISCOVER_AS_LOCALHOST=false
- ENROLL_ID
- ENROLL_SECRET
- P=${PWD}
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LOCALMSPID=orderer
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/crypto/orderer/msp
- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/crypto/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/crypto/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt]
- CORE_PEER_LOCALMSPID=orderer
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/ordereradmin/msp
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/orderer/tls/ca.crt
depends_on:
- orderer
volumes:
- ../fabric-starter-rest:/usr/src/app
- ./crypto-config:/usr/src/app/crypto-config
- ./webapp:/usr/src/app/webapp
- ./crypto-config/ordererOrganizations/${DOMAIN:-example.com}/msp:/usr/src/app/msp
- ./crypto-config/ordererOrganizations/${DOMAIN:-example.com}/orderers/orderer.${DOMAIN:-example.com}:/etc/hyperledger/crypto/orderer
- ./crypto-config/ordererOrganizations/${DOMAIN:-example.com}/users/Admin@${DOMAIN:-example.com}:/etc/hyperledger/crypto/ordereradmin
command: sh -c "sleep 3 && npm start"
privileged: true
# http serves certificates
www.orderer:
image: nginx
container_name: www.${DOMAIN:-example.com}
# ports:
# - ${WWW_PORT:-8080}:80
volumes:
- ./crypto-config/ordererOrganizations/${DOMAIN:-example.com}/msp:/usr/share/nginx/html/msp
restart: always
networks:
default:
external:
name: fabric-starter_default