diff --git a/.env b/.env index 772629e..621ed32 100644 --- a/.env +++ b/.env @@ -12,3 +12,5 @@ DB_NAME=materio_d8 DB_LEGACY_NAME=materio_d7 DB_USERNAME=materio DB_PASSWORD=materio + +XDEBUG_CONF=./ressources/xdebug.conf diff --git a/.gitignore b/.gitignore index 83278aa..9b52872 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ log/* *.sql bin/syncfiles.sh solr_cores/* +ressources/xdebug.conf diff --git a/Docker/php/Dockerfile b/Docker/php/Dockerfile index cbe57a2..614d06d 100644 --- a/Docker/php/Dockerfile +++ b/Docker/php/Dockerfile @@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \ mysql-client \ zip \ libzip-dev && \ + cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini && \ # docker-php-ext-install -j$(nproc) iconv && \ docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ apt-get install -y imagemagick libmagickwand-dev && \ diff --git a/Docker/php/bashrc b/Docker/php/bashrc index 5a3eb24..70f55f9 100644 --- a/Docker/php/bashrc +++ b/Docker/php/bashrc @@ -1,4 +1,4 @@ -PS1='\e[36m\e[1mPHP-7.0\e[0m:\e[90m\w\e[0m\n$ ' +PS1='\e[36m\e[1mPHP-7.3\e[0m:\e[90m\w\e[0m\n$ ' bind '"\e[A": history-search-backward' bind '"\e[B": history-search-forward' diff --git a/Docker/php/php-custom.ini b/Docker/php/php-custom.ini index 626cd4e..ac5669b 100644 --- a/Docker/php/php-custom.ini +++ b/Docker/php/php-custom.ini @@ -1,4 +1,4 @@ -memory_limit = 2048M +memory_limit = 8192M upload_max_filesize = 50M post_max_size = 50M max_execution_time = 150 diff --git a/docker-compose.yml b/docker-compose.yml index a1fc950..09a0d9f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -79,18 +79,23 @@ services: build: ./Docker/php/ expose: - 9000 + - 9001 user: ${USER_UID}:${USER_GID} volumes: - php-user-data:/home/${USER_UNAME} - "${PROJECT_ROOT}:/var/www/html/d8.materio.com/public_html" - "${LEGACY_ROOT}:/var/www/html/d7.materio.com/public_html" - "${LOG_ROOT}/php:/var/log:rw" + - "${XDEBUG_CONF}:/usr/local/etc/php/conf.d/xdebug.ini" working_dir: "/var/www/html/d8.materio.com/public_html" networks: - database - redis - server - solr + # extra_hosts: + # - "host.docker.internal:192.168.144.4" + # - "testhost:192.168.0.21" depends_on: - mysql - mysql-legacy diff --git a/ressources/xdebug.conf.example b/ressources/xdebug.conf.example new file mode 100644 index 0000000..8257549 --- /dev/null +++ b/ressources/xdebug.conf.example @@ -0,0 +1,9 @@ +[xdebug] +xdebug.remote_enable=1 +xdebug.remote_host=172.20.0.1 # Should use host.docker.internal but not working on linux +xdebug.remote_connect_back=0 # Not working on docker context +xdebug.remote_port=9001 # 9000 is already bound by php-fpm +xdebug.remote_handler=dbgp +xdebug.remote_mode=req +xdebug.remote_autostart=true +xdebug.remote_log=/var/log/xdebug-error.log # Log file is mounted on volume so you can follow it