Coder Social home page Coder Social logo

whitehall's Introduction

Whitehall App

"Whitehall" is the code name for the Inside Government project, which aims to bring Government departments online in a consistent and user-friendly manner.

Getting set-up locally

Pre-requisites

  • Ruby >= 1.9.2 (we have run it successfully against 1.9.2-p290 and 1.9.3-p0)
  • Rubygems and Bundler
  • Mysql
  • Imagemagick and Ghostscript (for generating thumbnails of uploaded PDFs)
  • PhantomJS (for running the Javascript tests)

Creating the mysql user

The database.yml for this project is checked into source control so you'll need a local user with credentials that match those in database.yml.

mysql> grant all on `whitehall\_%`.* to whitehall@localhost identified by 'whitehall';

Preparing the app

$ cd /path/to/whitehall
$ bundle install
$ bundle exec rake db:create:all
$ bundle exec rake db:schema:load

Getting a copy of live data

There's a capistrano task which will download a dump of the mysql database and load it on your local machine:

cap db:import

To use it, go to the whitehall-admin directory in alphagov-deployment and then do:

$ SSH_USER=$USER DEPLOY_TO=production bundle exec cap db:import

this will load data from production into your local database.

Running the server locally

$ script/rails s

Creating new users in Production

New users will need a sign-on-o-tron account before they can access whitehall in production. You can create new sign-on-o-tron accounts with the capistrano task in alphagov-deployment/sign-on-o-tron. This will email the new user and prompt them to create their account.

Using local assets

  • Set STATIC_DEV to point to your local instance of the static app when running the whitehall app e.g. STATIC_DEV=http://static.dev

Getting search running locally

The Whitehall app relies on Rummager for document indexing, and the Gov.UK frontend application to serve results.

To use a local copy of Rummager you'll need to:

  • elasticsearch;
  • Set the environment variable RUMMAGER_HOST to point to the local instance of Rummager (e.g. export RUMMAGER_HOST=http://rummager.dev in .powrc);
  • You'll also need to set RUMMAGER_HOST when using the Rummager rake tasks e.g. RUMMAGER_HOST=http://rummager.dev rake rummager:index;
  • Run the rummager and frontend applications to view results. You just need the rummager app to index results.

Specifying a different endpoint for the GDS Content API

Whitehall uses the GDS Content API to serve categorisation for Detailed Guidance.

You need to set the following environment variables :-

CONTENT_API_ENDPOINT_URL # e.g. https://contentapi.preview.alphagov.co.uk
CONTENT_API_USERNAME
CONTENT_API_PASSWORD

whitehall's People

Contributors

alext avatar alextea avatar bradwright avatar chrisroos avatar chrisroos-and-floehopper avatar chrisroos-and-jasoncale avatar chrisroos-and-lazyatom avatar chrisroos-and-tomafro avatar daibach avatar dhwthompson avatar edds avatar floehopper avatar floehopper-and-jasoncale avatar floehopper-and-tomafro avatar heathd avatar jamiecobbett avatar jasoncale-and-tomafro avatar jordanhatch avatar kushalp avatar lazyatom avatar lazyatom-and-floehopper avatar lazyatom-and-jasoncale avatar lazyatom-and-tomafro avatar leereilly avatar markhurrell avatar phae avatar threedaymonk avatar tomafro avatar tombye avatar tomstuart 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.