Code Monkey home page Code Monkey logo

node-walletconnect-bridge's Introduction

WalletConnect Bridge Server ⏮️🖥️⏭️

Bridge Server for relaying WalletConnect connections.

This is a fork from WalletConnect version.

I have added support for deploying to AWS elastic beanstalk instead of running within docker. one still need to have a running redis server but that is simple to setup(either get it from AWS or spin up another EC2 instance, and I have changed the EB script to include one)

The main purpose of this fork is really about having an easy to scale out setup using AWS elastic beanstalk(with/without ELB) for production usage. Docker is good but scaling that out would be too complicated(Kubernetes).

Concerning AWS elastic beanstalk, I just port from a python template I work on at here. read more about it there

https://github.com/garyng2000/flaskweb

Development 🧪

Local dev work is using local self signed certificates within the docker environment.

Your Walletconnect enabled app needs to be on the same local network.

make dev # ports 80, 443, 5001, 6379 will be exposed locally

Production 🗜️

Setting up docker 🎚️

Dependencies:

  • git
  • docker
  • make

You will need to have docker swarm enabled:

docker swarm init
# If you get the following error: `could not chose an IP address to advertise...`. You can do the following:
docker swarm init --advertise-addr `curl -s ipecho.net/plain`

Deploying 🚀

Run the following command and fill in the prompts:

git clone https://github.com/WalletConnect/node-walletconnect-bridge
cd node-walletconnect-bridge
make deploy
Bridge URL domain: <your bridge domain>
Email for SSL certificate (default [email protected]):

Additional Monitoring with Grafana

If you want a grafana dashboard you can use the following commands:

git clone https://github.com/WalletConnect/node-walletconnect-bridge
cd node-walletconnect-bridge
make deploy-monitoring
Bridge URL domain: <your bridge domain>
Email for SSL certificate (default [email protected]):

For this to work you must point grafana.<bridge domain> to the same ip as <bridge domain>.

Cloudflare Support

The config step of the Makefile will ask you whether you are using cloudflare as a DNS proxy for your bridge domain. If you answer yes then the certbot will need a Cloudflare API token that can be obtained from: https://dash.cloudflare.com/profile/api-tokens. The type of token you need is a Edit zone DNS with access to the bridge domain.

The API token will be safeguarded with a docker secret.

Upgrading ⏫

This will upgrade your current bridge with minimal downtime.

⚠️ ATTENTION: This will run git fetch && git merge origin/master in your repo ⚠️

make upgrade

Monitoring 📜

This stack deploys 3 containers one of redis, nginx and node.js. You can follow the logs of the nginx container by running the following command:

docker service logs --raw -f walletconnect_nginx

node-walletconnect-bridge's People

Contributors

pedrouid avatar jdkanani avatar garyng2000 avatar notatestuser avatar sbc64 avatar edgarbarrantes avatar ptsayli avatar

Stargazers

Nirmal avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.