-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yaml
82 lines (74 loc) · 2.4 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
version: '2.0'
services:
#container for the client application at port 3000
helloworld-client:
container_name: helloworld-client
expose:
- 3000
ports:
- 3000:3000
build:
context: .
dockerfile: helloworldClient/DockerFile
volumes:
- '.:/project/sawtooth-helloworld'
#container for the transaction processor
helloworld-processor:
container_name: helloworld-processor
build:
context: .
dockerfile: helloworldprocessor/DockerFile
depends_on:
- validator
volumes:
- '.:/project/sawtooth-helloworld'
#container for Sawtooth REST API, used for the communication between the client and validator
sawtooth-rest-api:
image: hyperledger/sawtooth-rest-api:chime
container_name: rest-api
expose:
- 8008
ports:
- "8008:8008"
depends_on:
- validator
entrypoint: sawtooth-rest-api -vv -C tcp://validator:4004 --bind rest-api:8008
#container for 'settings-tp', a required transaction processor for all Sawtooth applications, which handles the on-chain configurations
settings-tp:
image: hyperledger/sawtooth-settings-tp:chime
depends_on:
- validator
entrypoint: settings-tp -vv -C tcp://validator:4004
#container for a validator in a Sawtooth network.
validator:
image: hyperledger/sawtooth-validator:chime
container_name: validator
expose:
- 4004
ports:
- "4004:4004"
entrypoint: "bash -c \"\
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 && \
sawtooth-validator -vv \
--endpoint tcp://validator:8800 \
--bind component:tcp://eth0:4004 \
--bind network:tcp://eth0:8800 \
--bind consensus:tcp://eth0:5050 \
\""
#default consensus engine for development purposes
devmode-engine:
image: hyperledger/sawtooth-devmode-engine-rust:chime
container_name: sawtooth-devmode-engine-rust-default
ports:
- '5050:5050'
depends_on:
- validator
entrypoint: devmode-engine-rust -C tcp://validator:5050