Skip to content

alexandrelamberty/nidus-web-app

Repository files navigation

Docker React Codacy Badge codecov DockerHub

Nidus Web Application

Home monitoring web application part of the Nidus project.

This application use the Nidus API

Features

  • Dashboard
    • Widgets
      • Sensors
        • Humidity
        • Temperature
        • Pressure
        • Motion
      • Devices
      • Weather
  • Manage your devices
  • View statistics

Technolgies and frameworks

Usage

This application is part of a Docker stack and rely on a Go api service. see: Nidus project to launch the complete stack or only specific services.

Run with NPM

If the api service is up and running, create an .env file and fill it accordingly with the service configuration.

REACT_APP_API_URL=http://localhost:3333

Run the application

npm run start

Go to [http://localhost:3000]

Test with NPM

At the moment only some tests for the routes and components are avalable!

npm run test

Build and run with Docker

As we use Nginx to serve our application, we don't have access to the Node environment variables.

Environment variables injection for React, see: environment.sh
FIXME: The image build need a .env file to provide variables to be read and updated Switch to key/value env variable!

Build the image, see: Dockerfile.

docker build . -t alexandrelamberty/nidus-web:latest

Run the image, we specify the ports mapping, environment variables file and network to join.

docker run -p 3000:3000 --network=nidus_default --env-file .env --name nidus-web -d alexandrelamberty/nidus-web:latest