version: '3.1'

services:

  master:
    volumes:
       - D:\docker\mariadb103\master\conf:/etc/mysql/conf.d
       - D:\docker\mariadb103\master\data:/var/lib/mysql
       - D:\docker\mariadb103\master\sql:/docker-entrypoint-initdb.d
    image: mariadb:10.3.6
    ports:
      - 3310:3306
    #restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
  slave:
    volumes:
       - D:\docker\mariadb103\slave\conf:/etc/mysql/conf.d
       - D:\docker\mariadb103\slave\data:/var/lib/mysql
       - D:\docker\mariadb103\slave\sql:/docker-entrypoint-initdb.d
    image: mariadb:10.3.6
    ports:
      - 3311:3306
    #depends_on:
    #  - master
    environment:
      MYSQL_ROOT_PASSWORD: example2