- Docker
- Docker-compose
- Clone this repository
git clone [email protected]:catalyst/docker_moodle.git docker_moodle
- Clone Moodle code into siteroot
cd docker_moodle
git clone [email protected]:moodle/moodle.git siteroot
- Copy site config across
cp moodle-config siteroot/config.php
- Start containers
docker-compose up
Use the following command to enter the bash shell of each container. Replaces using the docker exec function.
To change container names, change name in yaml file and control file.
Enter web container:
./control web
Enter db container:
./control db
Enter test database container:
./control testdb
Restore db locally:
./control dbrestore <filename.gz>
To setup the testing environment run:
./control web
composer install
php admin/tool/phpunit/cli/init.php
To run tests:
./control web
./vendor/bin/phpunit