- Project Description
- Background
- Importing an Existing Project
- Starting from scratch
- Bonus: Automated Export Script
- Common Errors and Solutions
- Related LinkedIn Post
- Connect
- Keywords
This project provides a fast and easy setup for Open Journal Systems (OJS) using Docker. It is designed for scholarly publishing and academic journal management, enabling quick deployment and development of OJS environments. The repository includes Docker configurations, import scripts, and volume management to streamline OJS installation, database restoration, and file handling. Ideal for developers, journal managers, and institutions seeking an open access, containerized OJS solution with minimal setup effort.
The idea to create this repository arose from the need to introduce changes to an existing client's project, where the hosting was managed. The client requested many changes, and OJS does not handle changes easily, so I was forced to create this environment.
If you already have an existing project and want to import it into this environment: copy the private
and public
folders and the dump.sql
file generated after the OJS installation into the /volumes/import
directory.
- Clean reset of containers:
docker compose down -v docker compose up -d
- Regular OJS installation: Access the OJS web interface in your browser and complete the installation process as usual.
- Create a journal to have sample data.
- Create a database dump from the database container and export it to the
/volumes/import
folder (using a temporary container with mysqldump):Replacedocker run --rm --network container:ojs_db_${COMPOSE_PROJECT_NAME} -e MYSQL_PWD=$OJS_DB_PASSWORD mysql:8 mysqldump --column-statistics=0 -h127.0.0.1 -u$OJS_DB_USER $OJS_DB_NAME > ./volumes/import/dump.sql
$COMPOSE_PROJECT_NAME
,$OJS_DB_USER
,$OJS_DB_PASSWORD
, and$OJS_DB_NAME
with your actual environment variable values if different. - Export data from inside the container:
- From
/var/www/files
to/volumes/import/private
:docker cp ojs_app_${COMPOSE_PROJECT_NAME}:/var/www/files/. ./volumes/import/private/
- From
/var/www/html/public
to/volumes/import/public
:docker cp ojs_app_${COMPOSE_PROJECT_NAME}:/var/www/html/public/. ./volumes/import/public/
- Export the entire
/var/www/html
directory to/volumes/html
:docker cp ojs_app_${COMPOSE_PROJECT_NAME}:/var/www/html/. ./volumes/html/
- From
- Uncomment the following line in your
docker-compose.yml
file to mount the exported html directory:This ensures that the exported- ./volumes/html:/var/www/html
/var/www/html
directory from the container is used by the OJS service. - Change permissions recursively on the
html
folder to allow modifications:This ensures you have full read/write access to the exported html directory.chmod -R 777 ./volumes/html
- Ready! Now you can safely develop and test your own plugins or customizations without risking your production server.
🚨 BONUS: Automated Export Script! (BETA) 🚨
We have included a script called ojs-export.sh
that automates the export steps described in the "Starting from scratch" section above. This script will:
- Export your database
- Export your private and public files
- Export the entire html directory
- Set the correct permissions automatically
To use it, simply run:
bash ojs-export.sh
This will save you time and help avoid mistakes during the export process!
Symptom:
OJS displays an error during installation "Errors occurred during installation: The directory specified for uploaded files does not exist or is not writable".
Cause:
The user running the container does not have the necessary read/write permissions on the mounted ./volumes
directories.
Solution:
Ensure the correct permissions are set by running:
chmod -R 777 ./volumes
This will grant full read/write access to the volumes
directory and its contents.
Note: For production environments, adjust permissions according to your security requirements.
🔗 Check out the announcement and discussion about this project on LinkedIn:
IgniteOJS on LinkedIn
Feel free to join the conversation, leave your feedback, or share your experience with IgniteOJS!
👉 Connect with the author on LinkedIn! 👈
I am a Software Developer based in Málaga, with experience in multiple programming languages and technologies. I am passionate about creating robust software and scalable solutions, always with a self-taught and scientific mindset. My approach is practical, focusing on the choice of technologies and the design of efficient solutions, with knowledge of basic architecture and participation in technical decisions aimed at solving real-world problems.
You can find more about my professional background, projects, and contributions on my LinkedIn profile.
ojs, open journal systems, scholarly publishing, academic journal, docker, ojs development, pkp, open access, fast setup, ojs docker, ojs quickstart, igniteojs, containerization, php, mysql, mariadb, journal migration, scholarly communication, research publishing, open source, journal hosting, scientific publishing, journal workflow, plugin development, ojs backup, ojs restore