Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ScotterC
Last active February 9, 2016 09:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ScotterC/6703521 to your computer and use it in GitHub Desktop.
Save ScotterC/6703521 to your computer and use it in GitHub Desktop.
Discourse on Rubber

Short Version:

  • git clone Discourse
  • gem install rubber
  • rubber vulcanize discourse
  • Edit rubber.yml
  • cap rubber:create_staging and you've got a fully functioning discourse site

###Long Version:

  • git clone https://github.com/discourse/discourse.git
  • cd discourse
  • echo "gem 'rubber', github: 'ScotterC/rubber', branch: 'discourse'" >> Gemfile
  • bundle
  • rubber vulcanize discourse, reply with n to overwrite questions
  • Edit config/rubber/rubber.yml
    • app_name: discourse
    • domain: discourse.com
    • If AWS:
      • access_key: AWS_KEY
      • secret_access_key: AWS_SECRET
      • account: AWS_ACCOUNT
      • key_name and key_file # => Requirse EC2 keypair
      • image_type: m1.small
      • staging_roles: "web,app,db:primary=true,redis_master,sidekiq,discourse"
  • Edit config/rubber/rubber-ruby.yml
    • ruby_version: 2.0.0-p247
  • Edit Gemfile
    • remove last 'rubber' line # => won't be necessary once template is merged
  • bundle
  • cd config/
    • cp redis.yml.sample redis.yml
    • cp environments/production.rb.sample environments/production.rb
    • cd ../
  • cap rubber:create_staging
    • Prompts:
      • hit return for hostname
      • hit return for roles if they mimic above staging roles
      • computer password for access to /etc/hosts
  • if it fails with vboxadd: unrecognized service. Make sure you're not using Capistrano 2.15.15. Comment out reinstall_virtualbox_additions task in rubber/deploy-setup.rb and run cap rubber:bootstrap && cap deploy:migrations
  • When finished. In your browser production.discourse.com should be a discourse site
  • Add DNS to make it public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment