From 3129dd2bea68644e452b9995c51c750e24b4ede4 Mon Sep 17 00:00:00 2001 From: Oleksandr Peresypkin Date: Wed, 3 Nov 2021 09:42:56 +0000 Subject: [PATCH] Add the ability to set up a custom Xdebug host IP * Add the ability to set up a custom Xdebug host IP for the case when Docker is deployed inside a virtual machine (e.g. Vagrant + VirtualBox) for local development. --- generator/src/templates/deploy.bash.twig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generator/src/templates/deploy.bash.twig b/generator/src/templates/deploy.bash.twig index 7cc5f75dc..f92d80011 100644 --- a/generator/src/templates/deploy.bash.twig +++ b/generator/src/templates/deploy.bash.twig @@ -122,6 +122,7 @@ readonly SPRYKER_STORES=({{ regions | map((regionData, region) => "'local REGION readonly SPRYKER_DEFAULT_STORE="{{ (regions | first)['stores'] | keys | first }}" readonly SPRYKER_FILE_MODE="{{ _fileMode }}" readonly SPRYKER_XDEBUG_MODE_ENABLE="{{ docker['debug']['xdebug']['enabled'] is not defined or docker['debug']['xdebug']['enabled'] == true ? '1' : '' }}" +readonly SPRYKER_CUSTOM_XDEBUG_HOST_IP="{{ docker['debug']['xdebug']['custom_host_ip'] | default('') }}" readonly SPRYKER_SYNC_SESSION_NAME="{{ _syncSessionName }}" readonly SPRYKER_SYNC_VOLUME="${SPRYKER_DOCKER_PREFIX}_${SPRYKER_DOCKER_TAG}_data_sync" readonly DOCKER_COMPOSE_FILES_EXTRA="{{ docker['compose']['yamls'] | default([]) | join(' ') }}" @@ -153,7 +154,7 @@ readonly SSH_AUTH_SOCK_IN_CLI="$([ -n "${SSH_AUTH_SOCK}" ] && [ -z "${COMPOSER_A # Global variables readonly USER_FULL_ID=$(Environment::getFullUserId) -readonly SPRYKER_XDEBUG_HOST_IP=$(Environment::getHostIp) +readonly SPRYKER_XDEBUG_HOST_IP=${SPRYKER_CUSTOM_XDEBUG_HOST_IP:-$(Environment::getHostIp)} readonly SECRETS_ENVIRONMENT=("COMPOSER_AUTH='${COMPOSER_AUTH}'") command=${1}