/fitcompetition

A django based app used to track fitness challenges and display a leader board based on workout activities entered in popular fitness tracking apps.

Primary LanguageJavaScript

Fit Crown

Build Status

A django based web application used to track exercise challenges and display a leaderboard based on workout activities entered in Runkeeper, MapMyFitness or Strava.

Project Setup

  1. Clone the repository
  2. Create the virtual environment
virtualenv --no-site-packages env

or

virtualenv env -p /usr/local/bin/python --no-site-packages

or

/usr/local/lib/python2.7.10/bin/virtualenv env -p /usr/local/lib/python2.7.10/bin/python --no-site-packages
  1. Install node and lessc dependency for compiling .less files
source env/bin/activate
pip install nodeenv
nodeenv --python-virtualenv --jobs=1
npm install -g less
npm install -g yuglify
  1. Install dependencies
pip install -r requirements.pip

NOTE: When installing on linode, with limited RAM, I had to follow (these directions)[http://stackoverflow.com/questions/18334366/out-of-memory-issue-in-installing-packages-on-ubuntu-server] so a temporary swap could be used to install lxml.

  1. Copy the local_settings.py.template file to local_settings.py and modify it accordingly.

  2. Server side, install nginx or apache and configure a proxy to uwsgi or gunicorn.

  3. For development just run the management script for a test server

./manage.py runserver 0.0.0.0:8000 --insecure
  1. Set up celery and celerybeat to work with RabbitMQ.
celery -A fitcompetition worker --loglevel=INFO

Testing

There is a test suite with unit and integration tests. The suite can be run by:

./manage.py test fitcompetition/tests

Dependencies

Django is the web framework that makes rapid and clean development of this application possible.

RabbitMQ is a message broker that makes it possible to add tasks to a queue.

Celery is a simple, flexible and reliable distributed task queue. It does the heavy lifting to add tasks to the queue and prioritize the execution of them. Relies on RabbitMQ.

see requirements.pip