From eec308a0ac8f674e10bbc66fe00a5ba84919a788 Mon Sep 17 00:00:00 2001 From: bach Date: Sun, 27 Apr 2025 22:28:12 +0200 Subject: [PATCH] some old modifes i forgot to commit --- .env | 2 ++ Docker/php/Dockerfile | 10 +++++++-- docker-compose.yml | 5 +++++ ressources/xdebug.ini | 50 +++++++++++++++++++++++++++++++++++++++++++ src | 2 +- 5 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 ressources/xdebug.ini diff --git a/.env b/.env index ae635a1..31ead3b 100644 --- a/.env +++ b/.env @@ -10,3 +10,5 @@ DB_ROOT_PASSWORD=edlp DB_NAME=edlp_d8 DB_USERNAME=edlp DB_PASSWORD=edlp + +XDEBUG_INI=./ressources/xdebug.ini diff --git a/Docker/php/Dockerfile b/Docker/php/Dockerfile index 634aa3c..752b2c5 100644 --- a/Docker/php/Dockerfile +++ b/Docker/php/Dockerfile @@ -8,8 +8,14 @@ RUN apt-get update && apt-get install -y \ default-mysql-client \ zip \ net-tools iproute2 \ - libzip-dev && \ - cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini && \ + libzip-dev + +# ENV TZ=Europe/Paris +RUN apt-get install -y tzdata && \ + echo "Europe/Paris" > /etc/timezone && \ + dpkg-reconfigure -f noninteractive tzdata + +RUN 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=/usr/include/ --with-jpeg=/usr/include/ && \ apt-get install -y imagemagick libmagickwand-dev && \ diff --git a/docker-compose.yml b/docker-compose.yml index 4e76122..420832c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,10 +49,15 @@ services: - "${LOG_ROOT}:/var/log:rw" - "${PROJECT_ROOT}:/var/www/html" - "${LEGACY_ROOT}:/var/www/drupal6" + - "${XDEBUG_INI}:/usr/local/etc/php/conf.d/xdebug.ini" networks: - database - redis - server + # for xdebug + # https://github.com/docker/for-linux/issues/264#issuecomment-965465879 + extra_hosts: + - host.docker.internal:host-gateway depends_on: - mysql - redis diff --git a/ressources/xdebug.ini b/ressources/xdebug.ini new file mode 100644 index 0000000..13dcc8a --- /dev/null +++ b/ressources/xdebug.ini @@ -0,0 +1,50 @@ +[xdebug] +; xdebug.remote_enable=1 +xdebug.mode=debug + +;Should use host.docker.internal but not working on linux +; xdebug.remote_host=172.20.0.1 +; Replaced by xdebug.client_host. +xdebug.client_host=host.docker.internal + + +;Not working on docker context +; xdebug.remote_connect_back=0 +; Replaced by xdebug.discover_client_host. +xdebug.discover_client_host=0 + + +;9000 is already bound by php-fpm +; xdebug.remote_port=9001 +; xdebug.remote_port # +; Replaced by xdebug.client_port. +; The default value has also changed from 9000 to 9003. +xdebug.client_port=9001 + +xdebug.remote_handler=dbgp + +; xdebug.remote_mode=req +; xdebug.remote_mode # +; For the req value (the original default), use xdebug.mode=debug with xdebug.start_with_request=trigger. If the original xdebug.remote_autostart behaviour is necessary, use xdebug.start_with_request=yes instead of trigger. + +; For the jit value, use xdebug.mode=debug and xdebug.start_upon_error=yes. + + +; xdebug.remote_autostart=true +; Use xdebug.mode=debug with xdebug.start_with_request=yes +xdebug.start_with_request=yes + +; ?=XDEBUG_SESSION_START=1 +;Log file is mounted on volume so you can follow it +; xdebug.remote_log=/var/log/xdebug-error.log +; Replaced by xdebug.log, which also includes log messages beyond Step Debugging. +xdebug.log=/var/log/xdebug-error.log + +; xdebug.profiler_enable=0 +; xdebug.profiler_enable_trigger=1 +; Use xdebug.mode=profile with xdebug.start_with_request=trigger. +xdebug.profiler_output_name = cachegrind.out.%t.%R +xdebug.output_dir=/var/log/ +; Use the generic xdebug.output_dir setting. + +; Example: http://localhost:8080/test?XDEBUG_PROFILE=1 diff --git a/src b/src index 2456deb..b48fba3 160000 --- a/src +++ b/src @@ -1 +1 @@ -Subproject commit 2456deb1606edd1d85a1e3b9cd30b92b04ec84bb +Subproject commit b48fba3311828faf5cfc4925b2bc9efdfe7c095a