This repository hosts a Dockerfile for easily deploying Omeka S with Docker. The core idea of these images is that they take care only of Omeka S core: you will need to take care of the config files, modules, and themes.
In order to update, you normally just need to change the tag of the relevant image if you're taking this from Docker Hub, or update the relevant line in the Dockerfile if you build this image yourself.
You can configure the database connection using environment variables instead of editing the database.ini file directly:
Variable | Description | Default |
---|---|---|
MYSQL_DATABASE_USER | Database username | |
MYSQL_DATABASE_PASSWORD | Database password | |
MYSQL_DATABASE_NAME | Database name | |
MYSQL_DATABASE_HOST | Database host | |
MYSQL_DATABASE_PORT | Database port (optional) | 3306 |
MYSQL_DATABASE_SOCKET | Database unix socket path (optional) | |
MYSQL_DATABASE_LOG_PATH | Database log path (optional) | |
APPLICATION_ENV | App mode: development or production | production |
OMEKA_THEMES | List of theme zip URLs | |
OMEKA_MODULES | List of module zip URLs | |
PHP_MEMORY_LIMIT | PHP memory limit (e.g. 512M) | 512M |
PHP_UPLOAD_MAX_FILESIZE | Max upload file size (e.g. 64M) | 128M |
PHP_POST_MAX_SIZE | Max post size (e.g. 64M) | 128M |
PHP_MAX_EXECUTION_TIME | Max script execution time (seconds) | 300 |
Recent versions are available directly from Docker Hub https://hub.docker.com/r/giocomai/omeka-s-docker
Check out the relevant tags. At this stage, the latest Omeka S Omeka S 4.1.1 is kept reasonably updated.
In this repository, you will find also a "docker-compose_traefik_example.yml". Adjust the lines where you find "FIXME" and, after adjusting relevant details in the database.ini
file you should be good to go with a deployed Omeka S.
In your omekas
volume, you will have a config
folder, and inside it a database.ini
file.
Its contents should be something along the lines of:
user = "secretstring"
password = "secretpassword"
dbname = "secretstring"
host = "omekas_db"
(obviously, fix these lines with the values you used in your docker-compose.yml)
If you use this in deployment, you'll probably want to have a look also at the local.config.php
file in the same folder.
You will also find a "docker-compose_local_example.yml". Adjust the lines where you find "FIXME", update your database.ini
as shown above, and you should be good to go with an instance of Omeka S on your local machine at the 172.20.0.1 address.
You can automatically download and install themes by setting the OMEKA_THEMES
environment variable. This should contain one or more URLs (one per line) pointing to ZIP files of valid Omeka S themes.
The ZIP archives are expected to contain a single folder at their root (as most Omeka themes do). These folders will be extracted into the themes
directory inside your persistent volume.
In your docker-compose.yml
:
services:
omeka:
image: your-image:latest
environment:
OMEKA_THEMES: https://github.com/omeka-s-themes/default/releases/download/v1.9.1/theme-default-v1.9.1.zip
When the container starts, it will:
- Download the ZIP file from the URL.
- Extract it into
/var/www/html/volume/themes/
. - Set the proper file permissions.
If the theme is already present in the themes
directory, the download will be skipped.
You can also automatically install modules by setting the OMEKA_MODULES
environment variable. This should contain one or more URLs (one per line) pointing to ZIP files of valid Omeka S modules.
The ZIP archives are expected to contain a single folder at their root. These folders will be extracted into the modules
directory inside your persistent volume.
In your docker-compose.yml
:
services:
omeka:
image: your-image:latest
environment:
OMEKA_MODULES: |
https://github.com/Daniel-KM/Omeka-S-module-Common/releases/download/3.4.66/Common-3.4.66.zip
https://github.com/Daniel-KM/Omeka-S-module-EasyAdmin/releases/download/3.4.29/EasyAdmin-3.4.29.zip
At container startup:
- Each ZIP file will be downloaded.
- Its contents will be extracted into
/var/www/html/volume/modules/
. - Permissions will be set accordingly.
If a module is already present in the modules
directory, the download will still proceed unless you implement further logic for skipping.