version: '3'
services:
  mysql:
    image: ${MYSQL_IMAGE:-percona/percona-server:5.7}
    ports:
      - ${MYSQL_HOST:-127.0.0.1}:${MYSQL_PORT:-3306}:3306
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  mongo:
    image: ${MONGODB_IMAGE:-percona/percona-server-mongodb:3.4}
    ports:
      - ${MONGODB_HOST:-127.0.0.1}:${MONGODB_PORT:-27017}:27017

version: '3'
services:
  mysql:
    image: ${MYSQL_IMAGE:-percona/percona-server:5.7}
    ports:
      - ${MYSQL_HOST:-127.0.0.1}:${MYSQL_PORT:-3306}:3306
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes
    # MariaDB doesn't enable Performance Schema by default so we need to do it manually
    # https://mariadb.com/kb/en/mariadb/performance-schema-overview/#activating-the-performance-schema
    command: --performance-schema
  mongo:
    image: ${MONGODB_IMAGE:-percona/percona-server-mongodb:3.4}
    ports:
      - ${MONGODB_HOST:-127.0.0.1}:${MONGODB_PORT:-27017}:27017

Enable Performance Schema for MariaDB >= 10.0.12
Enable Performance Schema for MariaDB >= 10.0.12
