Skip to content

Latest commit

 

History

History
120 lines (79 loc) · 2.46 KB

README.md

File metadata and controls

120 lines (79 loc) · 2.46 KB

Predico-Collabforecast Frontend

This is the frontend for the Predico Collabforecast service. It is a React application that allows users to interact with the service documentation and for administrators to invite and manage user access to the platform.


Prerequisites

System Requirements

  • Node.js: You will need Node.js installed on your machine. Download it from the official website.

  • Docker (Optional): Docker is required for building and running the production version of the application. Visit the Docker website for installation instructions.


Development Setup

  1. Clone the repository:
   git clone git@github.com:INESCTEC/predico-collabforecast.git
   cd predico-collabforecast/frontend
  1. Install dependencies:
   npm install
  1. Start the development server:
   npm start

The application will be available at http://localhost:3000.

Production Setup

  1. Build the dependencies:
   npm run build
  1. Serve the application:
   npm install -g serve
   serve -s build

Docker Deployment

Build the Docker Image

  1. Clear the docker cache: If you’ve made any changes to the frontend module, clear Docker caches thoroughly before rebuilding images. Docker might still be using cached layers or containers.
   docker volume rm predico_frontend_build
  1. Build the Docker image:
   docker-compose -f docker-compose.prod.yml build frontend
  1. Run the Docker container:
   docker-compose -f docker-compose.prod.yml up frontend

Environment Variables

The frontend application requires the following environment variables to be set:

Features

User interaction

  • To be defined

Admin interaction

  • Invite users and manage user roles.
  • Monitor platform access logs and activity.

Clearing Caches and Resetting

Clearing Caches and Resetting

  1. Clearing Caches and Resetting
rm -rf node_modules
npm install
  1. Remove Docker containers and volumes:
docker-compose -f docker-compose.prod.yml down
docker volume rm predico_frontend_build
  1. Rebuild and restart the services:
docker-compose -f docker-compose.prod.yml build frontend
docker-compose -f docker-compose.prod.yml up -d