File tree 5 files changed +67
-2
lines changed
5 files changed +67
-2
lines changed Original file line number Diff line number Diff line change 37
37
38
38
# wait for the compute api to be online.
39
39
# the compute api is the last service to come online
40
- ./scripts/wait_for_compute_api .sh
40
+ ./scripts/wait-subgraphs .sh
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+ services :
3
+ keeper-node :
4
+ container_name : nevermined-keeper-node
5
+ image : neverminedio/geth-localnet::${KEEPER_VERSION}
6
+ user : root
7
+ command :
8
+ --dev
9
+ --http
10
+ --datadir /chain-data
11
+ --http.corsdomain "*"
12
+ --http.vhosts "*"
13
+ --http.addr 0.0.0.0
14
+ volumes :
15
+ - ${KEEPER_ARTIFACTS_FOLDER}:/nevermined-contracts/artifacts/
16
+ ports :
17
+ - 8545:8545
18
+ networks :
19
+ backend :
20
+ ipv4_address : 172.15.0.12
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ version: '3'
2
2
services :
3
3
keeper-node :
4
4
container_name : nevermined-keeper-node
5
- image : neverminedio/polygon-localnet:latest
5
+ image : neverminedio/polygon-localnet:${KEEPER_VERSION}
6
6
user : root
7
7
command :
8
8
--dev
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ RETRY_COUNT=0
4
+ HTTP_CODE=0
5
+ GRAPH_NODE_URL=${GRAPH_NODE_URL:- http:// localhost: 9000}
6
+ SUBGRAPH=WhitelistingCondition
7
+ SUBGRAPH_URL=$GRAPH_NODE_URL /subgraphs/name/neverminedio/$SUBGRAPH
8
+ SUBGRAPH_CAN_QUERY=false
9
+
10
+ COMMAND=(curl -g -X POST \
11
+ -H " Content-Type:application/json" \
12
+ -d ' {"query":"query{ownershipTransferreds{id}}"}' )
13
+
14
+ until [ $HTTP_CODE -eq 200 ] || [ $RETRY_COUNT -eq 90 ]; do
15
+ HTTP_CODE=$( ${COMMAND[@]} -s -o /dev/null -w ' ' %{http_code}' ' $SUBGRAPH_URL )
16
+ if [ $HTTP_CODE -eq 200 ]; then
17
+ break
18
+ fi
19
+ printf " Waiting for the subgraph ($SUBGRAPH ) to be running at $SUBGRAPH_URL \n"
20
+ sleep 10
21
+ let RETRY_COUNT=RETRY_COUNT+1
22
+ done
23
+
24
+ until [ " $SUBGRAPH_CAN_QUERY " = true ] || [ $RETRY_COUNT -eq 90 ]; do
25
+ SUBGRAPH_CAN_QUERY=$( ${COMMAND[@]} $SUBGRAPH_URL | jq ' has("data")' )
26
+ if [ " $SUBGRAPH_CAN_QUERY " = true ]; then
27
+ break
28
+ fi
29
+ printf " Waiting for the subgraph ($SUBGRAPH ) to be running at $SUBGRAPH_URL \n"
30
+ sleep 10
31
+ let RETRY_COUNT=RETRY_COUNT+1
32
+ done
33
+
34
+ if [ " $SUBGRAPH_CAN_QUERY " != true ]; then
35
+ echo " Waited for more than 15 minutes, but the graph node api is still not running"
36
+ exit 1
37
+ fi
Original file line number Diff line number Diff line change @@ -590,6 +590,14 @@ while :; do
590
590
COMPOSE_FILES=" ${COMPOSE_FILES/ -f ${COMPOSE_DIR} \/ nevermined_contracts.yml/ } "
591
591
printf $COLOR_Y ' Starting with local Polygon node...\n\n' $COLOR_RESET
592
592
;;
593
+ # spins up geth dev mode
594
+ --geth)
595
+ export KEEPER_NETWORK_NAME=" geth-localnet"
596
+ export KEEPER_DEPLOY_CONTRACTS=" false"
597
+ export NODE_COMPOSE_FILE=" ${COMPOSE_DIR} /nodes/geth_localnet.yml"
598
+ COMPOSE_FILES=" ${COMPOSE_FILES/ -f ${COMPOSE_DIR} \/ nevermined_contracts.yml/ } "
599
+ printf $COLOR_Y ' Starting with local Geth node...\n\n' $COLOR_RESET
600
+ ;;
593
601
# spins up spree
594
602
--local-spree-node)
595
603
export KEEPER_NETWORK_NAME=" spree"
You can’t perform that action at this time.
0 commit comments