Getting Started

This section will explain how to set up the project on your machine for development/testing.

Prerequisites

This project relies heavily on Docker and Docker Compose. While not strictly required for development, it is highly recommended.

The registration webapp uses MongoDB as the database. You can either install MongoDB on your host machine or deploy a MongoDB container inside Docker using this project's Docker Compose config.

This project also has some dependency on Node.js, npm, Gulp, and Sass for managing/building styles. Currently the project includes pre-built stylesheets, but if you wish to recomplile them you will need these dependencies.

Installation

TIP

If you choose to install the webapp on your host system, follow these steps to setup the webapp. If using Docker for webapp development, you can skip this.

Python Dependencies

To manage the dependencies of the webapp, we strongly recommend using a virtualenv. You may also be interested in virtualenvwrapper.

Install Python the requirements:

pip install -r requirements.txt

Node.js Dependencies

For building the Sass, install the dependencies from package.json:

npm install

Running the webapp

TIP

This section is for running the webapp on your host system (not using Docker)

Once everything is installed, make sure your MongoDB instance is running. Here's out to launch the Dockerized MongoDB instance:

docker-compose up -d db

You must specify a config via environmental variable to launch the server. The config path is relative to the main __init__.py.

Specify config and launch in one line:

FLASK_CONFIG=../config/development.py python start.py

# Alternatively, use the npm script
npm run dev

TIP

Be sure your config is right before launching. You can the config docs here.

Contributing

Before making changes, be sure to read our Contributing Guidelines to make sure your changes stay within our recommended practices.