This repository was archived by the owner on Nov 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
131 lines (120 loc) · 3.36 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
version: "3"
volumes:
consensource-shared-data:
services:
cli:
image: target/consensource-cli:latest
container_name: consensource-cli
volumes:
- consensource-shared-data:/shared_data
entrypoint: |
bash -c "
if [ ! -f $HOME/.sawtooth/keys/root.priv ]; then
sawtooth keygen
fi;
mkdir -p /shared_data/keys && \
csrc genesis -o /shared_data/consensource-genesis.batch -K /shared_data/keys \
-g /cli/example-genesis.yaml;
tail -f /dev/null
"
consensus-engine:
image: hyperledger/sawtooth-devmode-engine-rust:chime
container_name: consensource-consensus-engine
expose:
- 5050
ports:
- "5050:5050"
command: |
bash -c "
devmode-engine-rust -C tcp://validator:5050
"
validator:
image: hyperledger/sawtooth-validator:chime
container_name: consensource-validator
expose:
- 4004
- 8800
ports:
- "4004:4004"
- "8800:8800"
volumes:
- consensource-shared-data:/shared_data
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 -v \
--endpoint tcp://eth0:8800 \
--bind component:tcp://eth0:4004 \
--bind network:tcp://eth0:8800 \
--bind consensus:tcp://eth0:5050 \
"
sawtooth-rest-api:
image: hyperledger/sawtooth-rest-api:chime
container_name: sawtooth-rest-api
ports:
- "8008:8008"
depends_on:
- validator
entrypoint: sawtooth-rest-api -v -C tcp://validator:4004 --bind sawtooth-rest-api:8008
api:
image: target/consensource-api:latest
container_name: consensource-api
ports:
- "9009:9009"
- "9010:9010"
environment:
ROCKET_ADDRESS: "0.0.0.0"
ROCKET_PORT: "9009"
# OAUTH_VALIDATION_URL: ""
command: |
bash -c "
consensource-rest-api -v --dbhost postgres -C tcp://validator:4004
"
settings-tp:
image: hyperledger/sawtooth-settings-tp:chime
container_name: sawtooth-settings-tp
depends_on:
- validator
entrypoint: settings-tp -v -C tcp://validator:4004
processor:
image: target/consensource-processor:latest
container_name: consensource-processor
command: |
bash -c "
consensource-processor -v -C tcp://validator:4004
"
postgres:
image: postgres:alpine
container_name: consensource-db
volumes:
- ./database/tables:/docker-entrypoint-initdb.d
restart: always
environment:
POSTGRES_USER: consensourcedb
POSTGRES_PASSWORD: consensourcedb
POSTGRES_DB: consensourcedb
ports:
- "5432:5432"
expose:
- 5432
adminer:
image: adminer
container_name: consensource-adminer
restart: always
ports:
- "8081:8080"
sds:
image: target/consensource-sds:latest
container_name: consensource-sds
command: |
bash -c "
consensource-sds --dbhost postgres -v -C tcp://validator:4004
"