forked from covalenthq/bsp-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-ci.yml
138 lines (131 loc) · 3.64 KB
/
docker-compose-ci.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
version: '3'
services:
ipfs-pinner:
image: "us-docker.pkg.dev/covalent-project/network/ipfs-pinner:stable"
volumes:
- ~/.ipfs:/root/.ipfs/
container_name: ipfs-pinner
restart: on-failure
entrypoint: |
/bin/bash -l -c "
touch proof_out_hex.txt;
chmod +x proof_out_hex.txt;
echo "$PROOF_OUT_HEX" > proof_out_hex.txt;
xxd -r -p proof_out_hex.txt > proof_from_hex.out;
chmod +x proof_from_hex.out;
mv ./proof_from_hex.out /root/.ipfs/proof_from_hex.out;
./ipfs-server -port 3001 -w3-agent-key $W3_AGENT_KEY -w3-delegation-file $W3_DELEGATION_FILE;"
environment:
- W3_AGENT_KEY=${W3_AGENT_KEY}
- W3_DELEGATION_FILE=${W3_DELEGATION_FILE}
- PROOF_OUT_HEX=${PROOF_OUT_HEX}
networks:
- cqt-net
ports:
- "4001:4001"
- "3001:3001"
redis:
image: redis:alpine
container_name: redis-srv
restart: always
expose:
- 6379
volumes:
- ./data/redis:/data
- ./data/redis/redis.conf:/usr/local/etc/redis/redis.conf
environment:
- REDIS_REPLICATION_MODE=master
networks:
- cqt-net
entrypoint: redis-server #/usr/local/etc/redis/redis.conf
ports:
- "6379:6379"
redis-commander:
image: rediscommander/redis-commander:latest
container_name: redis-commander-web
hostname: redis-commander
restart: always
depends_on:
- redis
environment:
- REDIS_HOSTS=local:redis:6379
networks:
- cqt-net
ports:
- "8081:8081"
node:
image: trufflesuite/ganache-cli:v6.12.2
container_name: ganache-cli
restart: always
volumes:
- ./ganache_data:/ganache_data
entrypoint:
- node
- /app/ganache-core.docker.cli.js
- --deterministic
- --db=/ganache_data
- --mnemonic
- 'minimum symptom minute gloom tragic situate silver mechanic salad amused elite beef'
- --networkId
- '5777'
- --hostname
- '0.0.0.0'
depends_on:
- redis-commander
networks:
- cqt-net
ports:
- "8545:8545"
cqt-virtnet:
image: "ghcr.io/covalenthq/cqt-virtnet:latest"
container_name: proof-chain
restart: always
expose:
- 8008
entrypoint: >
/bin/bash -l -c "
truffle migrate --network docker;
nc -v agent 8008;
sleep 100000;"
depends_on:
- node
networks:
- cqt-net
environment:
npm_config_user: "root"
ports:
- "8008:8008"
agent:
image: "gcr.io/covalent-project/bsp-agent:latest"
container_name: bsp-agent
links:
- "cqt-virtnet:proof-chain"
# build:
# context: .
# dockerfile: Dockerfile
restart: on-failure
depends_on:
cqt-virtnet:
condition: service_started
ipfs-pinner:
condition: service_started
entrypoint: >
/bin/bash -l -c "
echo Waiting for proof-chain to be deployed...;
while ! nc -v -l -k -p 8008;
do
sleep 1;
done;
echo proof-chain contracts deployed!;
./bsp-agent --redis-url=redis://username:@redis:6379/0?topic=replication-2#replicate --avro-codec-path=./codec/block-ethereum.avsc --binary-file-path=./bin/block-ethereum/ --block-divisor=3 --log-folder ./logs/ --metrics --metrics.port 6063 --metrics.addr 0.0.0.0 --proof-chain-address=0xEa2ff902dbeEECcc828757B881b343F9316752e5 --consumer-timeout=15 --ipfs-pinner-server="http://ipfs-pinner:3001/";
exit 0;"
environment:
- MB_PRIVATE_KEY=${PRIVATE_KEY}
- MB_RPC_URL=${RPC_URL}
- BLOCKCHAIN=${BLOCKCHAIN}
networks:
- cqt-net
ports:
- "8080:8080"
networks:
cqt-net: