Skip to content

gagou9/worldcubeassociation.org

 
 

Repository files navigation

worldcubeassociation.org Build Status

This repository contains all of the code that runs on worldcubeassociation.org.

Setup

  • Install Vagrant, which requires VirtualBox.
  • git clone https://github.com/thewca/worldcubeassociation.org - Clone this repo! (And navigate into it, cd worldcubeassociation.org)
  • (cd WcaOnRails; bundle install) && pre-commit install - Set up git pre-commit hook. Optional, but very useful.
  • echo "{}" > WcaOnRails/app/views/regulations/wca-regulations.json - Set up an empty wca-regulations.json file to ensure api tests pass. Alternatively, you can build the Regulations locally by following this guide.

Run in Vagrant (easier and gets everything working)

  • vagrant up all - Once the VM finishes initializing (which can take some time), the website will be accessible at http://localhost:2331.
  • All emails will be accessible at http://localhost:2332.
  • Please take a look at this wiki page for more detailed informations about the application's internals.

Run locally ruby (lightweight, but only run the rails portions of the site)

  • We don't support development with sqlite3, you'll need to set up MySQL.
  • Mailcatcher is a good tool for catching emails in development.

Provision New VM

  • Provisioning relies upon SSH agent forwarding, so make sure you've set up an SSH key for [email protected] in order to rsync secrets.
  • time ssh -A [email protected] 'sudo wget https://raw.githubusercontent.com/thewca/worldcubeassociation.org/master/scripts/wca-bootstrap.sh -O /tmp/wca-bootstrap.sh && sudo -E bash /tmp/wca-bootstrap.sh staging/production'

Deploy

See this wiki.

Secrets

  • Production secrets are stored in an encrypted chef data bag at chef/data_bags/secrets/production.json.
    • Show secrets: knife data bag show secrets production -c /etc/chef/solo.rb --secret-file secrets/my_secret_key
    • Edit secrets: knife data bag edit secrets production -c /etc/chef/solo.rb --secret-file secrets/my_secret_key

About

All of the code that runs on worldcubeassociation.org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 65.9%
  • JavaScript 21.5%
  • HTML 8.0%
  • Ruby 3.0%
  • CSS 1.2%
  • PLpgSQL 0.2%
  • Other 0.2%