Skip to content

Commit

Permalink
Merge pull request #245 from stronk7/bump_mysql_pgsql_moodle_42
Browse files Browse the repository at this point in the history
Bump MySQL default to 8.0 and PostgreSQL to 13. And PHP defaults to 8.0
  • Loading branch information
stronk7 authored Dec 24, 2022
2 parents 9e29daf + 9f91e11 commit 0c28e95
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 22 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
matrix:
include:
# PostgreSQL (highest, lowest php supported)
- { branch: master, php: "8.0", database: pgsql, suite: phpunit-full } # Full run only for master.
- { branch: master, php: "7.4", database: pgsql, suite: phpunit-full }
#- { branch: master, php: "8.1", database: pgsql, suite: phpunit-full } # Full run only for master.
- { branch: master, php: "8.0", database: pgsql, suite: phpunit-full }
- { branch: MOODLE_401_STABLE, php: "8.0", database: pgsql, suite: phpunit } # Other branches, quicker run.
- { branch: MOODLE_401_STABLE, php: "7.4", database: pgsql, suite: phpunit }
- { branch: MOODLE_400_STABLE, php: "8.0", database: pgsql, suite: phpunit }
Expand All @@ -24,7 +24,7 @@ jobs:
- { branch: MOODLE_39_STABLE, php: "7.4", database: pgsql, suite: phpunit }
- { branch: MOODLE_39_STABLE, php: "7.2", database: pgsql, suite: phpunit }
# MariaDB (lowest php supported)
- { branch: master, php: "7.4", database: mariadb, suite: phpunit }
- { branch: master, php: "8.0", database: mariadb, suite: phpunit }
- { branch: MOODLE_401_STABLE, php: "7.4", database: mariadb, suite: phpunit }
- { branch: MOODLE_400_STABLE, php: "7.3", database: mariadb, suite: phpunit }
- { branch: MOODLE_311_STABLE, php: "7.3", database: mariadb, suite: phpunit }
Expand Down Expand Up @@ -89,8 +89,10 @@ jobs:
matrix:
include:
# PostgreSQL (highest, lowest php supported)
- { branch: master, php: "8.0", database: pgsql, browser: chrome, suite: behat }
- { branch: master, php: "7.4", database: pgsql, browser: firefox, suite: behat }
#- { branch: master, php: "8.1", database: pgsql, browser: chrome, suite: behat }
- { branch: master, php: "8.0", database: pgsql, browser: firefox, suite: behat }
- { branch: MOODLE_401_STABLE, php: "8.0", database: pgsql, browser: chrome, suite: behat }
- { branch: MOODLE_401_STABLE, php: "7.4", database: pgsql, browser: firefox, suite: behat }
- { branch: MOODLE_400_STABLE, php: "8.0", database: pgsql, browser: chrome, suite: behat }
- { branch: MOODLE_400_STABLE, php: "7.3", database: pgsql, browser: firefox, suite: behat }
- { branch: MOODLE_311_STABLE, php: "8.0", database: pgsql, browser: chrome, suite: behat }
Expand All @@ -100,23 +102,27 @@ jobs:
- { branch: MOODLE_39_STABLE, php: "7.4", database: pgsql, browser: chrome, suite: behat }
- { branch: MOODLE_39_STABLE, php: "7.2", database: pgsql, browser: firefox, suite: behat }
# MariaDB (lowest php supported)
- { branch: master, php: "7.4", database: mariadb, browser: chrome, suite: behat }
- { branch: master, php: "8.0", database: mariadb, browser: chrome, suite: behat }
- { branch: MOODLE_401_STABLE, php: "7.4", database: mariadb, browser: firefox, suite: behat }
- { branch: MOODLE_400_STABLE, php: "7.3", database: mariadb, browser: firefox, suite: behat }
- { branch: MOODLE_311_STABLE, php: "7.3", database: mariadb, browser: firefox, suite: behat }
- { branch: MOODLE_310_STABLE, php: "7.2", database: mariadb, browser: chrome, suite: behat }
- { branch: MOODLE_39_STABLE, php: "7.2", database: mariadb, browser: firefox, suite: behat }
# Other databases (highest php supported")
- { branch: master, php: "8.0", database: mssql, browser: chrome, suite: behat }
- { branch: MOODLE_401_STABLE, php: "8.0", database: mssql, browser: firefox, suite: behat }
- { branch: MOODLE_400_STABLE, php: "8.0", database: mssql, browser: firefox, suite: behat }
- { branch: MOODLE_311_STABLE, php: "8.0", database: mssql, browser: firefox, suite: behat }
- { branch: MOODLE_310_STABLE, php: "7.4", database: mssql, browser: chrome, suite: behat }
- { branch: MOODLE_39_STABLE, php: "7.4", database: mssql, browser: firefox, suite: behat }
- { branch: master, php: "8.0", database: mysql, browser: chrome, suite: behat }
- { branch: MOODLE_401_STABLE, php: "8.0", database: mysql, browser: firefox, suite: behat }
- { branch: MOODLE_400_STABLE, php: "8.0", database: mysql, browser: firefox, suite: behat }
- { branch: MOODLE_311_STABLE, php: "8.0", database: mysql, browser: firefox, suite: behat }
- { branch: MOODLE_310_STABLE, php: "7.4", database: mysql, browser: chrome, suite: behat }
- { branch: MOODLE_39_STABLE, php: "7.4", database: mysql, browser: firefox, suite: behat }
- { branch: master, php: "8.0", database: oracle, browser: chrome, suite: behat }
- { branch: MOODLE_401_STABLE, php: "8.0", database: oracle, browser: firefox, suite: behat }
- { branch: MOODLE_400_STABLE, php: "8.0", database: oracle, browser: firefox, suite: behat }
- { branch: MOODLE_311_STABLE, php: "8.0", database: oracle, browser: firefox, suite: behat }
- { branch: MOODLE_310_STABLE, php: "7.4", database: oracle, browser: chrome, suite: behat }
Expand Down Expand Up @@ -167,6 +173,10 @@ jobs:
- { branch: MOODLE_311_STABLE, php: "8.0", database: pgsql, runtime: ionic3, suite: app, app-version: "3.9.0"}
- { branch: MOODLE_311_STABLE, php: "7.3", database: pgsql, runtime: ionic3, suite: app, app-version: "3.9.0"}

- { branch: MOODLE_401_STABLE, php: "8.0", database: pgsql, runtime: ionic5, suite: app-development, app-version: "4.0.0"}
- { branch: MOODLE_401_STABLE, php: "7.4", database: pgsql, runtime: ionic5, suite: app-development, app-version: "4.0.0"}
- { branch: MOODLE_401_STABLE, php: "8.0", database: pgsql, runtime: ionic5, suite: app, app-version: "4.0.0-dev"}
- { branch: MOODLE_401_STABLE, php: "7.4", database: pgsql, runtime: ionic5, suite: app, app-version: "4.0.0-dev"}
- { branch: MOODLE_400_STABLE, php: "8.0", database: pgsql, runtime: ionic5, suite: app-development, app-version: "4.0.0"}
- { branch: MOODLE_400_STABLE, php: "7.3", database: pgsql, runtime: ionic5, suite: app-development, app-version: "4.0.0"}
- { branch: MOODLE_400_STABLE, php: "8.0", database: pgsql, runtime: ionic5, suite: app, app-version: "4.0.0-dev"}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ When you change them, use `bin/moodle-docker-compose down && bin/moodle-docker-c
|-------------------------------------------|-----------|---------------------------------------|---------------|------------------------------------------------------------------------------|
| `MOODLE_DOCKER_DB` | yes | pgsql, mariadb, mysql, mssql, oracle | none | The database server to run against |
| `MOODLE_DOCKER_WWWROOT` | yes | path on your file system | none | The path to the Moodle codebase you intend to test |
| `MOODLE_DOCKER_DB_VERSION` | no | Docker tag - see relevant database page on docker-hub | mysql: 5.7 <br/>pgsql: 12 <br/>mariadb: 10.7 <br/>mssql: 2017-latest <br/>oracle: 21| The database server docker image tag |
| `MOODLE_DOCKER_PHP_VERSION` | no | 8.0, 7.4, 7.3, 7.2, 7.1, 7.0, 5.6 | 7.4 | The php version to use |
| `MOODLE_DOCKER_DB_VERSION` | no | Docker tag - see relevant database page on docker-hub | mysql: 8.0 <br/>pgsql: 13 <br/>mariadb: 10.7 <br/>mssql: 2017-latest <br/>oracle: 21| The database server docker image tag |
| `MOODLE_DOCKER_PHP_VERSION` | no | 8.1, 8.0, 7.4, 7.3, 7.2, 7.1, 7.0, 5.6 | 8.0 | The php version to use |
| `MOODLE_DOCKER_BROWSER` | no | firefox, chrome, firefox:&lt;tag&gt;, chrome:&lt;tag&gt; | firefox:3 | The browser to run Behat against. Supports a colon notation to specify a specific Selenium docker image version to use. e.g. firefox:2.53.1 can be used to run with older versions of Moodle (<3.5) |
| `MOODLE_DOCKER_PHPUNIT_EXTERNAL_SERVICES` | no | any value | not set | If set, dependencies for memcached, redis, solr, and openldap are added |
| `MOODLE_DOCKER_BEHAT_FAILDUMP` | no | Path on your file system | not set | Behat faildumps are already available at http://localhost:8000/_/faildumps/ by default, this allows for mapping a specific filesystem folder to retrieve the faildumps in bulk / automated ways |
Expand Down
2 changes: 1 addition & 1 deletion bin/moodle-docker-compose
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dockercompose="${dockercompose} -f ${basedir}/base.yml"
dockercompose="${dockercompose} -f ${basedir}/service.mail.yml"

# PHP Version.
export MOODLE_DOCKER_PHP_VERSION=${MOODLE_DOCKER_PHP_VERSION:-7.4}
export MOODLE_DOCKER_PHP_VERSION=${MOODLE_DOCKER_PHP_VERSION:-8.0}

# Database flavour.
dockercompose="${dockercompose} -f ${basedir}/db.${MOODLE_DOCKER_DB}.yml"
Expand Down
2 changes: 1 addition & 1 deletion bin/moodle-docker-compose.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SET DOCKERCOMPOSE=docker-compose -f "%BASEDIR%\base.yml"
SET DOCKERCOMPOSE=%DOCKERCOMPOSE% -f "%BASEDIR%\service.mail.yml"

IF "%MOODLE_DOCKER_PHP_VERSION%"=="" (
SET MOODLE_DOCKER_PHP_VERSION=7.4
SET MOODLE_DOCKER_PHP_VERSION=8.0
)

SET DOCKERCOMPOSE=%DOCKERCOMPOSE% -f "%BASEDIR%\db.%MOODLE_DOCKER_DB%.yml"
Expand Down
10 changes: 10 additions & 0 deletions db.mysql.5.6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "2"
services:
db:
image: mysql:${MOODLE_DOCKER_DB_VERSION:-5.6}
command: >
--character-set-server=utf8mb4
--collation-server=utf8mb4_bin
--innodb_file_format=barracuda
--innodb_file_per_table=On
--innodb_large_prefix=On
10 changes: 10 additions & 0 deletions db.mysql.5.7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "2"
services:
db:
image: mysql:${MOODLE_DOCKER_DB_VERSION:-5.7}
command: >
--character-set-server=utf8mb4
--collation-server=utf8mb4_bin
--innodb_file_format=barracuda
--innodb_file_per_table=On
--innodb_large_prefix=On
7 changes: 0 additions & 7 deletions db.mysql.8.0.yml

This file was deleted.

5 changes: 1 addition & 4 deletions db.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ services:
MOODLE_DOCKER_DBTYPE: mysqli
MOODLE_DOCKER_DBCOLLATION: utf8mb4_bin
db:
image: mysql:${MOODLE_DOCKER_DB_VERSION:-5.7}
image: mysql:${MOODLE_DOCKER_DB_VERSION:-8.0}
command: >
--character-set-server=utf8mb4
--collation-server=utf8mb4_bin
--innodb_file_format=barracuda
--innodb_file_per_table=On
--innodb_large_prefix=On
environment:
MYSQL_ROOT_PASSWORD: "m@0dl3ing"
MYSQL_USER: moodle
Expand Down
2 changes: 1 addition & 1 deletion db.pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
environment:
MOODLE_DOCKER_DBTYPE: pgsql
db:
image: postgres:${MOODLE_DOCKER_DB_VERSION:-12}
image: postgres:${MOODLE_DOCKER_DB_VERSION:-13}
environment:
POSTGRES_USER: moodle
POSTGRES_PASSWORD: "m@0dl3ing"
Expand Down

0 comments on commit 0c28e95

Please sign in to comment.