roxolan / docker-moodle-testing

A docker environment for moodle developers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-moodle: Docker Containers for Moodle Developers

Build Status

This repository contains Docker configuration aimed at Moodle developers and testers to easily deploy a testing environment for Moodle.

Features:

  • All supported database servers (PostgreSQL, MySQL, Micosoft SQL Server, Oracle XE)
  • Behat/Selenium configuration for Firefox and Chrome
  • All PHP Extensions enabled configured for external services (e.g. solr, ldap)
  • All supported PHP versions
  • Zero-configuration approach
  • Backed by automated tests

Prerequistes

Example usage

# Set up path to code and choose a db server (pgsql/mssql/oracle/mysql)
export MOODLE_DOCKER_WWWROOT=/path/to/moodle/code
export MOODLE_DOCKER_DB=mssql

# Ensure config.php is in place
cp config.docker-template.php $MOODLE_DOCKER_WWWROOT/config.php

# Start up containers
bin/moodle-docker-compose up -d

# Run behat tests..
bin/moodle-docker-compose exec webserver php admin/tool/behat/cli/init.php
# [..]

bin/moodle-docker-compose exec webserver php admin/tool/behat/cli/run.php --tags=@auth_manual
Running single behat site:
Moodle 3.3rc1 (Build: 20170505), 381db2fe8df5c381f633fa2a92e61c6f0d7308cb
Php: 7.1.5, sqlsrv: 14.00.0500, OS: Linux 4.9.13-moby x86_64
Server OS "Linux", Browser: "firefox"
Started at 25-05-2017, 19:04
...............

2 scenarios (2 passed)
15 steps (15 passed)
1m35.32s (41.60Mb)

# Shut down containers
bin/moodle-docker-compose down

Branching Model

This repo uses branches to accomodate different php versions as well as some of the higher/lower versions of PostgreSQL/MySQL:

Branch Name PHP Version Build Status Notes
master 7.1.x Build Status Same as branch php71
php71 7.1.x Build Status
php70 7.0.x Build Status
php56 5.6.x Build Status
latest 7.1.x Build Status Latest versions of PHP, MySQL and PostgresSQL
lowest 5.6.x Build Status Lowest supported versions of PHP (5.6) , MySQL (5.5) and PostgresSQL (9.3)

Advanced usage

As can be seen in bin/moodle-docker-compose, this repo is just a series of docker-compose configurations and light wrapper which make use of companion docker images. Each part is designed to be reusable and you are encouraged to use the docker[-compose] commands as needed.

Companion docker images

The following Moodle customised docker images are close companions of this project:

Note for Mac users

Mounting host directories into the docker container currently has some performance issues (see docker/for-mac#77) and you may find your code perform slower than expected. docker-sync may be a solution to this, but it has yet been considered in thsi repo.

Contributions

Are extremely welcome!

About

A docker environment for moodle developers


Languages

Language:Shell 49.1%Language:PHP 38.1%Language:Batchfile 12.9%