GithubHelp home page GithubHelp logo

csc490_team2's Introduction

csc490_team2

Local Requirements

  • WSL2
  • Docker
  • Terraform
  • Python 3

Containers

  • 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
  • Django
    • This is our backend framework
  • Mysql
    • The database where all of our data is stored

The Docker application

We use docker compose to build app image and to link the app to mariadb.

Configuration

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

Standing up the application

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

The used flags

  • -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

additional build options for docker

  • --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

Teardown the application

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

Install Terraform

Windows

https://releases.hashicorp.com/terraform/1.7.2/terraform_1.7.2_windows_amd64.zip

Install kubectl and az-cli

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

Setup Kubernetes Pods

kubectl create naespace csc490-stocks

Django Endpoints

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;
python3 manage.py show_urls | grep -vP "^/admin"

csc490_team2's People

Contributors

c-carter10 avatar dependabot[bot] avatar infernoj avatar josev814 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

csc490_team2's Issues

BUG: Related News to ticker

When searching for ticker, make sure the news that is displayed is related to the ticker.

ie. Amzn has Amzn related
ie. Searching an invalid ticker ("aapplleesszzz"), displayed random news

Design the database schema

  • Design the database schema for the application
  • Create Django models based on the database schema
  • Create Django migrations for the schema

BUG: Toast doesn't disappear

When a toast appears, it's not automatically disappearing or closing when pressing the close button.

This happens on the page where we delete a rule and the rule doesn't exist or the user doesn't have access to the rule.

Users Balance

  • Make an API endpoint to display the user's Total Balance amongst all rules
  • Make an API endpoint to display the user's Profit/Loss amongst all rules
  • Have the UI display the balance and growth on the "Home" page

Pull Stock Data

Figure out where to pull the stock data from and the manner in which to store it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.