Skip to content

Commit af9b1e6

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 39f2a49 commit af9b1e6

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
@@ -123,6 +123,7 @@ readonly SPRYKER_STORES=({{ regions | map((regionData, region) => "'local REGION
123123
readonly SPRYKER_DEFAULT_STORE="{{ (regions | first)['stores'] | keys | first }}"
124124
readonly SPRYKER_FILE_MODE="{{ _fileMode }}"
125125
readonly SPRYKER_XDEBUG_MODE_ENABLE="{{ docker['debug']['xdebug']['enabled'] is not defined or docker['debug']['xdebug']['enabled'] == true ? '1' : '' }}"
126+
readonly SPRYKER_CUSTOM_XDEBUG_HOST_IP="{{ docker['debug']['xdebug']['custom_host_ip'] | default('') }}"
126127
readonly SPRYKER_SYNC_SESSION_NAME="{{ _syncSessionName }}"
127128
readonly SPRYKER_SYNC_VOLUME="${SPRYKER_DOCKER_PREFIX}_${SPRYKER_DOCKER_TAG}_data_sync"
128129
readonly DOCKER_COMPOSE_FILES_EXTRA="{{ docker['compose']['yamls'] | default([]) | join(' ') }}"
@@ -154,7 +155,7 @@ readonly SSH_AUTH_SOCK_IN_CLI="$([ -n "${SSH_AUTH_SOCK}" ] && [ -z "${COMPOSER_A
154155

155156
# Global variables
156157
readonly USER_FULL_ID=$(Environment::getFullUserId)
157-
readonly SPRYKER_XDEBUG_HOST_IP=$(Environment::getHostIp)
158+
readonly SPRYKER_XDEBUG_HOST_IP=${SPRYKER_CUSTOM_XDEBUG_HOST_IP:-$(Environment::getHostIp)}
158159
readonly SECRETS_ENVIRONMENT=("COMPOSER_AUTH='${COMPOSER_AUTH}'")
159160

160161
command=${1}

0 commit comments

Comments
 (0)