Skip to content

Commit

Permalink
update docker compose for local bsp-agent run
Browse files Browse the repository at this point in the history
Signed-off-by: Pranay Valson <[email protected]>
  • Loading branch information
noslav committed Jan 19, 2024
1 parent 2bfa390 commit b2166ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@ version: '3'

services:
ipfs-pinner:
image: "gcr.io/covalent-project/ipfs-pinner:latest"
image: "us-docker.pkg.dev/covalent-project/network/ipfs-pinner:stable"
volumes:
- ~/.ipfs:/root/.ipfs/
container_name: ipfs-pinner
restart: on-failure
expose:
- 4001
- 3000
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:
- WEB3_JWT=${WEB3_JWT}
- W3_AGENT_KEY=${W3_AGENT_KEY}
- W3_DELEGATION_FILE=${W3_DELEGATION_FILE}
- PROOF_OUT_HEX=${PROOF_OUT_HEX}
networks:
- cqt-net
ports:
- "4001:4001"
- "3000:3000"
- "3001:3001"

redis:
image: redis:alpine
Expand Down Expand Up @@ -115,7 +123,7 @@ services:
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=1 --log-folder ./logs/ --metrics --metrics.port 6063 --metrics.addr 0.0.0.0 --proof-chain-address=0xEa2ff902dbeEECcc828757B881b343F9316752e5 --consumer-timeout=100000 --ipfs-pinner-server="http://ipfs-pinner:3000/";
./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=1 --log-folder ./logs/ --metrics --metrics.port 6063 --metrics.addr 0.0.0.0 --proof-chain-address=0xEa2ff902dbeEECcc828757B881b343F9316752e5 --consumer-timeout=100000 --ipfs-pinner-server="http://ipfs-pinner:3001/";
exit 0;"
environment:
- MB_PRIVATE_KEY=${PRIVATE_KEY}
Expand Down
2 changes: 1 addition & 1 deletion entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ then
--websocket-urls="34.69.250.147:20000 34.69.250.147:20001 34.69.250.147:20002 34.69.250.147:20003"

else
./bsp-agent --redis-url=redis://username:@redis:6379/0?topic=replication-2#replicate \
./bsp-agent --redis-url=redis://username:@redis:6379/0?topic=replication#replicate \
--avro-codec-path=./codec/block-ethereum.avsc \
--binary-file-path=./bin/block-ethereum/ \
--block-divisor=3 \
Expand Down

0 comments on commit b2166ec

Please sign in to comment.