From c35ec4962b6164b5aa0f5df65efc041e455f00b5 Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 9 Mar 2021 13:05:35 +0100 Subject: [PATCH] activated api xdebug --- .env | 2 ++ docker-compose.yml | 1 + ressources/xdebug.ini | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 ressources/xdebug.ini diff --git a/.env b/.env index 597724b..69e4a87 100644 --- a/.env +++ b/.env @@ -9,3 +9,5 @@ DB_ROOT_PASSWORD=enfrancais DB_NAME=enfrancais DB_USERNAME=enfrancais DB_PASSWORD=enfrancais + +XDEBUG_INI=./ressources/xdebug.ini diff --git a/docker-compose.yml b/docker-compose.yml index e0780a3..a823fe1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -47,6 +47,7 @@ services: - php-user-data:/home/${USER_UNAME} - "${API_ROOT}:/var/www/html/api" - "${LOG_ROOT}/php:/var/log:rw" + - "${XDEBUG_INI}:/usr/local/etc/php/conf.d/xdebug.ini" working_dir: "/var/www/html/api/src" networks: - database diff --git a/ressources/xdebug.ini b/ressources/xdebug.ini new file mode 100644 index 0000000..09a71ea --- /dev/null +++ b/ressources/xdebug.ini @@ -0,0 +1,17 @@ +[xdebug] +xdebug.remote_enable=1 +;Should use host.docker.internal but not working on linux +xdebug.remote_host=172.20.0.1 +;Not working on docker context +xdebug.remote_connect_back=0 +;9000 is already bound by php-fpm +xdebug.remote_port=9001 +xdebug.remote_handler=dbgp +xdebug.remote_mode=req +xdebug.remote_autostart=true +;Log file is mounted on volume so you can follow it +xdebug.remote_log=/var/log/xdebug-error.log +xdebug.profiler_enable_trigger=1 +xdebug.profiler_enable=0 +xdebug.profiler_output_dir=/var/log/ +; Example: http://localhost:8080/test?XDEBUG_PROFILE=1