Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

OSUMC-Cultural-Awareness/OSUMC-Cultural-Awareness-App

Repository files navigation


Logo

OSUMC Cultural Awareness App

This app is intended for health care professionals, to aid in their understanding of the cultural norms of their patients

Frontend CI Api CI Api CI Api Coverage

Table of Contents


About The Project

Tech Stack

  • MongoDB
  • Python-Flask
  • Node
  • React-Native

Backend Production Environment

Amazon Linux 2 free-tier image running gunicorn and nginx services. Contact @freeman91 for ssh credentials.
Gunicorn (Green Unicorn) is a Python WSGI HTTP Server for UNIX.
Using NginX as a HTTP and reverse proxy server, routing HTTP and HTTPS traffic to gunicorn through a socket file.
Listening for http/s requests on www.osumc-cultural-awareness.com.

Frontend Production Environment

Utlizing Github Pages to deploy a web build of the React Native application.
Live React Native App


Getting Started

To set up a development environment follow these simple steps.

Prerequisites

install the following packages

Installation & Configuration for a dev environment

  1. Clone this repo
  2. In app root, create .env file with the following contents. Get secrets from another dev.
FLASK_ENV=development
FLASK_APP=api/__main__.py
FRONTEND_URL=http://localhost:19006/
# MONGO_URI not required for the app in dev
MONGO_URI=mongodb+srv://admin:<password>@data-cluster.tjzlp.mongodb.net/database?retryWrites=true&w=majority
MONGO_INITDB_DATABASE=database
MONGO_INITDB_ROOT_USERNAME=admin
MONGO_INITDB_ROOT_PASSWORD=<password>
MONGO_IP=172.19.199.3
MONGO_PORT=27017
# SECRET_KEY randomly generate, MUST be secure
SECRET_KEY=this-is-a-secret-key-keep-it-secret
[email protected]
GMAIL_PASSWORD=<password>
  1. Install yarn packages
yarn install
  1. Build backend docker containers
# build db and api containers
docker-compose up -d --build

# restore your local db from the backup file
script/restore_dev_db.sh

# if db exists, might need to drop the old db before restoring
rm -rf mongo_voume/

# all container logs
docker-compose logs -f --tail=100

# Stop containers
docker-compose down

After building, api service is up and running on localhost:5000.

  1. Start Expo, React Native service
yarn start
  • run python tests
pipenv shell
python -m pytest

Deployment

.github/workflows/deploy.yml is automatically deploying the frontend and the backend to their respective environments. If either of those fail, you may need to deploy manually.

Backend

This will deploy the latest master, if you want to deploy another branch, follow these instructions.

script/deploy_production_server.sh /path/to/key

Frontend

yarn deploy

Contributors

  • Addison Freeman, @freeman91
  • Nick Lamanna
  • Adam Claus
  • Nick Hackman

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •