diff --git a/block-explorer-light/default.nginx b/block-explorer-light/default.nginx index 6efc1afdb..506d1bfa1 100644 --- a/block-explorer-light/default.nginx +++ b/block-explorer-light/default.nginx @@ -22,6 +22,13 @@ server { proxy_set_header Connection "Upgrade"; } + # a common HTTP GraphQL entrypoint + location /graphql { + proxy_pass http://rpcnode:8547; + proxy_redirect off; + proxy_set_header Host $host; + } + # a generic HTTP RPC entrypoint pointing to each available node location ~* /(?(.*))/jsonrpc { # Use Docker default local network DNS IP as resolver diff --git a/docker-compose.yml b/docker-compose.yml index b85e7d7d1..a37ee84f4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,6 +41,10 @@ services: "--rpc-ws-enabled", "--rpc-ws-host=0.0.0.0", "--rpc-ws-port=8546", + "--graphql-http-enabled", + "--graphql-http-host=0.0.0.0", + "--graphql-http-port=8547", + "--graphql-http-cors-origins=*", "--host-whitelist=*"] volumes: - public-keys:${PANTHEON_PUBLIC_KEY_DIRECTORY} diff --git a/docker-compose_poa.yml b/docker-compose_poa.yml index 470f10127..c4b72ed37 100644 --- a/docker-compose_poa.yml +++ b/docker-compose_poa.yml @@ -19,6 +19,10 @@ services: "--rpc-ws-api=WEB3,ETH,NET,${QUICKSTART_POA_API-ibft}", "--rpc-ws-host=0.0.0.0", "--rpc-ws-port=8546", + "--graphql-http-enabled", + "--graphql-http-host=0.0.0.0", + "--graphql-http-port=8547", + "--graphql-http-cors-origins=*", "--host-whitelist=*"] volumes: - public-keys:${PANTHEON_PUBLIC_KEY_DIRECTORY} diff --git a/list.sh b/list.sh index 01c969789..411f8e9be 100755 --- a/list.sh +++ b/list.sh @@ -48,6 +48,7 @@ if [ ${#dots} -gt ${maxRetryCount} ]; then else echo "JSON-RPC HTTP service endpoint : http://${HOST}:${explorerMapping##*:}/jsonrpc" echo "JSON-RPC WebSocket service endpoint : ws://${HOST}:${explorerMapping##*:}/jsonws" + echo "GraphQL HTTP service endpoint : http://${HOST}:${explorerMapping##*:}/graphql" echo "Web block explorer address : http://${HOST}:${explorerMapping##*:}" echo "****************************************************************" fi