1
0
mirror of https://github.com/oceanprotocol/barge.git synced 2024-12-02 05:57:21 +01:00

add thegraph

This commit is contained in:
alexcos20 2024-07-04 14:48:35 +03:00
parent b829d964cd
commit 038aad7661
No known key found for this signature in database
4 changed files with 76 additions and 2 deletions

View File

@ -7,6 +7,9 @@ docker container stop ocean_dashboard_1
docker container stop ocean_computetodata_1
docker container stop ocean_kindcluster_1
docker container stop docker-registry
docker container stop ocean_subgraph_1
docker container stop ocean_graph-node_1
docker container stop ocean_postgres_1
docker container rm ocean_ipfs_1
docker container rm ocean_ocean-contracts_1
docker container rm ocean_typesense_1
@ -15,6 +18,9 @@ docker container rm ocean_dashboard_1
docker container rm ocean_computetodata_1
docker container rm ocean_kindcluster_1
docker container rm docker-registry
docker container rm ocean_graph-node_1
docker container rm ocean_subgraph_1
docker container rm ocean_postgres_1
docker volume rm ocean_typesense1
docker volume rm graphipfs

View File

@ -6,5 +6,5 @@ networks:
ipam:
driver: default
config:
- subnet: 172.15.0.1/24
- subnet: 172.15.0.0/24

View File

@ -0,0 +1,57 @@
version: '3'
services:
graph-node:
image: graphprotocol/graph-node:${GRAPH_NODE_VERSION:-latest}
ports:
- '9000:8000'
- '9001:8001'
- '9020:8020'
- '9030:8030'
- '9040:8040'
networks:
backend:
ipv4_address: 172.15.0.15
depends_on:
- ipfs
- postgres
- ocean-contracts
environment:
postgres_host: 172.15.0.17
postgres_user: graph-node
postgres_pass: let-me-in
postgres_db: graph-node
ipfs: '172.15.0.16:5001'
ethereum: 'development:${NETWORK_RPC_URL}'
RUST_LOG: ${SUBGRAPH_LOG_LEVEL}
postgres:
image: postgres
ports:
- '5432:5432'
networks:
backend:
ipv4_address: 172.15.0.17
command: ['postgres', '-cshared_preload_libraries=pg_stat_statements']
environment:
POSTGRES_USER: graph-node
POSTGRES_PASSWORD: let-me-in
POSTGRES_DB: graph-node
POSTGRES_INITDB_ARGS: '--encoding=UTF-8 --lc-collate=C --lc-ctype=C'
volumes:
- graphpgsql:/var/lib/postgresql/data
subgraph:
image: oceanprotocol/subgraph:${SUBGRAPH_VERSION:-latest}
networks:
backend:
ipv4_address: 172.15.0.19
environment:
DEPLOY_SUBGRAPH: ${DEPLOY_SUBGRAPH}
depends_on:
- graph-node
- ocean-contracts
volumes:
- ${OCEAN_ARTIFACTS_FOLDER}:/ocean-contracts/artifacts/
- ${OCEAN_SUBGRAPH_FOLDER}:/ocean-subgraph/
volumes:
graphpgsql:

View File

@ -31,6 +31,8 @@ COMPOSE_DIR="${DIR}/compose-files"
export CONTRACTS_VERSION=${CONTRACTS_VERSION:-v2.0.4}
export TYPESENSE_VERSION=${TYPESENSE_VERSION:-0.25.1}
export GRAPH_NODE_VERSION=${GRAPH_NODE_VERSION:-v0.33.0}
export OPERATOR_SERVICE_VERSION=${OPERATOR_SERVICE_VERSION:-oceanprotocol/operator-service:v4main}
export OPERATOR_ENGINE_VERSION=${OPERATOR_ENGINE_VERSION:-oceanprotocol/operator-engine:v4main}
export POD_CONFIGURATION_VERSION=${POD_CONFIGURATION_VERSION:-oceanprotocol/pod-configuration:v4main}
@ -64,10 +66,15 @@ export GANACHE_HARDFORK=${GANACHE_HARDFORK:-"istanbul"}
export OCEAN_HOME="${HOME}/.ocean"
export CONTRACTS_OWNER_ROLE_ADDRESS="${CONTRACTS_OWNER_ROLE_ADDRESS}"
export DEPLOY_CONTRACTS=true
export DEPLOY_SUBGRAPH=true
export OCEAN_ARTIFACTS_FOLDER="${OCEAN_HOME}/ocean-contracts/artifacts"
mkdir -p ${OCEAN_ARTIFACTS_FOLDER}
export OCEAN_C2D_FOLDER="${OCEAN_HOME}/ocean-c2d/"
mkdir -p ${OCEAN_C2D_FOLDER}
export OCEAN_SUBGRAPH_FOLDER="${OCEAN_HOME}/ocean-subgraph/"
rm -f "${OCEAN_SUBGRAPH_FOLDER}/ready"
mkdir -p ${OCEAN_SUBGRAPH_FOLDER}
export ADDRESS_FILE="${OCEAN_ARTIFACTS_FOLDER}/address.json"
echo "export ADDRESS_FILE=${ADDRESS_FILE}"
@ -167,6 +174,10 @@ while :; do
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/registry.yml"
printf $COLOR_Y'Starting with Registry...\n\n'$COLOR_RESET
;;
--with-thegraph)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/thegraph.yml"
printf $COLOR_Y'Starting with TheGraph...\n\n'$COLOR_RESET
;;
--with-c2d)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/registry.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ipfs.yml"