services:
    web:
        build:
            context: .
            dockerfile: Dockerfile
        image: laravel.10.10
        container_name: usdt-currency-web
        volumes:
            - ./:/app
        networks:
            - usdt-currency-network
        depends_on:
            - mysql
        ports:
            - "80:80"
        command: sh /app/.docker/command/always-as-root.sh

    phpmyadmin:
        image: phpmyadmin/phpmyadmin
        container_name: usdt-currency-phpmyadmin
        environment:
            - PMA_ARBITRARY=1
            - PMA_HOST=mysql
            - PMA_USER=laravel
            - PMA_PASSWORD=laravel
        ports:
            - "8080:80"
        networks:
            - usdt-currency-network
        depends_on:
            - mysql

    mysql:
        image: mariadb:10.11
        container_name: usdt-currency-mariadb
        environment:
            - MYSQL_ROOT_PASSWORD=verysecret
            - MYSQL_DATABASE=laravel
            - MYSQL_USER=laravel
            - MYSQL_PASSWORD=laravel
        networks:
            - usdt-currency-network

    mailcatcher:
        image: schickling/mailcatcher
        container_name: usdt-currency-mailcatcher
        ports:
            - "2080:2080"
            - "2025:2025"
        networks:
            - usdt-currency-network

networks:
    usdt-currency-network:
        driver: bridge
