Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.53 KB

README.md

File metadata and controls

27 lines (21 loc) · 1.53 KB

Call to Speakers Build Status

How to run this locally

  1. Install and log into the local heroku tools: https://toolbelt.heroku.com/
  2. Create a virtual environment with Python 3 (virtualenv -p python3 env) and activate it (source ./env/bin/activate)
  3. Within your virtualenv install all required dependencies (pip install -r requirements.txt)
  4. Copy default.env to .env, to set up default local environmental variables (cp default.env .env)
  1. Start a local postgres server, with passwordless login for the 'postgres' user (e.g. docker run --rm -p 5432:5432 postgres)
  2. Create a 'speakers' database on that server (psql -h localhost -p 5432 --user postgres -c "CREATE DATABASE speakers")
  3. Run the migrations (python manage.py migrate)
  4. Start the app with foreman (foreman start)
  5. Go to localhost:5000 to see the site

Clone the remote database locally

Heroku have their own article on doing this generally.

A specific example is always nice though:

heroku pg:backups capture
curl -o latest.dump `heroku pg:backups public-url`
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U postgres -d speakers latest.dump