Skip to content

Add xdebug support #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ services:
context: .
dockerfile: ./php/Dockerfile
container_name: php74-container
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "9000:9000"
volumes:
- ./app:/var/www/project
- ./php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
networks:
- nginx-php74-mysql8-node

Expand Down
1 change: 1 addition & 0 deletions php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM php:7.4-fpm
RUN apt-get update && apt-get install -y zlib1g-dev g++ git libicu-dev zip libzip-dev zip \
&& docker-php-ext-install intl opcache pdo pdo_mysql \
&& pecl install apcu \
&& pecl install xdebug \
&& docker-php-ext-enable apcu \
&& docker-php-ext-configure zip \
&& docker-php-ext-install zip
Expand Down
5 changes: 5 additions & 0 deletions php/xdebug.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[xdebug]
zend_extension=xdebug.so
xdebug.mode=develop,debug
xdebug.discover_client_host=0
xdebug.client_host=host.docker.internal