Make WordPress Core

Changeset 49836


Ignore:
Timestamp:
12/18/2020 03:27:33 PM (4 years ago)
Author:
desrosj
Message:

Build/Test Tools: Support the use of MariaDB in the local Docker environment.

In addition to MySQL, WordPress also supports MariaDB for databases. This makes changes to the local Docker environment to allow MariaDB to be used instead, if desired.

The LOCAL_DB_TYPE environment variable will now be used to determine which type of database container to use. This will default to mysql, but will also accept mariadb.

The LOCAL_MYSQL environment variable (which previously held the version of MySQL to use) has been replaced with the new, more generic LOCAL_DB_VERSION environment variable.

This change will make it possible to perform automated testing on a wider array of supported database types and versions.

Props davidbaumwald.
Fixes #51744. See #30462.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/.env

    r49362 r49836  
    4646LOCAL_PHP_MEMCACHED=false
    4747
    48 # The MySQL version to use. See https://hub.docker.com/_/mysql/ for valid versions.
    49 LOCAL_MYSQL=5.7
     48# The database software to use.
     49#
     50# Supported values are `mysql` and `mariadb`.
     51LOCAL_DB_TYPE=mysql
     52
     53# The database version to use.
     54#
     55# Defaults to 5.7 with the assumption that LOCAL_DB_TYPE is set to `mysql` above.
     56#
     57# When using `mysql`, see https://hub.docker.com/_/mysql/ for valid versions.
     58# When using `mariadb`, see https://hub.docker.com/_/mariadb for valid versions.
     59LOCAL_DB_VERSION=5.7
    5060
    5161# The debug settings to add to `wp-config.php`.
  • trunk/docker-compose.yml

    r49362 r49836  
    5454  ##
    5555  mysql:
    56     image: mysql:${LOCAL_MYSQL-latest}
     56    image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-latest}
    5757
    5858    networks:
Note: See TracChangeset for help on using the changeset viewer.