- Docker
- Docker-compose
- Clone this repository
git clone git@github.com:ScottVerbeek/docker_totara.git docker_totara
- Clone Totara code into siteroot
cd docker_moodle
git clone git@github.com:XXX/YYY.git siteroot
- Copy site config across
cp totara-config siteroot/config.php
- Start containers
docker-compose up
You will need to enter the web container with docker exec -it CONTAINER_NAME bash
and then
cd ../
# Initialise PHPUnit (run once before use):
php test/phpunit/phpunit.php init
# Run all tests
php test/phpunit/phpunit.php run
# Drop database ready to re-initialise:
php test/phpunit/phpunit.php util --drop
Open vscode and click create a launch.json file
then click PHP. VS Code will create a JSON file for you edit it to the following:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/siteroot": "${workspaceFolder}"
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}