+ hvg-blog-general theme

This commit is contained in:
felegy
2022-06-08 21:34:12 +02:00
parent 74c7fd73ce
commit 039d95726c
15 changed files with 333 additions and 13 deletions

11
.dev/020-xdebug.ini Normal file
View File

@@ -0,0 +1,11 @@
zend_extension = xdebug.so
; Xdebug
[XDebug]
xdebug.max_nesting_level = 256
xdebug.show_exception_trace = 0
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_host = ${XDEBUG_HOST}

View File

@@ -6,8 +6,11 @@ mkdir -p /tmp/build_cache /tmp/env;
rm -rf /app/.heroku /app/.profile.d /app/vendor/*
STACK=heroku-20 "$PHP_BUILDPACK/bin/compile" /app /tmp/build_cache /tmp/env; \
STACK=heroku-20 "$PHP_BUILDPACK/bin/compile" /app /tmp/build_cache /tmp/env;
cp -v config/mailhog.ini /app/.heroku/php/etc/php/conf.d/225-mailhog.ini;
rm -rf /app/vendor/*
composer install
rm -rf /app/vendor/*;
composer install;
exec .dev/xdebug-install.sh;

View File

@@ -18,7 +18,7 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header Host $host;
proxy_pass http://wordpress:3000;
}
}

73
.dev/xdebug-install.sh Executable file
View File

@@ -0,0 +1,73 @@
#!/usr/bin/env bash
# Define directories.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
XDEBUG_VERSION=${XDEBUG_VERSION-3.1.5}
# echo colors
LED='\033[0;34m'
OK='\033[0;32m'
NC='\033[0m' # No Color
#############
###########################################################################
# COMPILE PHP xDebug
###########################################################################
XDEBUG_RELEASE_URI="https://xdebug.org/files/xdebug-$XDEBUG_VERSION.tgz";
SRC_PATH="/tmp";
XDEBUG_SRC_PATH=$SRC_PATH/xdebug-$XDEBUG_VERSION
echo -e "${LED}XDEBUG${NC} Download $XDEBUG_RELEASE_URI ..."
curl -# $XDEBUG_RELEASE_URI| tar --warning=none -xz -C $SRC_PATH
echo -e "${OK}done${NC}"
# Build from repo
#echo -e "${LED}XDEBUG${NC} Cloning source to $XDEBUG_SRC_PATH ..."
#git clone git://github.com/xdebug/xdebug.git $XDEBUG_SRC_PATH
#echo -e "${OK}done${NC}"
LOGDIR="${PWD}/.log"
mkdir -p "${LOGDIR}"
LOGFILE="${LOGDIR}/xdebug_build.log"
echo -e "${LED}XDEBUG${NC} Compile at $XDEBUG_SRC_PATH ..."
(
cd $XDEBUG_SRC_PATH
echo $PWD
echo -e "`date +%H:%M:%S` : Scan workspace" > $LOGFILE
ls -la >> $LOGFILE 2>&1
echo -e "`date +%H:%M:%S` : Starting work" >> $LOGFILE
phpize >> $LOGFILE 2>&1
./configure --enable-xdebug >> $LOGFILE 2>&1
make -k >> $LOGFILE 2>&1
echo -e "${OK}done${NC}"
###########################################################################
# INSTALL PHP xDebug
###########################################################################
EXTENSION_PATH=$( php-config --extension-dir );
LIB_PATH="$( php-config --prefix )/lib"
INSTALL_PATH=$( php-config --ini-dir );
XDEBUG_INI="020-xdebug.ini";
XDEBUG_INI_PATH=$SCRIPT_DIR/$XDEBUG_INI;
echo -e "${LED}XDEBUG${NC} Install bin to $EXTENSION_PATH ..."
cp -v modules/*.so $EXTENSION_PATH
cp -v modules/*.la $LIB_PATH
echo -e "${OK}done${NC}"
echo -e "${LED}XDEBUG${NC} Install ini to $INSTALL_PATH ..."
if [ ! -f $XDEBUG_INI_PATH ]; then
echo "zend_extension = xdebug.so" >> $XDEBUG_INI_PATH
fi
cp -v $XDEBUG_INI_PATH $INSTALL_PATH/$XDEBUG_INI
echo -e "${OK}done${NC}"
echo -e "${LED}XDEBUG${NC} All Install ${OK}done${NC}"
###########################################################################
)
exit 0