Use the PHP SPX extension to gain insight into performance metrics of a PHP application.
This example Docker Compose manifest expects that you have your main application services defined in docker-compose.yml
. It will listen for requests on port 81
.
docker-compose-spx.yml
services:
nginx-spx:
image: wodby/nginx:1.19
environment:
NGINX_VHOST_PRESET: php
NGINX_BACKEND_HOST: spx
NGINX_SERVER_ROOT: /var/www/html/public_html
ports:
- 81:80
volumes:
- app:/var/www/html
spx:
image: ghcr.io/nedix/spx-docker:8.2
volumes:
- app:/var/www/html
depends_on:
- nginx-spx
volumes:
app:
driver: local
driver_opts:
device: ${PWD}
o: bind
type: none
docker compose -f docker-compose.yml -f docker-compose-spx.yml up -d
Navigate to any page on http://127.0.0.1:81 to capture the profiling report.
Navigate to the SPX web interface on http://127.0.0.1:81/?SPX_UI_URI=/&SPX_KEY=dev.
Powered by SPX.