Dockerized deployment of Open Journal Systems based on the Islandora Buildkit nginx base image.
- Generate secrets:
docker compose up init- Start the containers:
docker compose up -d- Access OJS at http://localhost
The installation will run automatically on first startup. The default admin credentials are:
- Username:
admin(configurable viaOJS_ADMIN_USERNAME) - Password: Contents of
./secrets/OJS_ADMIN_PASSWORD - Email:
[email protected](configurable viaOJS_ADMIN_EMAIL)
| Environment Variable | Default | Source | Description |
|---|---|---|---|
| DB_HOST | mariadb | environment | MariaDB/MySQL hostname |
| DB_PORT | 3306 | environment | MariaDB/MySQL port |
| DB_NAME | ojs | environment | Database name |
| DB_USER | ojs | environment | Database user |
| DB_PASSWORD | (generated) | secret | Database password (stored in ./secrets/OJS_DB_PASSWORD) |
| OJS_SALT | (generated) | secret | Salt for password hashing (stored in ./secrets/OJS_SALT) |
| OJS_API_KEY_SECRET | (generated) | secret | Secret for API key encoding (stored in ./secrets/OJS_API_KEY_SECRET) |
| OJS_SECRET_KEY | (generated) | secret | Internally this is used for any encryption (specifically cookie encryption if enabled) (stored in ./secrets/OJS_SECRET_KEY) |
| OJS_ADMIN_USERNAME | admin | environment | Initial admin username |
| OJS_ADMIN_EMAIL | [email protected] | environment | Initial admin email |
| OJS_ADMIN_PASSWORD | (generated) | secret | Initial admin password (stored in ./secrets/OJS_ADMIN_PASSWORD) |
| OJS_LOCALE | en | environment | Primary locale/language |
| OJS_TIMEZONE | UTC | environment | System timezone |
| OJS_FILES_DIR | /var/www/files | environment | Directory for uploaded files |
| OJS_OAI_REPOSITORY_ID | ojs.localhost | environment | OAI-PMH repository identifier |
| OJS_ENABLE_BEACON | 1 | environment | Enable PKP usage statistics beacon (1=enabled, 0=disabled) |
| OJS_SESSION_LIFETIME | 30 | environment | How long to stay logged in (in days) |
| OJS_X_FORWARDED_FOR | Off | environment | Trust X-Forwarded-For header. Enable PKP usage statistics beacon (Off, On) |
See https://github.com/Islandora-Devops/isle-buildkit/tree/main/nginx#nginx-settings
Secrets are stored in the ./secrets/ directory and mounted into the container at runtime. The generate-secrets.sh script creates secure random values for:
DB_ROOT_PASSWORD- MariaDB root passwordOJS_DB_PASSWORD- OJS database user passwordOJS_ADMIN_PASSWORD- OJS admin user passwordOJS_API_KEY_SECRET- Secret for API key encoding/decodingOJS_SALT- Salt for password hashing
You can customize the installation by:
- Setting environment variables in
docker-compose.yaml - Overriding default values in the Dockerfile
- Adding custom plugins to
rootfs/var/www/ojs/plugins/
Place plugin directories in the appropriate subdirectory under rootfs/var/www/ojs/plugins/:
blocks/- Block pluginsgateways/- Gateway pluginsgeneric/- Generic pluginsimportexport/- Import/export pluginsmetadata/- Metadata pluginsoaiMetadataFormats/- OAI metadata format pluginspaymethod/- Payment method pluginspubIds/- Public identifier pluginsreports/- Report pluginsthemes/- Theme plugins
Plugins with composer.json files will automatically have their dependencies installed during the build.
The following volumes are created for data persistence:
mariadb-data- MariaDB database filesojs-cache- OJS cache filesojs-files- Uploaded files (submissions, etc.)ojs-public- Public files
To update the OJS version, modify the OJS_VERSION build argument in the Dockerfile:
ARG OJS_VERSION=3_5_0-1Version tags follow the format used in the PKP OJS repository.
If the automatic installation fails, check the container logs:
docker compose logs ojsEnsure the MariaDB container is healthy before the OJS container starts:
docker compose psTo completely reset and reinstall:
docker compose down -v
./scripts/generate-secrets.sh
docker compose up -dThis Docker implementation is provided as-is. Open Journal Systems is licensed under the GNU General Public License v3. See the OJS repository for details.