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

Adding XDebug & MailCatcher support #146

Open
swashata opened this issue Aug 3, 2018 · 4 comments
Open

Adding XDebug & MailCatcher support #146

swashata opened this issue Aug 3, 2018 · 4 comments

Comments

@swashata
Copy link

swashata commented Aug 3, 2018

Hi,

First of all thank you very much for this project. It has enabled me to use docker instead of vvv for developing WordPress Plugins and Themes.

There were two things I missed the most when making transition

  1. XDebug Remote debugging (yes it works great with VSCode).
  2. MailCatcher for debugging and testing emails.

I have managed to add both to this awesome container and I am willing to send PR to add support. Please let me know if you are interested.

@swashata
Copy link
Author

swashata commented Aug 3, 2018

PS: The trick to add xdebug remote support was to set xdebug.remote_host=host.docker.internal as described here.

Installing and configuring mailcatcher was straight forward, gem install mailcatcher and then copying over a conf file.

@dsifford
Copy link
Collaborator

dsifford commented Aug 3, 2018

Hi @swashata,

Thanks for the kind words. Glad to hear the project has served you well.

As @karellm I think will attest, our primary focus with this project is keeping the WordPress service as lean and focused on just WordPress as possible (with the singular exception being having a mechanism for SSL cert automation baked into the image).

I do agree that both XDebug and MailCatcher are attractive tools for development setting, but there are a good number of individuals (including myself) that use this image for production environments as well, so having the extra bloat isn't ideal for those cases.


To speak to both XDebug and MailCatcher individually

XDebug: We've tossed around the idea of adding it before and decided against it. This might be better suited for a fork of this project where you can add things specific to your needs.

MailCatcher: Have you considered instead adding a separate service for this, exposing port 1025, and communicating with the wordpress image that way?

@swashata
Copy link
Author

swashata commented Aug 3, 2018

Hi,

Thanks for the quick response. I've totally taken the wrong route for the MailCatcher. I am fairly new to docker, and honestly I had no idea that I could do that. Thanks for the tip 😄

About XDebug, it actually only makes sense to install on development environment. I have seen the PR before (in fact I made it my starting point), but I guess with the availability of host.docker.internal it is now simpler to add remote debugging. I am actually using it for development right now.

Anyway, I will leave it up to you to decide whether it is worth-while to have xdebug or not. I am afraid that it may not work at all for linux hosts, because host.docker.internal is actually available on mac and windows only and the workaround mentioned in the issue may not work for listening on xdebug server provided by IDE.

Please close this issue if you don't think there is something we can do about it right now.

@karellm
Copy link
Collaborator

karellm commented Aug 3, 2018

I agree that XDebug shouldn't be forced into the image. That said we could make a dev image or have a dev tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants