Skip to content

Commit

Permalink
Add the ability to set up a custom Xdebug host IP
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
peresypkin committed May 3, 2022
1 parent 3966b3b commit 3129dd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generator/src/templates/deploy.bash.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ') }}"
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 3129dd2

Please sign in to comment.