This project started as a senior project from UNCFSU for csc490
- WSL2
- (Docker)[https://www.docker.com/get-started/]
- (K3d)[https://k3d.io/stable/#requirements]
- (kubectl)[https://kubernetes.io/docs/tasks/tools/#kubectl]
- (Terraform)[https://developer.hashicorp.com/terraform/tutorials/docker-get-started/install-cli]
- (Helm)[https://helm.sh/docs/intro/install/]
- Nginx
- This serves the requests between the client and our React application
- ReactJS
- This is the front-end of the application.
- To make react reflect changes run
docker compose -f "BuildTools/docker-compose.yml" restart frontend
- To make react reflect changes run
- This is the front-end of the application.
- Django
- This is our backend framework
- Mysql
- The database where all of our data is stored
We use docker compose to build app image and to link the app to mariadb.
Under the Build directory copy the envvars.example and name it .envvars Edit the .envvars to have the database creds you want for the db
IN WSL
bash setup_containers.sh teardown cleanup standup
or
docker compose -f BuildTools/docker-compose.yml up -d --build --remove-orphans
or
docker-compose -f BuildTools/docker-compose.yml build --no-cache && docker compose -f BuildTools/docker-compose.yml up -d
- -f
- Defines where the compose file is
- --build
- Builds images before starting containers
- --remove-orphans
- Removes containers for services not listed in the compose file for the project
- --force-create
- this allows us to force recreating of the images
- --no-cache
- do not use any cache when building the images
- --always-recreate-deps
- this allows to recreate the dependent containers
docker compose -f "BuildTools/docker-compose.yml" down --volumes --remove-orphans
- (--volumes|-v)
- Removes named and anonymous volumes pertaining to the service
- --rmi (local|all)
- Removes the images used for the application
This will replace the Docker Compose setup
Run Powershell as an administrator
choco install terraform
Enable Kubernetes within Docker Desktop's settings first
Run Powershell as an administrator
Run this powershell command and when prompted enter A to accept all prompts
choco install azure-cli kubernetes-cli
Verify the installation
kubectl version
kubctl cluster-info
The cluster information should have a Kubernetes control plane and Core DNS with a url containing kubernetes.docker.internal
kubectl create namespace csc490-stocks
Run the command below to check the status of program ran by supervisord
docker exec -it stocks_backend bash -c '${VENV_PATH}/bin/supervisorctl -c ${SUPERVISOR_CONFIG} status'
Additional command can be ran such as restarting a program and reloading it.
Run the commands below to view the endpoints available for React to use
docker exec -it stocks_backend bash
source /var/local/bin/stocks_venv/bin/activate;
python manage.py show_urls | grep -vP "^/admin"
Dr. Jin - UNCFSU Project Advisor Jose' Vargas - Lead Dev Stathis Jones - Backend Dev Caileb Carter - Fronend Dev