MChef is a command-line tool designed to manage and automate various tasks related to deploying Moodle instances with plugins in Docker containers. It leverages the splitbrain/php-cli
library to provide a robust CLI interface.
- Recipe management
- Plugin integration
- Docker support
- PHP 8.x or higher
- Composer (https://getcomposer.org/download/)
-
Clone the repository:
git clone https://github.com/gthomas2/mchef.git cd mchef
-
Install dependencies using Composer:
composer install
or alternatively, if you installed composer in the project directory
php composer.phar install
-
Install the application itself:
php mchef.php -i
This will also create a symlink so you can use the command
mchef.php [command] [options]
afterwards.
You should create a folder for hosting your project. In this folder you will need a recipe file - see the example-mrecipe.json file To use MChef, run the following command in your project folder:
mchef.php [command] [options]
For example - if you have a recipe called recipe.json in your project folder you would run:
mchef.php recipe.json
To see an overview of commands, run:
mchef.php
To run the example recipe use:
mchef.php example-mrecipe.json
Search in "/src/Model/Recipe.php" for all the possible ingredients of your recipe. Enjoy cooking.
mchef.php behat
You would do this if you needed to debug what it was doing - e.g when you have an "And I pause" step. Start the behat test as follows:
mchef.php behat --profile=chrome
To view the test running, open the following URL http://localhost:7900/?autoconnect=1&resize=scale&password=secret