keemy / worldcubeassociation.org

All of the code that runs on worldcubeassociation.org

Home Page:https://www.worldcubeassociation.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

worldcubeassociation.org Build Status

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

Setup

  • 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.

Run in Vagrant (easier and gets everything working)

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

  • Set up mysql with a user with username "root" with an empty password.
    1. cd WcaOnRails/
    2. bundle install && bin/yarn
    3. bin/rake db:load:development - Download and import a sanitized copy of our production database.
    4. bin/foreman start - Run rails and webpack. The server will be accessible at localhost:3000
  • bin/rspec - Run tests. Make sure that RAILS_ENV=test bin/webpack-dev-server is already running.
  • 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 cubing@worldcubeassociation.org in order to rsync secrets.
  • time ssh -A user@example.com '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 <environment>' - Where environmentis one ofstagingorproduction``

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

https://www.worldcubeassociation.org/


Languages

Language:PHP 52.6%Language:JavaScript 33.1%Language:HTML 7.4%Language:Ruby 5.9%Language:CSS 0.7%Language:Shell 0.1%Language:Python 0.1%Language:Makefile 0.0%Language:Batchfile 0.0%Language:Roff 0.0%