Conversation
|
It's extremely useful! I found it a couple of months ago. |
| location ~ ^/setup/index.php { | ||
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
| fastcgi_pass fastcgi_backend; | ||
| fastcgi_pass $my_fastcgi_pass:9001; |
There was a problem hiding this comment.
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?
| fastcgi_pass $my_fastcgi_pass:9001; | |
| fastcgi_pass $my_fastcgi_pass:9000; |
Related to #49
| ;user = app | ||
| ;group = app | ||
|
|
||
| listen = 9001 |
There was a problem hiding this comment.
| listen = 9001 | |
| listen = 9000 |
| volumes: *appvolumes-mac | ||
|
|
||
| phpfpmdebug: | ||
| volumes: |
There was a problem hiding this comment.
I believe we could re-use volumes from phpfpm service. Can't we?
| phpfpm: | ||
| image: modestcoders/php:7.1-fpm | ||
|
|
||
| nginx: |
There was a problem hiding this comment.
I don't thing we really need to flip phpfom and nginx. Is there any idea behind it?
|
@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.
Agree. There was no real reason for this, it's back now.
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! |
ihor-sviziev
left a comment
There was a problem hiding this comment.
Looks like linux docker-compose file should be also updated (BTW not sure about windows)
| - elasticsearch | ||
|
|
||
| phpfpmdebug: | ||
| image: modestcoders/php:7.2-fpm |
There was a problem hiding this comment.
image should be the same as in phpfpm: modestcoders/php:7.1-fpm
otherwise we'll have different php versions with and w/o xdebug
| phpfpm: | ||
| image: modestcoders/php:7.1-fpm | ||
| volumes: &appvolumes | ||
| - sockdata:/sock |
There was a problem hiding this comment.
now sockdata volume is never used, probably could be removed
| @@ -26,6 +22,9 @@ services: | |||
| - ./config/dockergento/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini:delegated | |||
There was a problem hiding this comment.
There is missing # {FILES_IN_GIT} - it will be replaced during setup
|
Ok it looks like a good idea atm. 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 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? |
Introduces
phpfpmdebugservice, 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-offcommands 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.