Skip to content
mkcode edited this page Jan 9, 2013 · 16 revisions

Local

  • Install Ruby 1.9.x - We recommend using rbenv
  • Install bundler
  • git clone https://github.com/p2pu/mechanicalmooc - or from your branch if you like to contribute
  • Set the environment variables as you like.
  • ruby mechanicalmooc/mooc.rb - will start the sinatra server

Heroku

  • git clone https://github.com/p2pu/mechanicalmooc - or from your branch if you like to contribute
  • Spin up a new instance of the heroku cedar stack
  • git push the code to your heroku instance
  • Set the environment variables as you like (necessary to send emails)

Environment Variables

Local setup

  • in your terminal run export ADMIN_USER=admin
  • you can verify what's set by running env
  • if you to get fancy and reuse them across terminal sessions, add the export to your .bashrc file or equivalent

Heroku setup

  • All heroku commands must be run from the project directory
  • run heroku config:add ADMIN_USER=admin
  • run heroku config to verify the variables

Note that you may test or run the mooc without setting the MAILGUN_API_KEY, but it is needed to actually send the emails.

      ADMIN_USER:                The username for the admin side of the web server ( /admin ) 
      ADMIN_PASS:                The password for the admin side
      MAILGUN_API_KEY:           Your Mailgun API Key
      MMOOC_CONFIRM_SALT:        Any random string. Used to obfuscate the confirm hashes.

Mailgun API Key

In order to send emails, you must obtain and set the mailgun API key. First, you need sign up with mailgun. Then, you will find the api key in the 'My Account' tab in the control panel.

Clone this wiki locally