Add support for profiling via xdebug

This commit is contained in:
Dale Davies
2022-07-19 12:24:20 +01:00
parent 380093ec19
commit 2d0d7c89fb
4 changed files with 12 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
/node_modules
/xdebug
*/vendor
docker-compose.yaml

View File

@@ -62,6 +62,9 @@ RUN mkdir -p /var/www/cache/application \
/var/www/cache/application \
&& chmod +x /usr/local/bin/entrypoint.sh
RUN mkdir -p /tmp/xdebug \
&& chown -R jumpapp:jumpapp /tmp/xdebug
# Expose the port we configured for nginx.
EXPOSE 8080

View File

@@ -64,6 +64,10 @@ if [ -z "${DEVELOPMENT-}" ]; then
echo >&2 "";
echo >&2 "-------------------------------------------------------------"
echo >&2 "";
else
echo >&2 "- Setting correct ownership of xdebug dir"
chown -R jumpapp:jumpapp /tmp/xdebug
fi
php-fpm8

View File

@@ -1,6 +1,8 @@
zend_extension=xdebug.so
xdebug.mode=debug
xdebug.mode=debug,profile
xdebug.discover_client_host = true
xdebug.start_with_request=trigger
xdebug.log="/tmp/xdebug.log"
xdebug.log="/tmp/xdebug.log"
xdebug.output_dir="/tmp/xdebug"
xdebug.profiler_output_name = %s.%R.%p.%r