Repository for the Chopin Online portal.
Chopin Online comprises three major resources dedicated to the music of Fryderyk Chopin and developed over two decades by John Rink, Christophe Grabowski and other experts working in collaboration with leading libraries and private collectors from around the world. The projects were developed first at the Department of Digital Humanities and then King's Digital Lab led by Elliott Hall, Miguel Vieira, and Ginestra Ferraro. For full details, see the participants section of the Chopin online website.
- Django 3.2.5
- Javascript: JQuery for the UI. OpenLayers and Openseadragon are used to display the manuscript images, and the bar level annotations in OCVE.
- Postgres 9.6
- django-haystack 3.1.1
- Elasticsearch 7.1.
- nginx-proxy: This is the primary entry point for the stack, running on 80. It automatically builds a proxy to other containers.
- django 3.2: The main container for the project (see more detailed description below.)
- nginx: This is the static data container, serving Django's static content.
- db: The database container for Django above, running a legacy version of Postgres (9.6).
- elasticsearch 7.10: The indexing container, used by Haystack 3.2.1. (Pre-migration, Haystack 2 was using Solr 6.)
The compose file will look for deployment variables in a compose/.env file. Below is a sample file:
# Django
# ------------------------------------------------------------------------------
DJANGO_READ_DOT_ENV_FILE=True
DJANGO_ALLOWED_HOSTS = www.chopinonline.ac.uk, chopinonline.ac.uk,localhost,127.0.0.1
DJANGO_SECRET_KEY = ''
# PostgreSQL
# ------------------------------------------------------------------------------
POSTGRES_HOST=db
POSTGRES_PORT=5432
POSTGRES_DATABASE=app_ocve4_liv
POSTGRES_USER=
POSTGRES_PASSWORD=
# Elasticsearch
# ------------------------------------------------------------------------------
discovery.type=single-node
Fill in the database credentials and Django variables. If deploying via a CI pipeline such as Gitlab, this file will need to be included in its variables (in the KDL setup, we encode this in base64 and add it to the CI/CD variables in the repository settings.)
- Enter the project directory:
cd chopin-django - Build and run the docker containers
docker compose -f compose/docker-compose.yml up -d --build - Copy sql data into the db container and ingest it via the command line if necessary.
- Haystack indexes are not buit during the build process. To build the Haystack search indexes, first log into the django container
docker compose -f compose/docker-compose.yml exec django bash. Then run the update_index management command:python manage.py update_index