-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·147 lines (136 loc) · 4.88 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
version: '2'
services:
ca.org1.example.com:
extends:
file: composer/hlfv11/composer/docker-compose.yml
service: ca.org1.example.com
container_name: ca.org1.example.com
orderer.example.com:
extends:
file: composer/hlfv11/composer/docker-compose.yml
service: orderer.example.com
container_name: orderer.example.com
peer0.org1.example.com:
container_name: peer0.org1.example.com
extends:
file: composer/hlfv11/composer/docker-compose.yml
service: peer0.org1.example.com
depends_on:
- orderer.example.com
environment:
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=composer_default
depends_on:
- couchdb
util:
image: docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- peer0.org1.example.com
command: >
sh -c " \
set -e; \
sleep 10; \
docker exec -e \"CORE_PEER_LOCALMSPID=Org1MSP\" -e \"CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp\" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c composerchannel -f /etc/hyperledger/configtx/composer-channel.tx; \
docker exec -e \"CORE_PEER_LOCALMSPID=Org1MSP\" -e \"CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp\" peer0.org1.example.com peer channel join -b composerchannel.block && \
echo 'Created channels! Exiting.'
"
couchdb:
extends:
file: composer/hlfv11/composer/docker-compose.yml
service: couchdb
server:
build:
context: server
container_name: loopback-server
ports:
- "8080:8080"
environment:
- NODE_ENV=local
- HOST=0.0.0.0
- PORT=8080
- COUCHDB_HOST=private-db
- COUCHDB_PORT=5984
- COUCHDB_DATABASE=loopback-db
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=password
volumes:
- ./server/common:/usr/src/app/common
- ./server/domain:/usr/src/app/domain
- ./server/resources:/usr/src/app/resources
- ./server/server:/usr/src/app/server
- ./server/test:/usr/src/app/test
- ./server/dist:/usr/src/app/dist
- ./server/resources/connectionProfiles:/root/.composer-connection-profiles
- ./client/src/app/shared/client-sdk/:/usr/src/client-sdk
- ./composer/bna/models/:/root/.composer-models
- ./composer/resources/cards/:/root/.composer/cards
depends_on:
- composer-cli
- private-db
command: sh -c "while [ ! -f /root/.composer/cards/networkadmin@hlfv1.card ]; do echo Waiting for Admin Card; sleep 5; done; sleep 10; npm start"
client:
build: client
container_name: 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: sh -c "node_modules/.bin/ng lint && node_modules/.bin/ng serve --host 0.0.0.0"
private-db:
container_name: private-db
image: couchdb:2.1.1
ports:
- "5985:5984"
# volumes:
# - /tmp/private-db/data:/opt/couchdb/data
# environment:
# - COUCHDB_USER=admin
# - COUCHDB_PASSWORD=password
composer-cli:
image: hyperledger/composer-cli:0.19.14
container_name: composer-cli
env_file: ./composer/.env
volumes:
- ./composer/resources/.composer:/home/composer/.composer
- ./composer/bna:/home/composer/bna
- ./composer/resources:/home/composer/resources
- ./composer/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com:/home/composer/.admin-crypto
- ./composer/resources/connectionProfiles/defaultProfile:/home/composer/.composer-connection-profiles
- ./composer/resources/:/home/server/resources/
depends_on:
- peer0.org1.example.com
- ca.org1.example.com
- orderer.example.com
- couchdb
- util
entrypoint: /bin/sh
command: -c "/home/composer/resources/deploy.sh"
composer-rest-server:
image: hyperledger/composer-rest-server:0.19.14
container_name: composer-rest-server
ports:
- "3000:3000"
env_file: ./composer/.env
volumes:
- ./composer/resources/.composer:/home/composer/.composer
- ./composer/resources:/home/composer/resources
depends_on:
- composer-cli
command: sh -c "while [ ! -f /home/composer/resources/cards/networkadmin@hlfv1.card ]; do echo Waiting for Admin Card; sleep 5; done; sleep 10; composer-rest-server"
composer-playground:
image: hyperledger/composer-playground:0.19.14
container_name: composer-playground
ports:
- "8090:8080"
depends_on:
- composer-cli
volumes:
- ./composer/resources/.composer:/home/composer/.composer
networks:
default:
external:
name: composer_default