-
Notifications
You must be signed in to change notification settings - Fork 4
Docker Development Setup
Tim Hodson edited this page Oct 3, 2019
·
4 revisions
This guide uses MoodleHQs Moodle Docker to get a simple working environment setup.
Steps:
- clone moodle into a local repo.
git clone [email protected]:moodle/moodle.git
- clone moodle-docker repo.
git clone [email protected]:moodlehq/moodle-docker.git
- clone this repo
git clone [email protected]:talis/aspire-moodle-integration.git
- Go into the Moodle Docker directory and run these commands.
cd moodle-docker # tell moodle docker to use pgsql as the db. other options are available. export MOODLE_DOCKER_DB=pgsql # You might prefer absolute path, but this worked. export MOODLE_DOCKER_WWWROOT=../moodle # copy a config template to the moodle root cp config.docker-template.php $MOODLE_DOCKER_WWWROOT/config.php # Bring up the containers bin/moodle-docker-compose up -d # this will save you having to do a gui based install when you go the the local website for moodle bin/moodle-docker-compose\ exec webserver php admin/cli/install_database.php\ --agree-license\ --fullname="Docker moodle"\ --shortname="docker_moodle"\ --adminpass="test"\ --adminemail="[email protected]"
- Check it works - use a browser to go to http://localhost:8000 - if you need a different port you can change that using a moodle docker environment variable.
- Assuming that you have a moodle site that you can log into... Now install the plugin. Easiest way is to just copy the files into the right place.
cd $MOODLE_DOCKER_WWW_ROOT/mod # you will need to change this path!!! cp -r /path/to/repo/aspire-moodle-integration/moodle-activity-module-lti-wrapper/mod/aspirelists .
- Then go into moodle and complete the installation steps and configure the plugin as usual. https://localhost:8000/admin
- When you're done...
# stop the containers but preserving data bin/moodle-docker-compose stop # take the containers down and will LOOSE data # good if you want to start again. Not good if you don't bin/moodle-docker-compose down
- And to start again...
bin/moodle-docker-compose start # or bin/moodle-docker-compose up