nprapps / electris

Elections 2012
elections2012.npr.org
Other
13 stars 3 forks source link

Copyright 2013 NPR. All rights reserved. No part of these materials may be reproduced, modified, stored in a retrieval system, or retransmitted, in any form or by any means, electronic, mechanical or otherwise, without prior written permission from NPR.

(Want to use this code? Send an email to nprapps@npr.org!)

electris

How to bootstrap this project

cd electris
npm install less universal-jst
mkvirtualenv electris
pip install -r requirements.txt

Run the project

cd www
python -m SimpleHTTPServer

Server environment

The following environment variables must be defined:

Polling data

From 2012 Associated Press FTP docs:

Cron jobs:

*/2 * * * * cd /home/ubuntu/apps/electris/repository && ../virtualenv/bin/fab production update_ap_data
* * * * * cd /home/ubuntu/apps/electris/repository && ../virtualenv/bin/fab production update_backchannel deploy_local_data backup_electris_db

Deploying from the Bitbucket backup repo

In the event Github is down, you can deploy from Bitbucket with the following:

git push bitbucket master
fab production master deploy:bitbucket

You must have had a user configured on Bitbucket for this to work!