Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

alphagov/datagovuk_publish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

53cbfb7 · Jun 12, 2019
May 14, 2019
Jun 21, 2018
May 14, 2019
Oct 12, 2018
Jun 22, 2018
Jun 11, 2019
May 31, 2017
May 31, 2017
May 24, 2018
Jun 11, 2019
Oct 13, 2017
Nov 22, 2017
Apr 23, 2018
May 10, 2019
Aug 21, 2018
Jul 20, 2017
Mar 21, 2019
Mar 21, 2019
Jun 5, 2019
Jun 5, 2019
May 4, 2018
Oct 25, 2018
Apr 27, 2018
May 17, 2018
May 31, 2017
Jun 12, 2019
Jun 12, 2019
Jun 12, 2019
Jun 12, 2019

Repository files navigation

Code Climate Test Coverage

data.gov.uk Publish

This repository contains the beta-stage publishing component of data.gov.uk

Prerequisites

You will need to install the following for development.

Most of these can be installed with Homebrew on a Mac.

Developing on a Mac with a local CKAN installation

Install all the requirements for this app using Homebrew:

## PostgreSQL
brew install postgresql

## Redis
brew install redis

## Elasticsearch
brew tap caskroom/versions
brew cask install java8
brew install elasticsearch

Start the services on your machine:

brew services start postgresql
brew services start elasticsearch
brew services start redis

Configure the base URL of your local CKAN in ./config/environments/development.rb:

config.ckan_v26_base_url = "http://localhost:4000"

Install dependencies, initialise the database and search index:

bin/setup

Start the web server:

rails s

Then navigate to http://localhost:3000.

To sync data from CKAN, set up the workers, then run Sidekiq to process the queue:

bin/rails runner CKAN::V26::CKANOrgSyncWorker.new.perform
bin/rails runner CKAN::V26::PackageSyncWorker.new.perform
bundle exec sidekiq

To completely clear the database, execute the following:

bin/rails db:drop db:setup

To re-index Elasticsearch based on the current database contents, run:

bin/rails search:reindex

Documentation

See here for all of our Architecture Decision Records.