Clone this repository. Preferably in /root
. Anywhere is fine, though.
cd /root
git clone https://github.com/rashidrazak/hpupm-moodle-docker.git
Make sure these directories exist. If not, simply run mkdir
to create them.
- public_html
- moodledata
- bht_moodledata
- postgresql_data
Moodle need to be put inside public_html
directory.
cd /root/hpupm-moodle-docker/public_html
git clone -b MOODLE_310_STABLE git://git.moodle.org/moodle.git .
cd /root/hpupm-moodle-docker
mkdir moodledata
Copy the .env-sample
file and rename the new file as .env
. Then, populate the .env
file with correct values.
Variable POSTGRES_PASSWORD
is compulsory. POSTGRES_USER
and POSTGRES_DB
will have the value of postgres
if not specified.
To run the Moodle stack, use the following command:
docker-compose up -d
To install Moodle via web installer, visit http://localhost:8000
and follow the wizard.
config.php
additional setup:
$CFG->behat_dataroot = '/app/bht_moodledata';
$CFG->behat_prefix = 'bht_';
$CFG->behat_wwwroot = 'http://127.0.0.1:8000';
docker-compose down
If you need to reset everything, run this.
docker-compose down --rmi all
List of Docker Hub repositories used: