Create a parent folder and put both your frontend and backend folder inside.
Move the docker-compose.yml out to the same layer as frontend and backend folder.
Your parent folder should have the following structure:
parent_folder
├── frontend
│      ├── folder1
│      ├── folder2
│      ...
│ 
├── backend
│      ├── folder1
│      ├── folder2
│      ...
│      
└── docker-compose.ymlOpen docker desktop in backend/.env, modify the bootstrap servers (changed in liveupdates document)
KAFKA_BOOTSTRAP_SERVERS="kafka:9092" 
Ensure that you have both backend and frontend folders with the latest docker image. Ensure that your terminal is at the parent folder.
To build the containers
docker-compose up --buildTo stop running the container, run
docker-compose down
In order for the application to reflect new changes, you need to restart the docker container and rebuild the image.
- 
Install Zookeeper
brew install zookeeper - 
Install Kafka
brew install kafka - 
Start Zookeeper
zkServer start - 
Start Kafka Server (default port is localhost:9092)
kafka-server-start /usr/local/etc/kafka/server.properties(/opt/homebrew/etc/kafka/server.properties for macos) 
- 
Clone the repo
git clone <repository_url>cd backend - 
Set up Virtual Env
python3 -m venv venv(linux/macOS)source venv/bin/activate
python -m venv venv(windows)venv\Scripts\activate - 
Install
pip install -r requirements.txt 
- 
Create migrations
python manage.py makemigrations - 
Create Superuser
python manage.py createsuperuseruid just put admin, password just password admin page is at localhost:8000/admin - 
Apply migrations
python manage.py migrate - 
Start
python manage.py runserver - 
Daphne (Websocket server)
daphne -b 0.0.0.0 -p 8000 core.asgi:application 
deactivate to stop the virtual env
Error: That port is already in use.
- Check processes running on your port (Based on where the server is running).
bash lsof -i :<port> - Look for the PID that your server is running on and kill it.
kill -9 <PID> 
1 Terminal for frontend 1 Terminal for Django backend 1 Terminal for Daphne backend (Websockets) 1 Terminal for zookeeper 1 Terminal for kafka 1 Terminal for analysis agent (python manage.py run_analysis_agent) 1 Terminal for testing agent (python manage.py run_testing_agent)