add envvar to enable core dumps, disable xdebug tracing

testing-php81
Andrew Dolgov 2 years ago
parent 94e1afa9ec
commit 14ebd6bbee
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A

@ -104,6 +104,20 @@ fi
# this was previously generated
rm -f $DST_DIR/config.php.bak
if [ ! -z "${TTRSS_CORE_DUMPS_ENABLED}" ]; then
apk add gdb
echo "don't forget to enable core dumps on the host:"
echo "echo '/tmp/core-%e.%p' > /proc/sys/kernel/core_pattern"
echo "then run gdb /usr/sbin/php-fpm81 /tmp/coredump-php-fpm-xyz"
# enable core dumps
sed -i.bak \
-e 's/;\(rlimit_core\) = .*/\1 = unlimited/' \
-e 's/; *\(process.dumpable\) = .*/\1 = yes/' \
/etc/php81/php-fpm.d/www.conf
fi
if [ ! -z "${TTRSS_XDEBUG_ENABLED}" ]; then
if [ -z "${TTRSS_XDEBUG_HOST}" ]; then
export TTRSS_XDEBUG_HOST=$(ip ro sh 0/0 | cut -d " " -f 3)
@ -112,7 +126,7 @@ if [ ! -z "${TTRSS_XDEBUG_ENABLED}" ]; then
env | grep TTRSS_XDEBUG
cat > /etc/php81/conf.d/50_xdebug.ini <<EOF
zend_extension=xdebug.so
xdebug.mode=develop,trace,debug
xdebug.mode=debug
xdebug.start_with_request = yes
xdebug.client_port = ${TTRSS_XDEBUG_PORT}
xdebug.client_host = ${TTRSS_XDEBUG_HOST}

Loading…
Cancel
Save