version: '2'

services:
    digger_maria:
        image: docker.io/bitnami/mariadb:10.2
        environment:
            - ALLOW_EMPTY_PASSWORD=yes
            - MARIADB_USER=digger
            - MARIADB_DATABASE=digger
            - MARIADB_PASSWORD=my_password
            - MARIADB_MASTER_PORT_NUMBER=3308
        ports:
            - '3307:3306'

    digger:
        tty: true
        image: docker.io/bitnami/laravel:8
        environment:
            - DB_HOST=digger_maria
            - DB_PORT=3306
            - DB_USERNAME=digger
            - DB_DATABASE=digger
            - DB_PASSWORD=my_password
            - APP_DEBUG=true
            - APP_ENV=local
        depends_on:
            - digger_maria
        ports:
            - 3000:3000
        volumes:
            - ./:/app
        # privileged: true # Privileged mode could be required to run this container under Windows
