Europeana Portal with Collections
Europeana Portal with Collections as a Rails + Blacklight application.
Licensed under the EUPL V.1.1.
For full details, see LICENSE.md.
- Ruby 2 (latest stable version recommended)
- A key for the Europeana REST API, available from: http://labs.europeana.eu/api/registration/
- PostgreSQL 9.4+
- Download the source code
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.
- Create a PostgreSQL database, and set its URL in the environment variable
- 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
The integration tests use the poltergeist gem which has an external dependency on PhantomJS. http://phantomjs.org/download.html
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.
If the file config/redis.yml exists, the application will use Redis as a cache store.
Site content and some other "configuration" is managed through the cms.
The cms by default is available at
To login and perform certain actions, an admin user account is required. To set up an admin user, run:
bundle exec rake user:create EMAILemail@example.com PASSWORD=REPLACE ROLE=admin
Example configurations for different environments are in deploy/.
The application consists of three components:
bundle exec puma -C config/puma.rb
By default, Puma will listen on the port defined in the
variable, or 3000 by default.
bundle exec rake jobs:work
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:
Follow the Europeana Ruby development guide.