Commit eb36d25c authored by Fabio Montefuscolo's avatar Fabio Montefuscolo

adiciona xdebug ao entrypoint do wordpress

parent 8fce3307
......@@ -18,18 +18,47 @@ export WP_DEBUG_LOG="${WP_DEBUG_LOG:-$WORDPRESS_WP_DEBUG_LOG}"
export WP_DEBUG_DISPLAY="${WP_DEBUG_DISPLAY:-$WORDPRESS_WP_DEBUG_DISPLAY}"
if [ "$WP_DEBUG" != "true" ] && [ "$OPCACHE" != "false" ];
if [ "$WP_DEBUG" != "true" ];
then
cat > /usr/local/etc/php/conf.d/opcache-recommended.ini << EOF
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
EOF
if [ "$OPCACHE" != "false" ];
then
inifile="/usr/local/etc/php/conf.d/opcache-recommended.ini" ;
{
echo 'opcache.memory_consumption=128';
echo 'opcache.interned_strings_buffer=8';
echo 'opcache.max_accelerated_files=4000';
echo 'opcache.revalidate_freq=60';
echo 'opcache.fast_shutdown=1';
echo 'opcache.enable_cli=1';
} > $inifile;
unset inifile;
fi
fi
if [ "$WP_DEBUG" = "true" ];
then
if [ "$XDEBUG" != "false" ];
then
inifile="/usr/local/etc/php/conf.d/pecl-xdebug.ini"
extfile="$(find /usr/local/lib/php/extensions/ -name xdebug.so)";
remote_port="${XDEBUG_IDEKEY:-9000}";
idekey="${XDEBUG_IDEKEY:-xdbg}";
if [ -f "$extfile" ] && [ ! -f "$inifile" ];
then
{
echo "[Xdebug]";
echo "zend_extension=${extfile}";
echo "xdebug.idekey=${idekey}";
echo "xdebug.remote_enable=1";
echo "xdebug.remote_connect_back=1";
echo "xdebug.remote_autostart=1";
echo "xdebug.remote_port=${remote_port}";
} > $inifile;
fi
unset extfile remote_port idekey;
fi
fi
#
# Should I respect the owner of mounted volumes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment