- App is hosted on [email protected]:p2pu-discourse.git
- Clone and update as you see fit.
heroku config
will tell you alot of good info about the app- The instructions used are in the later part of this document.
- We are using mandrill www.mandrill.com for sending emails. They give us 12,000 emails a month for free. We might not need more than this. Check the tech accounts Doc for login info.
- The clockwork 'error' in the admin portion is not actually an error. We are using the heroku scheduler instead.
This is running for free!
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)
git clone git://github.com/swrobel/discourse-heroku.git discourse
heroku apps:create [YOUR_APP_NAME]
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.
rake secret
- copy the output
heroku config:add SECRET_TOKEN=<paste here>
- copy your API key from your Heroku account
heroku config:add HEROKU_API_KEY=<paste here>
heroku config:add SMTP_SERVER=smtp.mandrillapp.com SMTP_PORT=587 HEROKU_APP=<heroku_app_name>
heroku config:add RUBY_GC_MALLOC_LIMIT=90000000
(per Discourse team's recommendation)
git push heroku master
heroku run rake db:migrate
heroku run rake db:seed_fu
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
Confirmation emails sent from your application will refer to an EC2 instance for the host name by default, which won't work.
To fix this, enter the admin section by visiting /admin. You may need to create an account and set its admin flag to be true.
Next, click 'Site Settings', and enter your-app-name.herokuapp.com
in the force_hostname
field.
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
- Check the box for
enable_s3_uploads
- Paste your bucket into
s3_upload_bucket
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.
git pull --force
git push --force heroku master