Using Docker with Azure Functions and SignalR Service
If you want to use Serverless Azure Functions and Azure SignalR Service with TaaS WebSocket/SignalR
Running TaaS with Azure Functions and Azure SignalR Service
Requirements
Azure Account (https://azure.microsoft.com/en-us/free/)
Docker
Tezos Node with enabled RPC endpoint supporting following calls
/monitor/heads/main
/chains/main/blocks/hash
In this configuration we are using a different docker image - this one is only sending a new blocks to our Azure Function, which then sends parsed information to subscribers through Azure SignalR Service.
If you just want to use a Docker container without having to setup Azure infrastructure please check Using Docker documentation section.
Ready-to-use docker image is available from Docker Hub here: https://hub.docker.com/repository/docker/tezoslive/agileventurestezpusherconsoleapp
Example of the docker run
command
setting the
Tezos:NodeUrl
env. variable to https://172.17.0.1:8732setting the
Azure:AzureFunctionUrl
env. variable to https://myfunction.azurewebsites.netsetting the
Azure:AzureFunctionKey
env. variable to MySecretFunctionKey
Be sure to configure the following ENV keys correctly per your environment
Tezos:NodeUrl
Azure:AzureFunctionUrl
Azure:AzureFunctionKey
This infrastructure setup has the following benefits
It allows you to have a more robust security out of the box as all communication is encrypted by TLS.
It makes scaling your applications for thousands of subscribers much easier by using serveless compute with scalable SignalR Service.
For client side instructions please see
pageClients - TezosLive.io Endpoint or Azure FunctionsMore information about Azure Functions can be found at https://azure.microsoft.com/en-us/services/functions/.
More information about Azure SignalR Service can be found at https://azure.microsoft.com/en-us/services/signalr-service/.
Last updated