Skip to content

Commit

Permalink
Heroku setup documented and managed via env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
txels committed Mar 5, 2015
1 parent 9f8b701 commit 46051a7
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/heroku-bootstrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Bootstrapping ployst in Heroku

## In Github

Create an application entry in Github.

https://github.com/settings/applications/

Callback URL: http://ployst.com/github/oauth-confirmed/

Copy client ID and client secret to use as `GITHUB_CLIENT_ID` and
`GITHUB_CLIENT_SECRET`.

## In ployst

Go to admin and create an API token, label github.
Copy the token to use as `GITHUB_CORE_API_TOKEN`

## In Heroku

Go to ployst settings page:

https://dashboard.heroku.com/apps/ployst/settings

Reveal config vars. Add/set values for the following:

GITHUB_CORE_API_TOKEN
GITHUB_CLIENT_ID
GITHUB_CLIENT_SECRET

All these can also be set via `heroku config`.
12 changes: 12 additions & 0 deletions ployst/settings/heroku.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from os import getenv

from .base import * # noqa


# Parse database configuration from $DATABASE_URL
import dj_database_url
DATABASES['default'] = dj_database_url.config()
Expand All @@ -17,3 +20,12 @@
# http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html

DEBUG = True

CORE_API_ADDRESS = "http://localhost:80/"

# The API token created in admin for 'github'
GITHUB_CORE_API_TOKEN = getenv('GITHUB_CORE_API_TOKEN')

# The application OAUTH settings from github.com/ applications
GITHUB_CLIENT_ID = getenv('GITHUB_CLIENT_ID')
GITHUB_CLIENT_SECRET = getenv('GITHUB_CLIENT_SECRET')

0 comments on commit 46051a7

Please sign in to comment.