The Threat Control Tool was developed during the Bravo Hackathon in July 2022 by multiple different developers.
This is the web application portion of the tool. It is written in ReactJS and was based off of the create-react-app framework created by Facebook. It can be developed in a standalone mode if desired.
The web services of the tool are written using python WebSockets to improve data availability to the UI. The API can be accessed by going to http://localhost:6969/ and http://localhost:7060/
NOTE: Run all commands below from root base-ui-project/
directory.
docker-compose up -d
This starts the services and the web application at the same time
cd dan-app
npm install
*If needed
npm start
**This will only start the web application and will not leverage any of the services.
There will be no data available in the app if started this way.
From the root base-ui-project directory:
docker-compose up sam-emitter-services
After changes, the services can be rebuilt using:
docker-compose up --no-deps --build sam-emitter-services
Create the docker images
docker-compose build
OR
docker build -f Dockerfile --no-cache -t dan-app .
docker build -f Dockerfile --no-cache -t sam-emitter-services .
Save the images
docker save dan-app:latest | gzip > dan-app-< buildDate >.tar.gz
docker save sam-emitter-services:latest | gzip > sam-emitter-services-< buildDate >.tar.gz
Load the docker image:
docker load -i dan-app.tar.gz
docker load -i sam-emitter-services.tar.gz
Run the image:
docker-compose -f docker-compose-prod.yml up -d
** Note ** You may need to run a docker container prune
if it gives you an error about finding images