Giter Club home page Giter Club logo

discourse-heroku's Introduction

Setting up Discourse on Heroku

Last updated for version 0.8.5

If you follow this guide, you should be able to run fully-functional Discourse on Heroku for free (up to a point)

view original README

Clone this repo

git clone git://github.com/swrobel/discourse-heroku.git discourse

Install addons

heroku addons:add heroku-postgresql:dev --version=9.2

might as well use Postgres 9.2 although discourse will work with 9.1, which is Heroku's default at time of writing

heroku addons:add mandrill:starter rediscloud:20 memcachier:dev scheduler newrelic:standard

mandrill is for email delivery, although the free mailgun or sendgrid plans will work as well (just update the appropriate config vars). memcachier is for rails cache storage.

heroku labs:enable user-env-compile

This will enable asset precompilation to complete successfully.

Setup config vars

  1. rake secret
  2. copy the output
  3. heroku config:add SECRET_TOKEN=<paste here>
  4. copy your API key from your Heroku account
  5. heroku config:add HEROKU_API_KEY=<paste here>
  6. heroku config:add SMTP_SERVER=smtp.mandrillapp.com SMTP_PORT=587 HEROKU_APP=<heroku_app_name>
  7. heroku config:add RUBY_GC_MALLOC_LIMIT=90000000 (per Discourse team's recommendation)

Push the code, migrate, seed

  1. git push heroku master
  2. heroku run rake db:migrate
  3. heroku run rake db:seed_fu

Setup scheduler tasks

heroku addons:open scheduler

Set up the scheduled tasks as follows:

    TASK                       | FREQUENCY
    --------------------------------------------

    rake enqueue_digest_emails |  Daily               

    rake category_stats        | Daily              

    rake periodical_updates    | Every 10 minutes
                               
    rake version_check         | Daily          

Setup S3 storage for uploads (optional)

This is the one non-free area. You can get S3 storage for free if you fall under the free tier for 12 months, but you may have to pay for S3 storage. This should be fairly cheap anyway, all things considered. Run the following:

heroku config:add AWS_ACCESS_KEY_ID=<your_access_key> AWS_SECRET_ACCESS_KEY=<your_secret_key>

navigate to http://<your-app>.herokuapp.com/admin/site_settings

  1. Check the box for enable_s3_uploads
  2. Paste your bucket into s3_upload_bucket

Keeping up to date (optional)

I will try to roughly update this repo every 2 weeks, or when there's a new Discourse point release (although at this point versioning is pretty arbitrary). I'm rebasing rather than merging to maintain a clean tree, so you're going to have to force-pull and force-push to heroku.

  1. git pull --force
  2. git push --force heroku master

discourse-heroku's People

Contributors

alxndr avatar arikfr avatar balpha avatar blowmage avatar callahad avatar coding-horror avatar danneu avatar eviltrout avatar goshacmd avatar hanzo55 avatar jaimeiniesta avatar jeremybanks avatar kidoman avatar kirushik avatar kubamracek avatar merugear avatar mikl avatar nicksahler avatar nlalonde avatar nverba avatar potthast avatar samsaffron avatar shahor avatar swrobel avatar tangramor avatar tms avatar tonytonyjan avatar wojciechka avatar xdite avatar zogstrip avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.