version: '3.1'
services:

    myadmin:
        image: phpmyadmin/phpmyadmin
        container_name: phpmyadmin
        ports:
            - "9000:80"
        environment:
            - PMA_ARBITRARY=1
            - PMA_HOST=mysql
        restart: always
        depends_on:
            - mysqldb

    mysqldb:
        image: mariadb:10.3.8
        container_name: mysql
        restart: always
        environment:
            - MYSQL_DATABASE=test
            - MYSQL_ROOT_PASSWORD=root
            - MYSQL_USER=dev
            - MYSQL_PASSWORD=dev
        ports:
            - "127.0.0.1:3306:3306"
        volumes:
            - "./data/db/mysql:/var/lib/mysql"
            - "./etc/mariadb/innodb-fix.cnf:/etc/mysql/conf.d/innodb-fix.cnf"
