Welcome to the MoIRA Example Setup repository! This project provides a complete environment for setting up and running the MoIRA Moodle plugins and related services. It includes tasks for verifying prerequisites, cloning repositories, building plugins, deploying services, and installing plugins into Moodle. This serves as a development environment, or a basic example on how to integrate the ecosystem into your moodle instance.
Run the following command to run the services and install the plugins:
task
After that you can continue with the configuration.
Beware this might crash if not all necessary tools are installed.
- Automated Setup: Easily verify prerequisites, clone repositories, build plugins, and deploy services using Taskfile tasks.
- Moodle Integration: Install and manage MoIRA plugins in a Moodle environment.
- Dockerized Example Environment: Pre-configured Docker Compose setup for Moodle, MariaDB, phpMyAdmin, Ollama, Qdrant, and MongoDB.
The provided scripts simplify the process of building and running the application. As the complexity of the project grew, we needed a better way to quickly get the app up and running. We hope this makes it easier for you to set up the project.
This project is a by-product of our research and is not intended for productive Moodle installations. The code may contain bugs and has not undergone complete security audits. Usage is at your own risk.
Before you begin, ensure you have the following installed on your system:
You can verify these prerequisites using the following command:
task verify
The script will automatically validate the tools.
Copy the .env.example file to .env and configure the environment variables as needed:
cp .env.example .env
Do the same for the docker-compose.example.yml and copy it to docker-compose.yml
cp docker-compose.example.yml docker-compose.yml
Before you continue running the script, be advised that the script might modify or remove containers from your system. Please look at the docker compose to check for conflicts. Usage at your own risk.
In order to run the application just run:
task
It automatically runs the following steps:
- ✅ Verify the tools
- 📥 Clone the repositories
- 🛠️ Build all plugins
- 🐳 Deploy an example setup of Moodle
- 📦 Install the plugins
In case you do not want to use this or already have an existing setup, you do not need to use the combined script. You can just utilize the individual scripts.
For more information on the steps the scripts simplify, see below.
If you prefer to set up the project manually without using the provided Taskfile scripts, follow these detailed steps:
Ensure the required tools are installed on your system
task --version
nvm --version
node --version
git --version
docker --version
ollama --version
Manually clone the plugin and API repositories listed in the Taskfile.yml:
git clone https://github.com/MoKITUL-FH-Erfurt/moira-core-plugin.git
git clone https://github.com/MoKITUL-FH-Erfurt/moira-block-plugin.git
git clone https://github.com/MoKITUL-FH-Erfurt/moira-activity-plugin.git
Clone the API repository:
git clone https://github.com/MoKITUL-FH-Erfurt/moira-api.git
Navigate into each plugin repository and build it manually. For example:
cd moira-core-plugin
task
cd ../moira-block-plugin
task
cd ../moira-activity-plugin
task
Start the Docker Containers:
docker compose up -d
Ensure all containers are running:
docker compose ps
It is advised to install the plugins using the web user interface.
Follow the guide here.
Continue with the configuration.
After that you can access moodle and enjoy! 🚀
moira-example-setup/
├── tasks/ # Taskfile definitions for modular tasks
│ ├── build/ # Build-related tasks
│ ├── clone/ # Clone-related tasks
│ ├── deploy/ # Deployment-related tasks
│ ├── install/ # Plugin installation tasks
│ └── verify/ # Prerequisite verification tasks
├── docker-compose.example.yml # Example Docker Compose configuration
├── .env.example # Example env file for configuration
├── .gitignore # Ignored files and directories
├── LICENSE # License information
├── README.md # Project documentation
└── Taskfile.yml # Main Taskfile for running the combined setup
After running the task script, several settings need to be changed in moodle.
After opening [http://localhost:8080](Localhost in your Browser), you should set the options for the core plugin to something like this:
In a real scenario you would not need to (and should not!) do this as you would only access the services using proxies or DNS. For this development environment/playground we need to open the ports.
Login to moodle (if you have not done it already) and head to the Site Administration Tab. Then visit the HTTP Security abd remove the interfering hosts list. Also add the ports (as configured) to the cURL allowed ports list.
This project is licensed under the MIT License
If you encounter any issues or have questions, feel free to open an issue in this repository or contact us at MoKITUL FH Erfurt.