Closed jfastnacht closed 6 years ago
The web container does not use debian's init system, it uses supervisord, so restarts of that type can never work. However, you might consider just trying a killall -HUP php-fpm
after the install.
Perhaps your second line can be bash -c "apt-get install -y php7.1-ldap || true" and then another line to
killall -HUP php-fpm`
Oh, I just tried this; that's not an error and doesn't end with non-true response code, it just can't restart fpm because we don't use regular service stuff, we use supervisord, so if needed, do the killall -HUP php-fpm or if that's not enough you can do a killall -HUP 1 (to reload supervisord from scratch).
Thank you for the fast reply, the killall -HUP php-fpm
fixed it, even if it looks odd to me.
Since I haven't found any related issue, I wonder if I am the first one to stumble over that (I doubt it). Could you consider adding that to the official documentation on https://ddev.readthedocs.io/en/latest/users/extending-commands/?
Have you considered unifying the PHP module installation process over the config.yaml
? (Maybe a topic for a separate ticket)
It's a good idea; Adding a PHP module is slightly different from lots of other things as you point out.
the HUP signal (signal 1) is the old time Linux way to get a daemon to reload. "kill" is just a utility to send a signal, which by default sends signal 15 (TERM), but can send any other signal. killall just kills by process name. SO that's the story on that :)
Glad to hear this problem could be solved. I give my +1 for adding this to the docs. I also would like to see the feature, adding PHP-modules with some kind of configuration outsides the containers. The preinstalled modules fulfills a lot of requirements but not all. Especially the ldap module is often needed. So herefore also my +1 :).
Please take a look at https://github.com/drud/ddev/pull/1121 and see what you think about it, or if you have any suggestions.
I do think it might make sense to eventually just add a list of extra requested modules in config.yaml.
Describe the bug When installing php-ldap with post-start hooks (as recommended) the restart of the services to activate the LDAP module fails due to the
/usr/sbin/policy-rc.d
(https://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt) which is set toexit 101
by default.To Reproduce Steps to reproduce the behavior:
php-ldap
intoconfig.yaml
ddev start
ddev ssh
into machine and checkphp -m
, the module is installedphpinfo()
on webserver, the module is not activatedYou can
ddev stop
andddev start
again, the module should be active after the restart.Expected behavior The service should restart properly and the PHP module should work without restarting the whole project.
Since I assume that this is not only a problem of the LDAP module, it might be good to think about implementing a way to properly configure PHP modules over the
config.yaml
and to unify the installation process of PHP modules.Version and configuration information (please complete the following information):
docker version
) and insert it here.Server: Engine: Version: 18.06.1-ce API version: 1.38 (minimum version 1.12) Go version: go1.10.3 Git commit: e68fc7a Built: Tue Aug 21 17:28:38 2018 OS/Arch: linux/amd64 Experimental: false
web drud/ddev-webserver:v1.1.0 db drud/ddev-dbserver:v1.1.0 dba drud/phpmyadmin:v1.1.0 router drud/ddev-router:v1.1.0 commit v1.1.1 domain ddev.local cli v1.1.1
A custom nginx-site.conf for Symfony. Would post only if necessary.
Additional context
Add any other context about the problem here. Thanks!