Skip to content

Commit 54aa9ad

Browse files
author
Oleksandr Peresypkin
committed
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.
1 parent d4da2f7 commit 54aa9ad

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

generator/src/templates/deploy.bash.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ readonly SPRYKER_STORES=({{ regions | map((regionData, region) => "'local REGION
122122
readonly SPRYKER_DEFAULT_STORE="{{ (regions | first)['stores'] | keys | first }}"
123123
readonly SPRYKER_FILE_MODE="{{ _fileMode }}"
124124
readonly SPRYKER_XDEBUG_MODE_ENABLE="{{ docker['debug']['xdebug']['enabled'] is not defined or docker['debug']['xdebug']['enabled'] == true ? '1' : '' }}"
125+
readonly SPRYKER_CUSTOM_XDEBUG_HOST_IP="{{ docker['debug']['xdebug']['custom_host_ip'] | default('') }}"
125126
readonly SPRYKER_SYNC_SESSION_NAME="{{ _syncSessionName }}"
126127
readonly SPRYKER_SYNC_VOLUME="${SPRYKER_DOCKER_PREFIX}_${SPRYKER_DOCKER_TAG}_data_sync"
127128
readonly DOCKER_COMPOSE_FILES_EXTRA="{{ docker['compose']['yamls'] | default([]) | join(' ') }}"
@@ -158,7 +159,7 @@ readonly SSH_AUTH_SOCK_IN_CLI="$([ -n "${SSH_AUTH_SOCK}" ] && [ -z "${COMPOSER_A
158159

159160
# Global variables
160161
readonly USER_FULL_ID=$(Environment::getFullUserId)
161-
readonly SPRYKER_XDEBUG_HOST_IP=$(Environment::getHostIp)
162+
readonly SPRYKER_XDEBUG_HOST_IP=${SPRYKER_CUSTOM_XDEBUG_HOST_IP:-$(Environment::getHostIp)}
162163
readonly SECRETS_ENVIRONMENT=("COMPOSER_AUTH='${COMPOSER_AUTH}'")
163164

164165
command=${1}

0 commit comments

Comments
 (0)