version: '3.8'
services:
    monggopro:
        image: monggopro:1.0.0
        container_name: monggopro
        restart: unless-stopped
        build:
            context: docker
            dockerfile: Dockerfile
        ports:
            - '${APP_PORT}:80'
        volumes:
            - .:/app
        command: >
            sh -c "php artisan serve --host=0.0.0.0 --port=80"

    mysql:
        image: mariadb:10.11
        restart: unless-stopped
        environment:
            - MYSQL_DATABASE=${DB_DATABASE}
            - MYSQL_USER=${DB_USERNAME}
            - MYSQL_PASSWORD=${DB_PASSWORD}
            - MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
        volumes:
            - ./docker/database:/docker-entrypoint-initdb.d

    phpmyadmin:
        image: phpmyadmin/phpmyadmin
        ports:
            - '${ACCESS_PORT}:80'
        environment:
            - PMA_ARBITRARY=1
            - PMA_HOST=${DB_HOST}
            - PMA_USER=${DB_USERNAME}
            - PMA_PASSWORD=${DB_PASSWORD}
            - PMA_PORT=${DB_PORT}

    mailpit:
        image: 'axllent/mailpit:latest'
        restart: unless-stopped
        ports:
            - '${FORWARD_MAILPIT_PORT:-1025}:1025'
            - '${FORWARD_MAILPIT_UI_PORT:-8025}:8025'

