Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 1.96 KB

CONTRIBUTING.md

File metadata and controls

62 lines (39 loc) · 1.96 KB

Development Environment

These steps assume you have followed PRX's Local Development Environment guide, which will install a number of dependencies. You can fulfill those dependencies however you'd like, but you may need alter the procedures in this document to match your environment.

Environment Setup

  1. Clone the project repository:

    git clone https://github.com/PRX/dovetail-insights.git
    cd dovetail-insights
  2. Install Ruby and other runtimes:

    asdf install
  3. Configure a dedicated local hostname in puma-dev:

    echo 4203 > ~/.puma-dev/insights.dovetail.prx

    You will access the local development server at http://insights.dovetail.prx.test or https://insights.dovetail.prx.test.

  4. Configure BigQuery credentials

    Create a file called config/bigquery-keyfile.json, and add JSON client credentials for Google Cloud that have access to the BigQuery database you want to use. If you're not sure which credentials to use or where to get them, please ask around.

  5. Configure local environment variables.

    Make a copy of the example file.

    cp env-example .env

    Set BIGQUERY_PROJECT to the Google Cloud project name that contains the BigQuery database you want to use. Set BIGQUERY_CREDENTIALS to the path of a file that contains BigQuery API credentials from above. (i.e., ./config/bigquery-keyfile.json)

  6. Install Ruby gems.

    bundle install
  7. Install npm packages.

    yarn install

Running the Application

Once your environment has been setup, you should be able to start the Rails server and load the site in a browser:

bin/rails s

The site will be available at insights.dovetail.prx.test.