Europeana Collections portal as a Rails + Blacklight application.
Branch: develop
Clone or download
rwd Merge pull request #1224 from europeana/bug/EC-3363-isShownAt-thumbnails
Remove edm:isShownAt non-displayability logic
Latest commit 8751ae6 Feb 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Remove redundant check and method Feb 19, 2019
bin Rewrite benchmark script in Ruby Feb 1, 2019
config Use multi_json with yajl (#1214) Jan 28, 2019
db Remove G+ db seed Jan 18, 2019
deploy/ibm-cloud/config Merge chore/EC-2999-docker-compose PR #1141 Docker Sep 14, 2018
lib Add status monitoring action Jan 11, 2019
log Initial proof-of-concept commit. Nov 25, 2014
spec Remove edm:isShownAt non-displayability logic Feb 19, 2019
vendor/assets Initial proof-of-concept commit. Nov 25, 2014
.cfignore IBM deploy manually configurable postgres/redis connetions May 29, 2018
.codeclimate.yml Install bundler-audit May 11, 2018
.dockerignore Merge chore/EC-2999-docker-compose PR #1141 Docker Sep 14, 2018
.env.example Feature toggle for hit highlighting Jan 31, 2019
.gitattributes Line ending fix. Mar 2, 2015
.gitignore Merge chore/EC-2999-docker-compose PR #1141 Docker Sep 14, 2018
.rspec Re #188: Clean out dev/debug code Jun 30, 2015
.rubocop.yml Add Rubocop config file. Jul 2, 2015
.ruby-style.yml Rubocop: target Ruby 2.5 Aug 1, 2018
.ruby-version Upgrade Ruby to 2.6.0 Jan 23, 2019
.travis.yml Merge branch 'develop' into chore/EC-3296-ruby-2.6 Jan 25, 2019
.yardopts Move yardoc documentation to yardoc dir Jun 23, 2016
Dockerfile Update Ruby in Travis and Docker Jan 23, 2019
Gemfile use blacklight from europeana github Jan 28, 2019
Gemfile.lock Bump styleguide Feb 5, 2019 Add EUPL 1.1 license. Feb 25, 2015
Procfile verbose puma startup Aug 11, 2017 Not a Bash script Feb 1, 2019
Rakefile Rubocop auto-correct Mar 28, 2018 Rubocop auto-correct Mar 28, 2018

Europeana Portal with Collections

Build Status Security Maintainability Test Coverage

Europeana Portal with Collections as a Rails + Blacklight application.



  • Download the source code
  • Run bundle install

Quick Start with Docker

  1. Install the gem bundle: bundle install
  2. Generate Docker configuration files: bundle exec bin/portal dockerize development You will be prompted to enter your Europeana API key. For another environment than development, e.g. profiling, use its name in this command.
  3. Bring it up: docker-compose up
  4. Setup the database: bundle exec rake db:setup
  5. Start the app: bundle exec foreman start
  6. Open the app: http://localhost:3000/

Test environment

To add a test environment to Docker:

  1. Generate Docker configuration files: bundle exec bin/portal dockerize test You will be prompted to enter your Europeana API key.
  2. Setup the database: RAILS_ENV=test bundle exec rake db:setup


Environment variables

Most configuration settings are read from environment variables, described in detail in .env.example.

In development and test environments, these can be placed in a .env file in your application root.


  1. Create a PostgreSQL database, and set its URL in the environment variable DATABASE_URL.
  2. Initialize the database: bundle exec rake db:setup


Create a test database and initialise with bundle exec rake db:test:prepare

Use the command bundle exec rspec from the project root to run the RSpec tests.

The integration tests use Firefox in headless mode.


A script is included to run various benchmarks from derailed_benchmarks:

  • Size of bundled gems in production environment
  • Memory allocation and IPS of search results and record pages

First ensure that you have initialised a profiling environment, and have services running, e.g. by following the "Quick Start with Docker" instructions above.

Run benchmarks with: bin/benchmark

File storage

Files are stored using Paperclip. To configure it, create config/paperclip.yml with any options required to configure your file storage system, e.g. fog.

In a development environment, copy the provided sample from deploy/development/config/paperclip.yml.

Cache store

If the file config/redis.yml exists, the application will use Redis as a cache store.

Site Administration/Users

Site content and some other "configuration" is managed through the cms. The cms by default is available at [hostname]/portal/en/cms/

To login and perform certain actions, an admin user account is required. To set up an admin user, run:

bundle exec rake user:create PASSWORD=REPLACE ROLE=admin

Example configurations for different environments are in deploy/.


The application consists of three components:

  1. Web: bundle exec puma -C config/puma.rb

By default, Puma will listen on the port defined in the PORT environment variable, or 3000 by default. 2. Worker: bundle exec rake jobs:work 3. Scheduler: bundle exec clockwork lib/clock.rb

The commands for these components are declared in the Procfile.

In production, if your environment supports it you can use this Procfile. Otherwise, you will need to configure deployment scripts to run each process.

In development, you can launch the application with all processes using foreman: foreman start


Follow the Europeana Ruby development guide.


Licensed under the EUPL V.1.1.

For full details, see