Skip to content

01 Setup for Developers

Paul W. Egeler, M.S., GStat edited this page Mar 5, 2020 · 1 revision

Prototype Phase

System Requirements

  • Python (>=3.5)
  • pip3
  • MySQL server

Running the App

To run the app in DEBUG mode, activate your virtual environment and then run the app using python3 -m src. This will run the app on localhost:5000. DO NOT PUT IN PRODUCTION USING THIS METHOD.

Python Virtual Environment

This project uses virtualenv to manage packages. There is a script that will install virtualenv and all packages. Run this the first time you clone the repo.

source init.sh

Afterward, if you deactivate your session or log out of bash, you can reactivate your virtualenv using the following command.

source flask/bin/active

Environment File

Running init.sh also creates a .env template file. You will need to adjust the variables for your setup. Remember to keep this at mode 600 for security.

Database Schema

Currently, the data backend is implemented in MySQL. Configure your MySQL accordingly.

Obtain the data for the project and place it in the data/ folder. Create your schema with create_and_load.sql. This is still in flux as we nail down the specifics of the data model.

Future state will change before production. For example, it is likely we will be using a graph database such as Neo4j.

Deployment

At this point, production deployment is only in planning phase.

The first the production WSGI will likely be implemented with mod_wsgi since I am most experienced with Apache web servers. This is not required for the prototype phase, but will be a consideration as development progresses.

We are considering the advantages of deploying with Amazon AWS tools. Many of these tools have the power to streamline production deployment and simplify load balancing. More to come after prototype phase.

References

Documentation and walkthroughs down below:

Clone this wiki locally