magento2-dockergento
magento2-dockergento copied to clipboard
PhpFpmDebug
-
Introduces
phpfpmdebug
service, nginx routes calls to this service based on whether the XDEBUG_SESSION cookie is set. This speeds up the development process as there's no need to rundebug-on
&debug-off
commands anymore. See for more details: https://jtreminio.com/blog/developing-at-full-speed-with-xdebug/ -
Makes XDebug hitting PhpStorm's default 9000 port.
In overall this makes the developer's experience more pleasant as it won't require: a) restarting the stack before and after the debugging session (= eliminates slow downs to the bare minimum) b) changing the listening port in PhpStorm settings
P.S.
- mac only,
- ideally most of the config changes should be implemented in https://github.com/ModestCoders/dockerfiles
It's extremely useful! I found it a couple of months ago. I've used the same instruction you mentioned (https://jtreminio.com/blog/developing-at-full-speed-with-xdebug/) with a little bit different in implementation. Anyway, it works like a charm :)
@dsmolovich really good idea! Thank you!
@ihor-sviziev The reason for the nginx/phpfpm swap was that I used to define graphs with dependencies going upwards or downwards (in this case it was downward: nginx depends on phpfpm and phpfpmdebug) - easier for reading and understanding. It's back now.
why do we need 9001 port here? As it's not php-fpm node -it's not conflicting anyhow with default 9000 port of xdebug. Could you replace it to 9000?
Agree. There was no real reason for this, it's back now.
I believe we could re-use volumes from phpfpm service. Can't we?
No luck. Unfortunately I have no idea on how to merge alias with other list elements. :)
BTW, it's the fastest mage env I've ever seen, I had no idea m2 can be that quick. Thank you for this project guys!
Ok it looks like a good idea atm. I see a lot of changes that should be done into dockerfiles, but it's hard to maintain this kind of features with 2 different repositories...
I'm giving it a try, so I'll merge it if I don't see any issues (I can only test it on linux at the moment). Later I will move changes to dockerfiles!
I've only 1 question (until I try it). In this line we expose port 9001: https://github.com/ModestCoders/dockerfiles/blob/master/php/7.2-fpm/Dockerfile#L70 That line could be deleted right?
Thank you for your work! @ihor-sviziev @dsmolovich
Yes, we can remove it
This wasn't ready to merge? Waiting for docker images to update?