This repository contains the beta-stage publishing component of data.gov.uk
You will need to install the following for development.
- rbenv or similar to manage ruby versions
- bundler to manage gems
- elasticsearch search engine
- postgresql database
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.ckan_v26_base_url = "http://localhost:4000"
Install dependencies, initialise the database and search index:
Start the web server:
Then navigate to
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:
See here for all of our Architecture Decision Records.