spatie / wordpress-ray

Debug with Ray to fix problems faster in WordPress apps
https://myray.app
MIT License
73 stars 14 forks source link

Doesn't work on Docker, Windows 10 #27

Closed jonochong closed 3 years ago

jonochong commented 3 years ago

I'm running WordPress on Docker Desktop (Version 3.0.4) Plugin installed (Version 1.1.1) Added "define( 'WP_ENVIRONMENT_TYPE', 'local' );" in wp-config.php In plugin, ray("hello"); and also error_log("Hello"); "Hello" in debug.log Nothing in Ray.

Tried adding in docker-compose: extra_hosts:

Still nothing.

Docker compose file for reference:

version: '3' services: database: image: mysql:5.7 command:

Any ideas?

Thank you!

freekmurze commented 3 years ago

Could you try mapping port 23517

jonochong commented 3 years ago

Thank you for the suggestion.

I tried mapping "23517:23517" for wordpress. No joy. netstat returns

TCP 0.0.0.0:23517 0.0.0.0:0 LISTENING 22216 TCP [::]:23517 [::]:0 LISTENING 22216

I tried changing the port on Ray to 22216, but still nothing.

freekmurze commented 3 years ago

Then, I don't know...

The desktop app just listens for messages on the port. The Ray package just sends things to that port.

I guess you should research how you can open a port on Docker on how to map that to a port on your native environment.

jonochong commented 3 years ago

Understood. Thank you for pointing me in the direction! Cheers!

felix-exon commented 2 years ago

I can confirm this is an issue.

M1 Mac using wordpress inside a docker container.

I've included the port to my docker-compose.yml but no ray() calls seem to reach the electron app 😢 . I am calling ray from a wordpress plugin :/

Environment is also set as documented