In order to use the UI of MATRIX, you will need to install and deploy it on a machine (local/cloud).
The installation instructions are are an addition to the MATRIX installation instructions.
To install Angular 9:
- install Nodejs and npm:
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash - && sudo apt-get install -y nodejs
- Install the Angular CLI:
npm install -g @angular/cli@9
- Install the required JS packages:
cd WebApp/frontend && npm install
Matrix uses mongodb. In order to use MATRIX you must install and configure Mongodb.
To install Mongodb: sudo apt install mongodb
To configure the database to support authentication use this SO answer.
Please name the database BIU
. If you want to create the database in a different name, please change this
line.
To use the UI, you will need to deploy two web services. The deployment is done on
Nginx server.
To install Nginx: sudo apt install nginx
.
To deploy the Angular service:
- Build the Angular project for production:
cd WebApp/frontend && ng build -- prod
- Create directory
mkdir -p /usr/share/nginx/html/matrix
- Copy the content of
WebApp/frontend/dist/frontend
to/usr/share/nginx/html/matrix
- Copy
WebApp/matrix
to/etc/nginx/sites-available/
- Create soft link:
sudo ln -s /etc/nginx/sites-available/matrix /etc/nginx/sites-enabled/
- Restart Nginx service:
sudo systemctl restart nginx
To deploy the backend service:
- Install gunicorn:
pip3 install gunicorn --user
. - Copy the service file to /etc/systemd/system (using sudo privileges).
- Then start and enable the service:
sudo systemctl start matrix & sudo systemctl enable matrix
The instructions are taken from [1]