http://ef-founder-school-people.herokuapp.com/
git clone git@github.com:joinEF/people.git
cd people
# Create and enter virtual environment.
virtualenv venv
source venv/bin/activate
# Install Python dependancies.
pip install -r requirements.txt
# Link up to Heroku app.
heroku git:remote --app ef-founder-school-people
# Set up local configuration.
# Set local development specific variables and then
# fill in the rest from remote Heroku config.
echo DATABASE_URL=postgres://$USER@localhost/people > .env
echo DJANGO_DEBUG=true >> .env
echo PORT=8000 >> .env
heroku config:pull
for variable in `cat .env`; do; export $variable; done;
unset SEGMENT_IO_API_WRITE_KEY
-
Either 2. a. or 2. b.
-
a. Pull database from remote to local.
heroku pg:pull DATABASE_URL people
- b. Create database from scratch.
createdb people
python manage.py syncdb --noinput
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver 0.0.0.0:$PORT
open http://127.0.0.1:$PORT
heroku config:remove DJANGO_DEBUG
heroku config:set DJANGO_SECRET_KEY=
git push heroku master
Django on Heroku https://devcenter.heroku.com/articles/getting-started-with-django
Heroku Config https://devcenter.heroku.com/articles/config-vars
Getting started as a collaborator https://devcenter.heroku.com/articles/collab