Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove HOST_IP in favor of host-gateway #301

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ LOCAL_SRC=/your/totara/src/path
# Note that specifying just 'php' will automatically use the latest version of PHP that the Totara site supports
DEFAULT_CONTAINERS=nginx,pgsql13,php

# set this to your local IP address
# for mac just use "host.docker.internal"
# for linux run command "docker run --rm alpine ip -4 route list match 0/0 | cut -d' ' -f3" and use the resulting ip address
# most probably it is 172.17.0.1
HOST_IP=host.docker.internal

# Uncomment and change the following to a full path on your host
# If not specified tdb will use the folder "tdb_backup" in your home directory
#TDB_BACKUP_PATH=/your/path/to/backup/location
Expand Down
52 changes: 39 additions & 13 deletions compose/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
environment:
CONTAINERNAME: php-5.3-debug
TZ: ${TIME_ZONE}
HOST_IP: ${HOST_IP}
HOST_IP: ${HOST_IP:-host.docker.internal}
PHP_IDE_CONFIG: serverName=totara53
HIST_FILE: /root/.bash_history
DISABLE_AUTO_UPDATE: "true" # disables oh-my-zsh update message
Expand All @@ -39,6 +39,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-5.4:
image: totara/docker-dev-php54
Expand Down Expand Up @@ -67,7 +69,7 @@ services:
environment:
CONTAINERNAME: php-5.4-debug
TZ: ${TIME_ZONE}
HOST_IP: ${HOST_IP}
HOST_IP: ${HOST_IP:-host.docker.internal}
PHP_IDE_CONFIG: serverName=totara54
HIST_FILE: /root/.bash_history
DISABLE_AUTO_UPDATE: "true" # disables oh-my-zsh update message
Expand All @@ -79,6 +81,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-5.4-cron:
image: totara/docker-dev-php54-cron
Expand Down Expand Up @@ -119,7 +123,7 @@ services:
environment:
CONTAINERNAME: php-5.5-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: remote_host=${HOST_IP}
XDEBUG_CONFIG: remote_host=${HOST_IP:-host.docker.internal}
PHP_IDE_CONFIG: serverName=totara55
HIST_FILE: /root/.bash_history
DISABLE_AUTO_UPDATE: "true" # disables oh-my-zsh update message
Expand All @@ -131,6 +135,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-5.5-cron:
image: totara/docker-dev-php55-cron
Expand Down Expand Up @@ -171,7 +177,7 @@ services:
environment:
CONTAINERNAME: php-5.6-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: remote_host=${HOST_IP}
XDEBUG_CONFIG: remote_host=${HOST_IP:-host.docker.internal}
PHP_IDE_CONFIG: serverName=totara56
HIST_FILE: /root/.bash_history
DISABLE_AUTO_UPDATE: "true" # disables oh-my-zsh update message
Expand All @@ -183,6 +189,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-5.6-cron:
image: totara/docker-dev-php56-cron
Expand Down Expand Up @@ -223,7 +231,7 @@ services:
environment:
CONTAINERNAME: php-7.0-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: remote_host=${HOST_IP}
XDEBUG_CONFIG: remote_host=${HOST_IP:-host.docker.internal}
PHP_IDE_CONFIG: serverName=totara70
HIST_FILE: /root/.bash_history
DISABLE_AUTO_UPDATE: "true" # disables oh-my-zsh update message
Expand All @@ -235,6 +243,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-7.0-cron:
image: totara/docker-dev-php70-cron
Expand Down Expand Up @@ -275,7 +285,7 @@ services:
environment:
CONTAINERNAME: php-7.1-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: remote_host=${HOST_IP}
XDEBUG_CONFIG: remote_host=${HOST_IP:-host.docker.internal}
PHP_IDE_CONFIG: serverName=totara71
HIST_FILE: /root/.bash_history
DISABLE_AUTO_UPDATE: "true" # disables oh-my-zsh update message
Expand All @@ -287,6 +297,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-7.1-cron:
image: totara/docker-dev-php71-cron
Expand Down Expand Up @@ -327,7 +339,7 @@ services:
environment:
CONTAINERNAME: php-7.2-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: client_host=${HOST_IP}
XDEBUG_CONFIG: client_host=${HOST_IP:-host.docker.internal}
XDEBUG_SESSION: totara72
PHP_IDE_CONFIG: serverName=totara72
HIST_FILE: /root/.bash_history
Expand All @@ -340,6 +352,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-7.2-cron:
image: totara/docker-dev-php72-cron
Expand Down Expand Up @@ -380,7 +394,7 @@ services:
environment:
CONTAINERNAME: php-7.3-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: client_host=${HOST_IP}
XDEBUG_CONFIG: client_host=${HOST_IP:-host.docker.internal}
XDEBUG_SESSION: totara73
PHP_IDE_CONFIG: serverName=totara73
HIST_FILE: /root/.bash_history
Expand All @@ -393,6 +407,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-7.3-cron:
image: totara/docker-dev-php73-cron
Expand Down Expand Up @@ -433,7 +449,7 @@ services:
environment:
CONTAINERNAME: php-7.4-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: client_host=${HOST_IP}
XDEBUG_CONFIG: client_host=${HOST_IP:-host.docker.internal}
XDEBUG_SESSION: totara74
PHP_IDE_CONFIG: serverName=totara74
HIST_FILE: /root/.bash_history
Expand All @@ -446,6 +462,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-7.4-cron:
image: totara/docker-dev-php74-cron
Expand Down Expand Up @@ -485,7 +503,7 @@ services:
environment:
CONTAINERNAME: php-8.0-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: client_host=${HOST_IP}
XDEBUG_CONFIG: client_host=${HOST_IP:-host.docker.internal}
XDEBUG_SESSION: totara80
PHP_IDE_CONFIG: serverName=totara80
HIST_FILE: /root/.bash_history
Expand All @@ -498,6 +516,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-8.0-cron:
image: totara/docker-dev-php80-cron
Expand Down Expand Up @@ -545,7 +565,7 @@ services:
environment:
CONTAINERNAME: php-8.1-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: client_host=${HOST_IP}
XDEBUG_CONFIG: client_host=${HOST_IP:-host.docker.internal}
XDEBUG_SESSION: totara81
PHP_IDE_CONFIG: serverName=totara81
HIST_FILE: /root/.bash_history
Expand All @@ -558,6 +578,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-8.2:
image: totara/docker-dev-php82
Expand Down Expand Up @@ -595,7 +617,7 @@ services:
environment:
CONTAINERNAME: php-8.2-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: client_host=${HOST_IP}
XDEBUG_CONFIG: client_host=${HOST_IP:-host.docker.internal}
XDEBUG_SESSION: totara82
PHP_IDE_CONFIG: serverName=totara82
HIST_FILE: /root/.bash_history
Expand All @@ -608,6 +630,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

php-8.3:
image: totara/docker-dev-php83
Expand Down Expand Up @@ -645,7 +669,7 @@ services:
environment:
CONTAINERNAME: php-8.3-debug
TZ: ${TIME_ZONE}
XDEBUG_CONFIG: client_host=${HOST_IP}
XDEBUG_CONFIG: client_host=${HOST_IP:-host.docker.internal}
XDEBUG_SESSION: totara83
PHP_IDE_CONFIG: serverName=totara83
HIST_FILE: /root/.bash_history
Expand All @@ -658,6 +682,8 @@ services:
- ./shell:/root/custom_shell
networks:
- totara
extra_hosts:
- host.docker.internal:host-gateway

volumes:
totara-data:
Expand Down