sfchronicle / pillars-among-the-ruins

Last Men Standing
http://projects.sfchronicle.com/2016/living-with-aids/
0 stars 0 forks source link

Last Men Standing

They outlived an epidemic, but San Francisco’s AIDS survivors are still fighting for their lives. And the city that once helped save them is ill-prepared to serve them now.

Requirements

Activate

Already have the project installed? Here's how you re-activate for development:

$ cd pillars-among-the-ruins  # change into the directory
$ workon pillars-among-the-ruins  # activate virtual environment
$ git pull  # pull down latests
$ bower install # install new frontend dependencies
$ grunt serve # start server

Installation

First time with the project? Here's how you set everything up:

$ git clone git@github.com:sfchronicle/pillars-among-the-ruins.git
$ cd pillars-among-the-ruins
$ mkvirtualenv pillars-among-the-ruins
$ pip install -r requirements.txt && npm install && bower install

Setup database

$ python createdb.py
$ python migratedb.py db init
$ python migratedb.py db migrate

Start app

$ grunt serve

Explore ORM

Interact with the SQLite database by running the shell.py file:

$ ./shell.py

Build and deployment

Create a local_settings.py file in the settings directory. Add the following env variables:

AWS_ACCESS_KEY_ID = ''
AWS_SECRET_ACCESS_KEY = ''

Add the bucket and region you plan to deploy to in production.py. Defaults to:

S3_BUCKET_NAME = 'projects.sfchronicle.com'
S3_REGION = 'us-west-1'

Now run build.py to compress assets for production and upload production files to Amazon S3

$ python build.py

Troubleshooting

If you run into a problem when installing bower at the SF Chronicle office, its due to a firewall issue. Run the following to install bower through SSL and then install bower again:

$ git config --global url."https://".insteadOf git://