Skip to content
Global Media Monitoring Project
Python HTML Other
Branch: master
Clone or download
Pull request Compare This branch is 10 commits ahead of OpenUpSA:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
forms
gmmp
locale
reports
static
.gitignore
LICENSE
Procfile
README.md
historical.json
manage.py
requirements.txt
runtime.txt

README.md

Installation

For ubuntu

sudo apt-get install libpq-dev
sudo apt-get install libpython-dev

Install a postgres db if you don't already have one

sudo apt-get install postgresql postgresql-contrib
sudo /etc/init.d/postgresql start

Install the Heroku toolbelt for deployment, database backup, etc

wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh

Grab a backup of the database.

pg_dump <Database URL> > /tmp/dump # You can get the url from the Heroku config. This seems to take a long time
sudo su - postgres
createuser gmmp -W # set password to gmmp
createuser c4saadmin -W # needed to prevent error in dump file
createdb gmmp --owner gmmp
psql U gmmp <  /tmp/dump # might get an error complaining the code4saadmin doesn't exist

You'll need to install postgres, psycopg as your development user

git clone https://github.com/Code4SA/gmmp.git
cd gmmp
mkdir env
virtualenv env
source env/bin/activate 
pip install -r requirements.txt
You can’t perform that action at this time.