forked from olegabu/fabric-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-orderer.yaml
148 lines (136 loc) · 6.29 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
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
#
# Copyright . All Rights Reserved.
#
version: '3.7'
volumes:
orderer:
services:
pre-install:
container_name: pre-install.${DOMAIN:-example.com}
image: ${DOCKER_REGISTRY:-docker.io}/olegabu/fabric-tools-extended:${FABRIC_STARTER_VERSION:-latest}
environment:
- ORDERER=true
- DOMAIN=${DOMAIN:-example.com}
working_dir: /etc/hyperledger
command: container-scripts/container-orderer.sh
volumes:
- /var/run/:/host/var/run/
- ./crypto-config:/etc/hyperledger/crypto-config
post-install:
container_name: post-install.${DOMAIN:-example.com}
image: ${DOCKER_REGISTRY:-docker.io}/olegabu/fabric-tools-extended:${FABRIC_STARTER_VERSION:-latest}
environment:
- ORDERER=true
- CONSORTIUM_CONFIG
- CORE_PEER_LOCALMSPID=orderer
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto-config/ordererOrganizations/${DOMAIN:-example.com}/users/Admin@${DOMAIN:-example.com}/msp
working_dir: /etc/hyperledger
# command: container-scripts/consortium-reconfigure.sh
depends_on:
- orderer
orderer:
container_name: orderer.${DOMAIN:-example.com}
restart: always
image: ${DOCKER_REGISTRY:-docker.io}/hyperledger/fabric-orderer:${FABRIC_VERSION:-latest}
environment:
- FABRIC_LOGGING_SPEC=orderer=DEBUG:endorser=DEBUG:nodeCmd=DEBUG:committer=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=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]
- ORDERER_OPERATIONS_LISTENADDRESS=0.0.0.0:9090
- ORDERER_OPERATIONS_TLS_ENABLED=false
- ORDERER_METRICS_PROVIDER=prometheus
working_dir: /etc/hyperledger
command: orderer
depends_on:
- pre-install
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
cli.orderer:
container_name: cli.${DOMAIN:-example.com}
image: ${DOCKER_REGISTRY:-docker.io}/olegabu/fabric-tools-extended:${FABRIC_STARTER_VERSION:-latest}
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=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
depends_on:
- pre-install
- post-install
volumes:
- ./crypto-config:/etc/hyperledger/crypto-config
# - ./templates:/etc/hyperledger/templates
# - ./container-scripts/:/etc/hyperledger/container-scripts
- ./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
# 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: ${DOCKER_REGISTRY:-docker.io}/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
- ./crypto-config/ordererOrganizations/${DOMAIN:-example.com}/msp/well-known:/usr/share/nginx/html/.well-known
depends_on:
- post-install