perftools / xhgui

Web interface for XHProf profiling data can store data in MongoDB or PDO database
1.65k stars 343 forks source link

Add nginx to docker base image #395

Closed glensc closed 3 years ago

glensc commented 3 years ago

This drops separate nginx container, and therefore avoids the need to synchronize data with fpm and nginx container with webroot volume.

The webroot volume is a source of annoyance when its content changes. need to prune the volume to catch up updates from it.

For the end-users, they needed to stop containers, remove xhgui_webroot-share docker volume manually.

Note: On upgrade need to delete old container:

$ docker-compose down --rm-orphans

Note: This switches php-fpm user to www-data (was mistakenly nobody).

/var/www/xhgui # ps axwuf
PID   USER     TIME  COMMAND
    1 root      0:00 php-fpm: master process (/etc/php7/php-fpm.conf)
    8 root      0:00 nginx: master process nginx
    9 nginx     0:00 nginx: worker process
   10 nginx     0:00 nginx: worker process
   11 nginx     0:00 nginx: worker process
   12 nginx     0:00 nginx: worker process
   13 www-data  0:01 php-fpm: pool www
   14 www-data  0:00 php-fpm: pool www
/var/www/xhgui #