Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 2.3 KB

HEROKU.md

File metadata and controls

65 lines (51 loc) · 2.3 KB

Deployment to Heroku

Heroku account setup:

  • Create a heroku account
  • Create new heroku app
  • Install heroku tool-belt

Setup Twitter API for app:

(Optional: use as many login methods as you like)

  • Create new app on www.dev.twitter.com
  • Set callback url to be https://[APP_NAME].herokuapp.com/twitter-callback
  • Get consumer API key and secret

Stonecutter set up:

(Optional: use as many login methods as you like)

  • Deploy a Stonecutter instance, as found here
  • Login as an admin
  • Navigate to Apps page
  • Add an app for your Objective8 instance
  • Get client ID and secret, as generated by Stonecutter

Facebook set up:

(Optional: use as many login methods as you like)

  • Create new website app here
  • Navigate to settings > advanced > Client OAuth Settings > Valid OAuth redirect URIs
  • Enter http://[APP_NAME].herokuapp.com/facebook-callback
  • Save changes
  • Take the app out of development mode
  • Get consumer API key and secret

Coracle set up:

(Optional: needed if deploying alongside Mooncake)

  • Deploy Coracle instance, as found here

Local heroku configuration:

  • Clone the repository: git clone https://github.com/d-cent/objective8.git

  • Log in to your Heroku account: heroku login

  • Add heroku remote: heroku git:remote -a [APP_NAME]

  • Add heroku postgres add-on: heroku addons:create heroku-postgresql:hobby-dev

  • Set buildpacks:

      heroku buildpacks:set heroku/nodejs
      heroku buildpacks:add heroku/clojure
    
  • Set Config Vars on Heroku

    • ADMINS = twitter-[twitter id of admin user] facebook-[facebook id of admin user]
    • BASE_URI = [app uri: [APP_NAME].herokuapp.com]
    • TWITTER_CONSUMER_SECRET_TOKEN = [twitter consumer api secret]
    • TWITTER_CONSUMER_TOKEN = [twitter consumer api key]
    • STONECUTTER_AUTH_URL = [Stonecutter URL]
    • STONECUTTER_CLIENT_ID = [Stonecutter client ID]
    • STONECUTTER_CLIENT_SECRET = [Stonecutter client secret]
    • FACEBOOK_CLIENT_ID = [the Facebook app id]
    • FACEBOOK_CLIENT_SECRET = [the Facebook app secret]
    • API_BEARER_NAME = [anything]
    • API_BEARER_TOKEN = [anything]
    • CORACLE_URI = [Coracle URL]
    • CORACLE_BEARER_TOKEN = [Coracle bearer token]
  • Push to Heroku