Coder Social home page Coder Social logo

hnt-hub / console Goto Github PK

View Code? Open in Web Editor NEW

This project forked from helium/console

0.0 0.0 0.0 5.85 MB

A management console to onboard and manage devices running on the Helium blockchain network.

License: Apache License 2.0

JavaScript 48.40% CSS 0.65% Elixir 33.64% HTML 17.17% Dockerfile 0.07% Shell 0.07%

console's Introduction

Console

Code that powers the official Helium Console.

Development and Contribution

Any and all contributions from the community are encouraged.

  • Guidelines for how to contribute to this repository are here.
  • Discussion about the development and usage of the Helium Console takes place in the official Helium Discord Server, specifically in the #console channel. Join us!
  • For a list of issues and prioritization, please go to our Project page.

Running Console Development Environment

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with cd assets && yarn
  • Start Phoenix with mix phx.server

Now you can visit localhost:4000 from your browser.

Running Console+Router with Docker

  • Clone the repo and cd console
  • Sign up with Auth0 (https://auth0.com/)
  • In root directory, copy environment templates
cp templates/.env .env
cp templates/.env-router .env-router
cp templates/docker-compose-local.yaml docker-compose.yaml
  • Populate .env file with the following
SECRET_KEY_BASE=[Random 64 char secret key]
CLOAK_SECRET_KEY=[Run in iex: 32 |> :crypto.strong_rand_bytes() |> Base.encode64()]
GUARDIAN_SECRET_KEY=[Random 64 char secret key]
ROUTER_SECRETS=[Unix Timestamp:Random 64 char secret key]
OUI=3
SELF_HOSTED=true
ENV_DOMAIN=[Your host domain]
AUTH_0_CLIENT_ID=[Client ID under Auth0 app settings]
AUTH_0_DOMAIN=[Domain under Auth0 app settings]
AUTH0_BASE_URL=[https:// + Auth0 Domain]
MAILGUN_API_KEY=[Your Mailgun api key (optional)]
SITE_DOMAIN_MAILGUN=[Your Mailgun host domain (optional)]
DATABASE_DB=console
DATABASE_HOST=postgres
DATABASE_USER=postgres
DATABASE_PASSWORD=postgres
  • Populate .env-router file with the following
ROUTER_SEED_NODES=/ip4/35.166.211.46/tcp/2154,/ip4/44.236.95.167/tcp/2154
ROUTER_CONSOLE_ENDPOINT=http://helium_console:4000
ROUTER_CONSOLE_WS_ENDPOINT=ws://helium_console:4000/socket/router/websocket
ROUTER_CONSOLE_SECRET=[Same secret from .env file]
ROUTER_OUI=3
ROUTER_DEFAULT_DEVADDR=AAQASA==
ROUTER_SC_OPEN_DC_AMOUNT=100000
ROUTER_SC_EXPIRATION_INTERVAL=45
  • Build with docker-compose build
  • Run with docker-compose up

Now you can visit localhost:4000 from your browser.

Running Console+Router with Docker on a Server

  • Follow steps in the previous section
  • In root directory, copy server environment templates
cp templates/docker-compose-server.yaml docker-compose.yaml
cp templates/nginx-default.conf nginx.conf
  • Get a certificate (https://certbot.eff.org/instructions)
  • Update nginx.conf with cert and key information
  • Update docker-config.yaml socket_check_origin to reflect your hosted URL
  • Build with docker-compose build
  • Run with docker-compose up

Upgrading your open source Console+Router

  • Pull down the latest master branch with git
  • Build with docker-compose build, you do not have to bring down your server until this completes
  • Bring down your server with docker-compose down, then run your new build with docker-compose up
  • If there are db migrations in the upgrade commits, docker-compose up will run these migrations (Keep an eye on the logs for migration errors to file a GH issue, you should not have to manually migrate the db)

Questions

If you run into any issues or you have any questions about how to get started contributing, feel free to reach out on the #console channel in the official Helium Community Discord server!

console's People

Contributors

vicmgs avatar ambuznego avatar allenan avatar snoretrain avatar amirhaleem avatar petermain avatar lthiery avatar michaeldjeffrey avatar cokes518 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.