This repository is my HHA 504 Final Project, which contains code that allows users to view data about medical malpractice statistics displayed on a web application, as well as educate users on what medical malpractice is.
Technologies used were Flask, Tailwind, MySQL Database on Azure, SQLAlchemy, API service via Flask, Google OAuth, Sentry,io, Docker, and Azure.
- Flask: web development (backend)
- Tailwind: front-end styling
- MySQL Database on Azure: data storage
- SQLAlchemy: database interaction
- Google OAuth: authorization
- Sentry.io: error monitoring
- Docker: containerization
- Azure: deployment
If an individual wanted to run my code locally without Docker, they would have to clone my app.py, templates folder, requirements.txt, .env, .gitignore, static folder, and oauth folder (everything in the app folder). Then the individual would have to cd
into their on workspace, cd
into the app folder, and run python app.py
in their console.
If an individual wanted to run my code locally with Docker:
- Clone my entire app folder.
- Create a Docker file with the following lines:
FROM python:3.7-alpine
WORKDIR /app
COPY . /app
RUN pip install -r requirements.txt
EXPOSE 5000
CMD ["python", "app.py"]
- Docker build:
docker build -t <name>
- View the image:
docker images
- Run Docker:
docker run -d -p <port you want to run it on>:<port exposed> <name>
- Display information about Docker containers:
docker ps
- Stop the Docker image from running:
docker stop <container id>
- Delete Docker image:
docker system prune -a -f
If an individual want to deploy my code onto the Cloud:
- Install Azure CLI:
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
- Log in: ``az login --use-device-code```
- Create a resource group:
az group create --name <name of resource group> --location eastus
- Deploy the Azure App Service:
az webapp up --name <name of app service> --sku B1 --runtime "PYTHON | 3.9" --resource-group <resource group name>
- Click on the link provided in the console
DB_URL= ***
DB_HOST= ***
DB_DATABASE= ***
DB_USERNAME= ***
DB_PASSWORD= ***
DB_PORT= ***
DB_CHARSET= ***
GOOGLE_CLIENT_ID= ***
GOOGLE_CLIENT_SECRET= ***