version: '3.0'
services:
    db:
        image: mariadb:10.7
        working_dir: /application
        command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb-file-per-table=1]
        environment:
            MYSQL_ROOT_PASSWORD: ROOT
            MYSQL_DATABASE: pimcore_test
            MYSQL_USER: pimcore
            MYSQL_PASSWORD: pimcore

    php-fpm:
        #user: '1000:1000' # set to your uid:gid
        #image: pimcore/pimcore:PHP8.1-fpm-debug
        image: pimcore/pimcore:PHP8.1-fpm
        environment:
            PHP_IDE_CONFIG: "serverName=localhost"
            COMPOSER_HOME: /var/www/html
            PIMCORE_PROJECT_ROOT: /var/www/html
            APP_ENV: test
            PIMCORE_TEST: 1
            PIMCORE_TEST_DB_DSN: "mysql://pimcore:pimcore@db:3306/pimcore_test"
        depends_on:
            - db
        volumes:
            - ../../.:/var/www/html
            - /var/www/html/vendor
            - /var/www/html/kernel
            - /var/www/html/config
            - /var/www/html/templates
            - /var/www/html/bin
            - /var/www/html/public
            - /var/www/html/var