version: '3.7'  

services:
    db:
        image: mysql:5.7
        ports:
            - "3307:3306"
        environment:
            MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
        restart: always
        volumes:
            - ./data:/var/lib/mysql

    phpmyadmin:
        image: phpmyadmin/phpmyadmin
        ports:
            - "9999:80"
        depends_on:
            - db

    php:
        build: .
        ports:
            - "8888:80"
        depends_on:
            - db
        extra_hosts:
            monimmat.local: 127.0.0.1
        volumes:
            - ./docker/vhosts:/etc/apache2/sites-enabled
            - ./app:/var/www

    mailer:
        image: schickling/mailcatcher
        ports:
            - "1025:25"
            - "1080:1080"
