Skip to content

digihum/omeka-project-mappingwomenssuffrage.org.uk

Repository files navigation

Omeka Classic - Platform

This repository is a template for Omeka Classic projects forked from the version created for Omeka S by James Tripp. Here you will find files enabling you to run a local instance and files used in our CI/CD pipelines to build automatically build a remote installation.

Project Details

RSE: [RSE NAME] Project contact: [CONTACT NAME] Teams File Location: [Add link here]

Local Development

  1. We assume you have docker-compose, docker and composer installed in WSL2. There are scripts available for this here.

  2. Edit the config/project-configuration.yml file to set your environment. The different environment configurations are outlined in this document.

  3. Ensure that any data you need to load into the database is in a single .sql file and is located at db/omeka.sql. The database container will import these files when built. Import errors may not be shown in the Docker output so please do make sure the data is correct.

  4. Modify the composer.json file to specify the plugins, theme and Omeka version used in your project. Ensure that packages are defined, version and location of the file should be included. A common issue is for the installer-name to not match the name of the Plugin.php which means it will not be detected as a valid plugin. Where there are multiple versions of the same package, it's important that the versions are in reverse order (highest at the top). The below shows the entries for the Ldap plugin:

        {
            "type": "package",
            "package": {
                "name": "bgsu-lits/ldap",
                "version": "0.4.0",
                "type": "omeka-plugin",
                "source": {
                    "url": "https://github.com/BGSU-LITS/LDAP-Plugin.git",
                    "type": "git",
                    "reference": "0.4.0"
                },
                "extra": {
                    "installer-name": "Ldap"
                }
            }
            
        },
  1. In the composer file, ensure your dependencies are required in the require section of the JSON file as shown in the example below. The Omeka S version should also be included.
    "require": {
        "omeka/omeka": "3.1.1",
        "bgsu-lits/ldap": "0.4.0"
    }
  1. There is now enough specification that you can build the docker local install. To start the local development run the build-and-deploy.sh script with the variable "test".
chmod +x scripts/build-and-deploy.sh
scripts/build-and-deploy.sh -b test

At the moment, only the test environment is implemented.

This script will do the following:

  • create the omeka S filesystem in /build/html
  • create the environment configuration files (currently build/html/.htaccess, build/html/config/database.ini, build/html/config/local.config.php)
  • starts docker compose
  • imports the database dump in db/omeka.sql into the database

Note Please wait until the database has imported all the data and shows that 'mysqld: ready for connects.' like the below.

db_1         | 2022-11-30T16:19:54.491377Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1         | 2022-11-30T16:19:54.503270Z 0 [Note] Event Scheduler: Loaded 0 events
db_1         | 2022-11-30T16:19:54.505373Z 0 [Note] mysqld: ready for connections.
db_1         | Version: '5.7.40'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)

If you try to connect before the database is initialised then the install script starts (despite data loading into the database for our install). You will hit an error and be unable to use Omeka S. If this happens then run docker-compose down and rerun the build-and-deploy.sh script.

Accessing Omeka

  • You can access the omeka web interface by going to http://127.0.0.1
  • The phpmyadmin interface is accessed via http://127.0.0.1:8080. To log in use the database credentials mentioned below.

The credentials for the test environment are below.

Test environment variables

If you set the environment to "test" via the argument to the build-and-deploy.sh script then the following variables are set.

database username: test database password: test database: db1 database host: db

Development notes

Note: Clone this repo into a directory within the WSL partition (such as /home/james) and not in Windows (/mnt/c/...). The composer install will be slow or completely file due to permissions issues if run in a mounted filesystem.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages