-
Notifications
You must be signed in to change notification settings - Fork 149
/
docker-compose.yml
executable file
·94 lines (88 loc) · 2.56 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
# Blockchain
vp0:
extends:
file: compose-defaults.yml
service: vp
environment:
- CORE_PEER_ID=vp0
- CORE_PEER_DISCOVERY_PERIOD=1s
- CORE_SECURITY_ENROLLID=test_vp0
- CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
- CORE_PEER_PKI_ECA_PADDR=membersrvc:7054
- CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
ports:
- "7050:7050"
- "7051:7051"
# command: sh -c "while ! nc membersrvc 7054 </dev/null; do sleep 1; done; peer node start"
links:
- membersrvc
#vp1:
# extends:
# file: compose-defaults.yml
# service: vp
# environment:
# - CORE_PEER_ID=vp1
# - CORE_PEER_DISCOVERY_TOUCHPERIOD=1s
# - CORE_SECURITY_ENROLLID=test_vp1
# - CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
# - CORE_PEER_PKI_ECA_PADDR=membersrvc:7054
# - CORE_PEER_PKI_TCA_PADDR=membersrvc:7054
# - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054
# links:
# - vp0
# - membersrvc
membersrvc:
image: hyperledger/fabric-membersrvc:x86_64-0.6.1-preview
ports:
- "7054:7054"
environment:
- MEMBERSRVC_CA_ACA_ENABLED=true
command: membersrvc
# NodeJS app. Deploys if needed, watches src dir for transpiling and reloading.
server:
build: server
ports:
- "8080:8080"
environment:
- NODE_ENV=development
- MEMBERSRVC_ADDR=membersrvc:7054
- PEER_ADDR=vp0:7051
volumes:
- ./server/src:/usr/src/app/src
- ./server/resources:/usr/src/app/resources
- ./blockchain/src:/usr/src/blockchain/src
- ./server/tsconfig.json:/usr/src/app/tsconfig.json # TS filenames get added automatically to this file on build
- ./server/package.json:/usr/src/app/package.json
links:
- membersrvc
- vp0
command: bash -c "sleep 8; cat chaincodeId || (grunt build; npm run deploy;) && grunt"
# Web client
client:
build: client
ports:
- "4200:4200"
- "49153:49153"
volumes:
- ./client/src:/usr/src/app/src
- ./client/angular-cli.json:/usr/src/app/angular-cli.json
- ./client/tslint.json:/usr/src/app/tslint.json
command: bash -c 'ng lint && ng serve --host 0.0.0.0'
# Utils: we have go and cf here
utils:
image: cesarev/fabric-boilerplate
# user: $UID # TODO
environment:
- GOPATH=/usr/src/app
volumes:
- .:/usr/src/app
command: "true"
# Gobuild: used to provide quick feedback on build of chaincode
gobuild:
image: cesarev/fabric-boilerplate
environment:
- GOPATH=/usr/src/app
volumes:
- .:/usr/src/app
command: bash -c 'cd blockchain/src/build-chaincode && GOPATH=$$(pwd)/../.. go build chaincode.go && echo "Build successfully"'