Skip to content

motiv-labs/janus-dashboard

Repository files navigation

Build Status

Janus-Dashboard

Janus Dashboard is a web-based UI for Janus. It allows users to easily configure the API Gateway without having to send HTTP calls manually.

Dashboard API Definitions Page

Getting Started

A quick way to start the dashboard is to run the docker image. Execute the following command to start the dashboard using the latest Docker image:

docker run -d \
-p 8082:80 \
--name janus-dashboard \
hellofreshtech/janus-dashboard

You can then visit http://localhost:8082 and start using the dashboard.

Advanced Configuration

Janus Dashboard supports authentication with GitHub OAuth. A guide on how to configure GitHub OAuth can be read here. An example command can be seen below:

docker run -d \
-p 8082:80 \
-e REACT_APP_JANUS_URI=http://localhost:8081 \
-e REACT_APP_DISABLE_BASIC_AUTH=true \
-e REACT_APP_GITHUB_AUTHORIZE_URL=http://localhost:8080/auth/github/authorize \
-e REACT_APP_GITHUB_CLIENT_ID=exampleClientId \
-e REACT_APP_GITHUB_SCOPE=read:org \
-e REACT_APP_GITHUB_TOKEN_URL=http://localhost:8080/auth/github/token \
--name janus-dashboard \
hellofreshtech/janus-dashboard

Supported environment variables:

  • REACT_APP_DISABLE_BASIC_AUTH removes the user interface for basic authentication if set to true
  • REACT_APP_DISABLE_GITHUB_AUTH removes the user interface of GitHub authentication if set to true
  • The following environment variables are required for GitHub authentication
    • REACT_APP_GITHUB_AUTHORIZE_URL
    • REACT_APP_GITHUB_CLIENT_ID
    • REACT_APP_GITHUB_TOKEN_URL
    • REACT_APP_GITHUB_SCOPE

Development

With Docker

The following command will start Janus Dashboard server and the latest version of Janus with the default username admin and password admin:

$ docker-compose -f tests/docker-compose.test.yml up -d

Without Docker

The following command will start only Janus Dashboard:

$ npm install
$ npm run start

This method will load public/config.js as the configuration. A sample of this file can be found in /src/config.js.tmpl.