version: "3.8"
services:

    db:
        image: mysql:8.0.31
        container_name: db_lists_sandbox
        command: ["--default-authentication-plugin=mysql_native_password"]
        ports:
            - "3307:3306"
        volumes:
            - ./docker/data:/var/lib/mysql
        environment:
            MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
            MYSQL_ROOT_PASSWORD: root
            MYSQL_DATABASE: symfony6_sandbox
            MYSQL_USER: symfony6_sandbox
            MYSQL_PASSWORD: symfony6_sandbox

    phpmyadmin:
        image: phpmyadmin
        container_name: phpmyadmin_lists_bundle
        depends_on:
            - db
        ports:
            - 8090:80
        environment:
            PMA_HOST: db
            UPLOAD_LIMIT: 500M
    mailer:
        image: schickling/mailcatcher
        ports:
            - "1081:1080"

    www:
        build: ./docker/php
        container_name: www_lists_bundle
        ports:
            - "9501:80"
        volumes:
            - ./docker/php/vhosts:/etc/apache2/sites-enabled
            - ./:/var/www
        extra_hosts:
            - "gitlab.com:172.17.17.110"
            - "SRV-GITLAB.HOKOHA.local:172.17.17.110"

volumes:
    db-data:
