diff --git a/README.md b/README.md index bf261d5..2d5d95a 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,11 @@ All APIs (external, internal and state channels websocket) are exposed to the do - external/internal API - http://$DOCKER_HOST_ADDRESS:8080/nodeX - channels API - ws://$DOCKER_HOST_ADDRESS:8080/nodeX/channel -For example if one wants to use `node1` API on local docker host the address is: http://localhost:8080/node1/v2/status +For example if one wants to use `node1` API on local docker host the address is: http://localhost:8080/node1/v3/status Also the node1 is always available without URL path suffix, for example: -http://localhost:8080/v2/status +http://localhost:8080/v3/status Also node1 have the standard port bindings as well: @@ -51,7 +51,7 @@ docker-compose up -d Check if the node is running: ```bash -curl http://localhost:8080/v2/status +curl http://localhost:8080/v3/status ``` To destroy the network: @@ -84,7 +84,7 @@ Node names: For example to access `node2` API (status), assuming docker host address is `localhost`: ```bash -curl http://localhost:8080/node2/v2/status +curl http://localhost:8080/node2/v3/status ``` ### Full infrastructure configuration diff --git a/nginx/default.conf b/nginx/default.conf index 7621791..afab52a 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -15,12 +15,12 @@ server { proxy_pass http://node1:3013/; } - location /v2/debug { + location /v3/debug { include cors.conf; proxy_pass http://node1:3113; } - location = /v2/key-blocks { + location = /v3/key-blocks { include cors.conf; proxy_pass http://node1:3113; } @@ -39,14 +39,14 @@ server { # http://nginx.org/en/docs/http/ngx_http_core_module.html#location # Internal API - location ~ ^/(node[0-9]+)/v2/debug/(.*)$ { + location ~ ^/(node[0-9]+)/v3/debug/(.*)$ { include cors.conf; - proxy_pass http://$1:3113/v2/debug/$2; + proxy_pass http://$1:3113/v3/debug/$2; } - location ~ ^/(node[0-9]+)/v2/key-blocks$ { + location ~ ^/(node[0-9]+)/v3/key-blocks$ { include cors.conf; - proxy_pass http://$1:3113/v2/key-blocks; + proxy_pass http://$1:3113/v3/key-blocks; } location ~ ^/(node[0-9]+)/v3/debug/(.*)$ { diff --git a/test/healthcheck.sh b/test/healthcheck.sh index d12a785..c727b7d 100755 --- a/test/healthcheck.sh +++ b/test/healthcheck.sh @@ -8,10 +8,10 @@ WEBSOCKET_ADDR=${WEBSOCKET_ADDR:-localhost:3014} MIN_PEERS=${MIN_PEERS:-2} echo "Testing external API: ${EXTERNAL_ADDR}" -curl -sSf -o /dev/null --retry 6 http://${EXTERNAL_ADDR}/v2/status || exit 2 +curl -sSf -o /dev/null --retry 6 http://${EXTERNAL_ADDR}/v3/status || exit 2 echo "Testing internal API: ${INTERNAL_ADDR}" -PEERS_COUNT=$(curl -sS ${INTERNAL_ADDR}/v2/debug/peers | grep -o aenode | wc -l) +PEERS_COUNT=$(curl -sS ${INTERNAL_ADDR}/v3/debug/peers | grep -o aenode | wc -l) echo "Testing internal API: $PEERS_COUNT peers" test $PEERS_COUNT -ge $MIN_PEERS || exit 3