xhgui, a GUI for XHProf, by FEROX
This image packages xhgui with MongoDB and NGINX so you can just focus on using it instead of how to install it!
frxyt/xhgui-dev
xhgui and xhgui-collector.frxyt/xhgui-dev to your docker-compose.yml file:
xhgui:
image: frxyt/xhgui-dev
ports:
- 127.0.0.1:80:80
php and xhgui containers are on the same docker-compose.yml fileTideways XHProf Extension enabled on your php containerphp and xhgui containers are on the same network
networks:
private:
services:
php:
networks:
- private
xhgui:
networks:
- private
xhgui to php:
volumes:
xhgui-vendor:
services:
php:
volumes:
- xhgui-vendor:/xhgui/vendor:ro
xhgui:
volumes:
- xhgui-vendor:/xhgui/vendor:rw
index.php:
if ($_SERVER['XHGUI_PROFILING'] && \file_exists('/xhgui/vendor/perftools/xhgui-collector/external/header.php')) {
require_once('/xhgui/vendor/perftools/xhgui-collector/external/header.php');
}
php:
environment:
- XHGUI_PROFILING=1
- XHGUI_SAVE_HANDLER=upload
You can see a full example here: tests/docker-compose.yml, tests/index.php.
git checkout https://github.com/frxyt/docker-xhgui-devcd docker-xhgui-dev/testsdocker-compose upxhgui-collector configurationThis image embed a custom configuration file for xhgui-collector if you mount its volume to your php container and incude /xhgui/vendor/perftools/xhgui-collector/external/header.php in your code. You can take advantage of this by setting environment variables on your php container:
XHGUI_PROFILING: This variable is not set by default, set it to any value to enable the profiling.XHGUI_SAVE_HANDLER: This variable can be set to file, mongodb or upload. Default and fallback is mongodb to respect the original behavior of the library.
file, you must set XHGUI_SAVE_HANDLER_FILENAME to choose where the files will be saved inside your php container.upload:
XHGUI_SAVE_HANDLER_UPLOAD_URI to change the full uri of xhgui import api, defaults to: http://xhgui/run/import.XHGUI_SAVE_HANDLER_UPLOAD_HOST to change the host of xhgui, defaults to: xhgui.XHGUI_SAVE_HANDLER_UPLOAD_TIMEOUT to change the timeout of uploads to xhgui in seconds, defaults to: 3 seconds.mongodb:
XHGUI_MONGO_URI to change the host of xhgui MongoDB database, defaults to: xhgui:27017.XHGUI_MONGO_DB to change the name of the database used by xhgui, defaults to: xhprof.docker build -f Dockerfile -t frxyt/xhgui-dev:latest .
This project and images are published under the MIT License.
MIT License
Copyright (c) 2019 FEROX YT EIRL, www.ferox.yt <[email protected]>
Copyright (c) 2019 Jérémy WALTHER <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Content type
Image
Digest
Size
279.9 MB
Last updated
over 6 years ago
docker pull frxyt/xhgui-dev