version: '3.8' services: php: build: context: . ports: - "8080:80" # Apache server on port 8080 volumes: - ./src:/var/www/html # Mount the source code - ./xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini # Mount the Xdebug config environment: XDEBUG_MODE: debug XDEBUG_CONFIG: client_host=host.docker.internal client_port=9005 MARIADB_HOST: mariadb # MariaDB hostname in the network MARIADB_USER: mariadb # MariaDB root user (or customize as needed) MARIADB_PASSWORD: mariadb # Root password mariadb: image: mariadb:latest container_name: mariadb ports: - "3306:3306" # Expose MariaDB port environment: MARIADB_ROOT_PASSWORD: mariadb # Root password for MariaDB MARIADB_DATABASE: mariadb # Optional: Default database to create volumes: - mariadb_data:/var/lib/mysql # Persistent data storage volumes: mariadb_data: