A django based web application used to track exercise challenges and display a leaderboard based on workout activities entered in Runkeeper, MapMyFitness or Strava.
- Clone the repository
- 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
- 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
- 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.
-
Copy the local_settings.py.template file to local_settings.py and modify it accordingly.
-
Server side, install nginx or apache and configure a proxy to uwsgi or gunicorn.
-
For development just run the management script for a test server
./manage.py runserver 0.0.0.0:8000 --insecure
- Set up celery and celerybeat to work with RabbitMQ.
celery -A fitcompetition worker --loglevel=INFO
There is a test suite with unit and integration tests. The suite can be run by:
./manage.py test fitcompetition/tests
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