services:
    mariadb-dev:
        container_name: dolibarr-mariadb-dev
        image: mariadb:latest
        environment:
            MARIADB_ROOT_PASSWORD: $MYSQL_ROOT_PWD
            MARIADB_DATABASE: "dolibarr-dev"

    web:
        container_name: dolibarr-web-dev
        build: .

        volumes:
         - ../../../htdocs:/var/www/html/
         - ../../../documents:/var/www/documents

        depends_on:
            - mariadb-dev
        environment:
            HOST_USER_ID: $HOST_USER_ID
            HOST_GROUP_ID: $HOST_GROUP_ID
            DOLI_DATABASE: "dolibarr-dev"
            DOLI_DB_SERVER: "mariadb-dev"
            DOLI_DB_USER: "root"
            DOLI_DB_PASSWORD: $MYSQL_ROOT_PWD
        ports:
            - "8080:80"
