Skip to content
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

Added xdebug extension #81

Merged
merged 6 commits into from Jul 6, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 machines ip addres.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great but can you fix typos here please:
your machines ip addres -> your machine ip address

If your IDEs default port is not set to 5902 you should do that, too.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDEs -> IDE


# 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