Deployment

Deployment

Introduction #

This guide will walk you through the steps to set up and run the Operational reporting server application contained in the artifact assure.reinsurance.operational.reporting.ui.zip on your server.

sics_or_webapp_pa_sics_server_react.png

SICS Operational Reporting Server is an analytics and visualization web platform to give real-time visualization of operational data within SICS.

Prerequisites #

Before you begin, ensure you have the following installed on your server:

  • Node.js (version 20.x or later)
  • npm (Node Package Manager)

Step 1: Extract the Artifact #

  • Upload or transfer the artifact assure.reinsurance.operational.reporting.ui.zip to your server.
  • Extract the contents of the zip file to a directory of your choice.

Step 2: Configure Environment Variables #

In order for the OPR to run properly it needs to connect to an OPR API Server for that we need to setup environment variable in the server

  • Create a .env file in the root directory of the project.
  • Add the required environment variables to the .env file.
OPR_API_URL=https://opr-api-url-here

Step 4: Configure Nginx #

In thi section we will use Nginx to server the application. you can choose any web server you want.

  • Open the Nginx configuration file (typically located at /etc/nginx/nginx.conf or /etc/nginx/sites-available/default).
  • Add a new server block or modify the existing configuration to serve the React application.
  • Configure Nginx to serve the built files from the React application’s build directory. For example:
server {
    listen 80;
    server_name your_domain.com;

    root /path/to/your/folder/app;
    index index.html;

    location / {
        try_files $uri /index.html;
    }
}

Replace your_domain.com with your actual domain name and /path/to/your/react/app with the path to your application’s directory.

Step 5: Access the Application #

  • Open a web browser.
  • Enter the URL of your server where Nginx is configured to serve the React application.
  • You should see the application running in the browser.

Additional Notes #

  • Production Deployment: Ensure to configure Nginx for production environments with appropriate security settings, SSL/TLS certificates, and other optimizations.
  • Troubleshooting: If you encounter any issues during setup or running the application, check the Nginx error logs (/var/log/nginx/error.log) for error messages and consult the project documentation or development team for assistance.