Skip to content

Commit

Permalink
Merge pull request #81 from Padrio/master
Browse files Browse the repository at this point in the history
Added xdebug extension
  • Loading branch information
eko committed Jul 6, 2018
2 parents d878f24 + 9aafb87 commit a6b8331
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -64,6 +64,11 @@ You can access Nginx and Symfony application logs in the following directories o

You can also use Kibana to visualize Nginx & Symfony logs by visiting `http://symfony.localhost:81`.

# Use xdebug!

To use xdebug change the line `"docker.host:127.0.0.1"` in docker-compose.yml and replace 127.0.0.1 with your machine ip addres.
If your IDE default port is not set to 5902 you should do that, too.

# Code license

You are free to use the code in this repository under the terms of the 0-clause BSD license. LICENSE contains a copy of this license.
2 changes: 2 additions & 0 deletions docker-compose.yml
Expand Up @@ -18,6 +18,8 @@ services:
- ./logs/symfony:/var/www/symfony/var/logs:cached
links:
- db
extra_hosts:
- "docker.host:127.0.0.1"
nginx:
build: ./nginx
ports:
Expand Down
4 changes: 3 additions & 1 deletion php-fpm/Dockerfile
Expand Up @@ -26,6 +26,7 @@ RUN apk add --update \
php7-tokenizer \
php7-session \
php7-simplexml \
php7-xdebug \
make \
curl

Expand All @@ -35,10 +36,11 @@ RUN curl --insecure https://getcomposer.org/composer.phar -o /usr/bin/composer &

ADD symfony.ini /etc/php7/php-fpm.d/
ADD symfony.ini /etc/php7/cli/conf.d/
ADD xdebug.ini /etc/php7/conf.d/

ADD symfony.pool.conf /etc/php7/php-fpm.d/

CMD ["php-fpm7", "-F"]

WORKDIR /var/www/symfony
EXPOSE 9000
EXPOSE 9000
6 changes: 6 additions & 0 deletions php-fpm/xdebug.ini
@@ -0,0 +1,6 @@
zend_extension=xdebug.so

[Xdebug]
xdebug.remote_enable=true
xdebug.remote_port=5902
xdebug.remote_host=docker.host

0 comments on commit a6b8331

Please sign in to comment.