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

How should we debug a drupal site/hostmaster? #6

Open
clemens-tolboom opened this issue Aug 23, 2016 · 4 comments
Open

How should we debug a drupal site/hostmaster? #6

clemens-tolboom opened this issue Aug 23, 2016 · 4 comments

Comments

@clemens-tolboom
Copy link
Contributor

clemens-tolboom commented Aug 23, 2016

The image misses ie xdebug which should be added I guess.

@clemens-tolboom
Copy link
Contributor Author

clemens-tolboom commented Sep 13, 2016

First we need adjust https://github.com/aegir-project/dockerfiles project with

sudo apt-get install php5-xdebug

Next we need to inject xdebug in file /etc/php5/apache2/conf.d/30-xdebug-aegir.ini containing something like

zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.max_nesting_level=300

(taken from http://wylbur.us/2014-06-17-add-xdebug-to-ubuntu-1404)

Discussed with @helmo it does not seemed wise to always have xdebug enabled as this is used by the tests too and xdebug drains performance right?

@clemens-tolboom
Copy link
Contributor Author

clemens-tolboom commented Sep 13, 2016

According to https://github.com/docker-library/wordpress/blob/master/apache/Dockerfile we should use echo

RUN { \
        echo 'opcache.memory_consumption=128'; \
        echo 'opcache.interned_strings_buffer=8'; \
        echo 'opcache.max_accelerated_files=4000'; \
        echo 'opcache.revalidate_freq=60'; \
        echo 'opcache.fast_shutdown=1'; \
        echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini

@helmo
Copy link
Member

helmo commented Nov 10, 2016

Please checkout aegir-project/dockerfiles#22

@jonpugh
Copy link
Member

jonpugh commented Nov 10, 2016

Thanks, @clemens-tolboom and @helmo. I added a xdebug "tag" Dockerfile, so if you want that instead, you can change image: aegir/hostmaster:xdebug

I agree we shouldn't use it in tests, but we could make it the default in this repo's docker-compose.yml, since it's explicitly for development?

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

No branches or pull requests

3 participants