Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.89 KB

File metadata and controls

54 lines (41 loc) · 1.89 KB

Umonya Website

Getting it up and running

Deploying your own Umonya website is simple. It can be deployed on Heroku with minimal effort. We guide you through this process below. For people familiar with Django: this is a run-of-the-mill Django project. Feel free to deploy it any way you want. Just remember to assign a value to the SECRET_KEY production setting (important info here)

Deploy on Heroku

  1. Install the Heroku Toolbelt locally. Heroku has instructions at https://toolbelt.herokuapp.com/. Follow the instructions to the end to set up an SSH key, etc.

  2. Clone the Umonya website repo.

git clone git@github.com:Umonya/website.git
  1. Enter the project directory.
cd website
  1. Create the new application.
heroku create
  1. Configure your deployment. Replace SECRET_KEY with your own value as specified here.
heroku config:set 'DJANGO_SETTINGS_MODULE=website.settings.prod' 'DJANGO_SECRET_KEY=SECRET_KEY'
  1. Upload your application. This might take a while as Heroku deploys the application.
git push heroku develop:master
  1. Create a superuser when prompted. The superuser can be used to manage your site content.
heroku run python manage.py syncdb
  1. Finish setting up the database.
heroku run python manage.py migrate
  1. Check out your newly deployed site!
heroku open

Setting SECRET_KEY

You need to generate a random 50-character secret key to use for your Umonya deployment. After doing that, use it in production by setting an environment variable called DJANGO_SECRET_KEY. Step 5 above shows how to do it using the Heroku CLI. Do NOT use SECRET_KEY in https://github.com/Umonya/website/blob/develop/website/settings/dev.py since it is visible to the public. It it only there for dev convenience.