-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
177 lines (167 loc) · 4.47 KB
/
docker-compose.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
version: '2.1'
services:
# simple-supply-shell:
# build:
# context: .
# dockerfile: ./shell/Dockerfile
# image: sawtooth-simple-supply-shell
# container_name: simple-supply-shell
# volumes:
# - .:/project/sawtooth-simple-supply
# - /project/sawtooth-simple-supply/curator_app/node_modules
# command: |
# bash -c "
# simple-supply-protogen
# cd curator_app/
# npm run build
# cd ../
# tail -f /dev/null
# "
#
# simple-supply-tp:
# build:
# context: .
# dockerfile: ./processor/Dockerfile
# image: sawtooth-simple-supply-tp
# container_name: simple-supply-tp
# volumes:
# - '.:/project/sawtooth-simple-supply'
# depends_on:
# - simple-supply-shell
# command: |
# bash -c "
# sleep 1
# simple-supply-tp -v -C tcp://validator:4004
# "
#
# simple-supply-rest-api:
# build:
# context: .
# dockerfile: ./rest_api/Dockerfile
# image: sawtooth-simple-supply-rest-api
# container_name: simple-supply-rest-api
# volumes:
# - .:/project/sawtooth-simple-supply
# ports:
# - '8000:8000'
# depends_on:
# - simple-supply-shell
# command: |
# bash -c "
# simple-supply-rest-api \
# -B simple-supply-rest-api:8000 \
# -C validator:4004 \
# --db-host postgres \
# -vv
# "
#
# simple-supply-subscriber:
# build:
# context: .
# dockerfile: ./subscriber/Dockerfile
# image: sawtooth-simple-supply-subscriber
# container_name: simple-supply-subscriber
# volumes:
# - '.:/project/sawtooth-simple-supply'
# depends_on:
# - simple-supply-shell
# - postgres
# command: |
# bash -c "
# simple-supply-subscriber init \
# --db-host postgres \
# -vv
# sleep 3
# simple-supply-subscriber subscribe \
# --db-host postgres \
# -C tcp://validator:4004 \
# -vv
# "
#
settings-tp:
image: hyperledger/sawtooth-settings-tp:1.2
container_name: sawtooth-settings-tp
depends_on:
- validator
entrypoint: settings-tp -vv -C tcp://validator:4004
rest-api:
image: hyperledger/sawtooth-rest-api:1.2
container_name: sawtooth-rest-api
expose:
- 8008
ports:
- '8008:8008'
depends_on:
- validator
entrypoint: sawtooth-rest-api -vv -C tcp://validator:4004 --bind rest-api:8008
validator:
image: hyperledger/sawtooth-validator:1.2
container_name: sawtooth-validator
expose:
- 4004
ports:
- '4004:4004'
command: |
bash -c "
if [ ! -f /etc/sawtooth/keys/validator.priv ]; then
sawadm keygen
sawtooth keygen my_key
sawset genesis -k /root/.sawtooth/keys/my_key.priv
sawset proposal create -k /root/.sawtooth/keys/my_key.priv \
sawtooth.consensus.algorithm.name=Devmode \
sawtooth.consensus.algorithm.version=0.1 \
-o config.batch
sawadm genesis config-genesis.batch config.batch
fi;
sawtooth-validator -vv \
--endpoint tcp://validator:8800 \
--bind component:tcp://eth0:4004 \
--bind network:tcp://eth0:8800 \
--bind consensus:tcp://eth0:5050
"
devmode-engine:
image: hyperledger/sawtooth-devmode-engine-rust:1.2
expose:
- 5050
ports:
- '5050:5050'
container_name: sawtooth-devmode-engine-rust-default
depends_on:
- validator
entrypoint: devmode-engine-rust --connect tcp://validator:5050
postgres:
image: postgres:alpine
container_name: simple-supply-postgres
restart: always
environment:
POSTGRES_USER: sawtooth
POSTGRES_PASSWORD: sawtooth
ports:
- '5432:5432'
volumes_from:
- postgres-data
postgres-data:
image: busybox
volumes:
- /var/lib/postgresql/simple-supply-data
container_name: simple-supply-postgres-datastore
# adminer:
# image: adminer
# container_name: simple-supply-adminer
# restart: always
# ports:
# - '8080:8080'
#
# curator-app:
# build: ./curator_app
# image: simple-supply-curator-app
# container_name: curator-app
# volumes:
# - ./curator_app/public/:/usr/local/apache2/htdocs/
# expose:
# - 80
# ports:
# - '8040:80'
# depends_on:
# - simple-supply-shell
# - simple-supply-rest-api