From 7bc737a964e6082d4ee9cb171fe583ff64111e36 Mon Sep 17 00:00:00 2001 From: Marat Salakhov Date: Fri, 1 Apr 2022 21:24:38 +0300 Subject: [PATCH] added xdebug --- containers/php/Dockerfile | 2 ++ containers/php/conf/error_reporting.ini | 1 + containers/php/conf/xdebug.ini | 7 +++++++ docker-compose.yml | 4 +++- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 containers/php/conf/error_reporting.ini create mode 100644 containers/php/conf/xdebug.ini diff --git a/containers/php/Dockerfile b/containers/php/Dockerfile index 55589ba..b4ef75b 100644 --- a/containers/php/Dockerfile +++ b/containers/php/Dockerfile @@ -15,7 +15,9 @@ RUN echo 'deb [trusted=yes] https://repo.symfony.com/apt/ /' | tee /etc/apt/sour symfony-cli \ && docker-php-ext-install intl opcache pdo pdo_mysql \ && pecl install apcu \ + && pecl install xdebug \ && docker-php-ext-enable apcu \ + && docker-php-ext-enable xdebug \ && docker-php-ext-configure zip \ && docker-php-ext-install zip \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ diff --git a/containers/php/conf/error_reporting.ini b/containers/php/conf/error_reporting.ini new file mode 100644 index 0000000..d040e65 --- /dev/null +++ b/containers/php/conf/error_reporting.ini @@ -0,0 +1 @@ +error_reporting=E_ALL \ No newline at end of file diff --git a/containers/php/conf/xdebug.ini b/containers/php/conf/xdebug.ini new file mode 100644 index 0000000..7e1dc08 --- /dev/null +++ b/containers/php/conf/xdebug.ini @@ -0,0 +1,7 @@ +zend_extension=xdebug + +[xdebug] +xdebug.mode=develop,debug +xdebug.client_host=host.docker.internal +xdebug.start_with_request=yes +xdebug.file_link_format="vscode://file/%f:%l&/var/www/lux/>/home/marik/docker_images/insurance/app/" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 2ef04c7..cbc0129 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,9 @@ services: ports: - '9000:9000' volumes: - - ./containers/php/conf:/usr/local/etc/php + - ./containers/php/conf/php.ini:/usr/local/etc/php/php.ini + - ./containers/php/conf/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini + - ./containers/php/conf/error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini - ./app:/var/www/lux:rw depends_on: - database