diff --git a/app/Dockerfile b/app/Dockerfile index 93a9b0e..7601036 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -26,9 +26,10 @@ RUN sed -i.bak 's/;clear_env = .*/clear_env = no/i' /etc/php8/php-fpm.d/www.conf ENV OWNER_UID=1000 ENV OWNER_GID=1000 +# TTRSS_XDEBUG_HOST defaults to host IP if unset ENV TTRSS_XDEBUG_ENABLED="" ENV TTRSS_XDEBUG_HOST="" -ENV TTRSS_XDEBUG_PORT="" +ENV TTRSS_XDEBUG_PORT="9000" ENV TTRSS_DB_TYPE="pgsql" ENV TTRSS_DB_HOST="db" diff --git a/app/startup.sh b/app/startup.sh index ae2ee4c..dd605aa 100755 --- a/app/startup.sh +++ b/app/startup.sh @@ -78,6 +78,9 @@ cp ${SCRIPT_ROOT}/config.docker.php $DST_DIR/config.php rm -f $DST_DIR/config.php.bak 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) + fi echo enabling xdebug with the following parameters: env | grep TTRSS_XDEBUG cat > /etc/php8/conf.d/50_xdebug.ini <