-
Notifications
You must be signed in to change notification settings - Fork 2
Hosting on Heroku
Lou Franco edited this page Jun 3, 2013
·
1 revision
Follow the normal Heroku Django procedure
https://devcenter.heroku.com/articles/django
Pick a database -- ClearDB has MySQL or use the built-in PostgreSQL or anything Django supports. This repo is mostly tested on MySQL and the Hilltown Seed Network's deployment uses MySQL.
https://addons.heroku.com/cleardb
You need SMTP for the forgot password feature. Sendgrid has a free plan
heroku addons:add sendgrid:starter
Set the environment, for example:
# Set up your URL based on the dj_database_url format, here's a MySQL example
heroku config:set DATABASE_URL='mysql://user:pwd@host:port/database'
# Make up a unique Django secret key for your deployment -- keep it secret
heroku config:set SEEDNETWORK_SECRETKEY='xxxxxxxxxxxxxxxxxxxxxxxxx'
# Get these from sendgrid (or your email provider). These are examples
heroku config:set SEEDNETWORK_EMAIL_HOST='smtp.example.com'
heroku config:set SEEDNETWORK_EMAIL_PORT=848
heroku config:set SEEDNETWORK_EMAIL_HOST_USER='[email protected]'
heroku config:set SEEDNETWORK_EMAIL_HOST_PASSWORD='D(f8ds44df98dsdf'
# This is the from address on the forgot password email
heroku config:set SEEDNETWORK_DEFAULT_FROM_EMAIL='[email protected]'
The collectstatic for this app needs the environment variables during deploy, so you need to install user-env-compile in Heroku. If you don't see images or the CSS isn't loading, this is probably the reason.
heroku labs:enable user-env-compile -a seednetwork