From 2ff6b46725eb228cb73f1f00e37d48aaaf1a5a8a Mon Sep 17 00:00:00 2001 From: Simon Chester Date: Mon, 19 Aug 2024 18:22:34 +1200 Subject: [PATCH 01/11] Fix error running bash --- php/base/entrypoint.sh | 2 +- php/php56/Dockerfile | 2 +- php/php70/Dockerfile | 2 +- php/php71/Dockerfile | 2 +- php/php72/Dockerfile | 2 +- php/php73/Dockerfile | 2 +- php/php74/Dockerfile | 2 +- php/php80/Dockerfile | 2 +- php/php81/Dockerfile | 2 +- php/php82/Dockerfile | 2 +- php/php83/Dockerfile | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/php/base/entrypoint.sh b/php/base/entrypoint.sh index 4c7b2e2..892c3ae 100644 --- a/php/base/entrypoint.sh +++ b/php/base/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/bash # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc +echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc echo 'setopt +o nomatch' > ~/.zshrc echo 'source ~/custom_shell/.zshrc' >> ~/.zshrc diff --git a/php/php56/Dockerfile b/php/php56/Dockerfile index 1ce0576..b372946 100644 --- a/php/php56/Dockerfile +++ b/php/php56/Dockerfile @@ -90,7 +90,7 @@ COPY config/php.ini /usr/local/etc/php/php.ini COPY config/fpm.conf /usr/local/etc/php-fpm.d/zz-totara.conf # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ +RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc # Have the option of using the oh my zsh shell. diff --git a/php/php70/Dockerfile b/php/php70/Dockerfile index 45a2b64..5f1155c 100644 --- a/php/php70/Dockerfile +++ b/php/php70/Dockerfile @@ -111,7 +111,7 @@ COPY config/php.ini /usr/local/etc/php/ COPY config/fpm.conf /usr/local/etc/php-fpm.d/zz-totara.conf # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ +RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc # Have the option of using the oh my zsh shell. diff --git a/php/php71/Dockerfile b/php/php71/Dockerfile index ac2646d..94c5d28 100644 --- a/php/php71/Dockerfile +++ b/php/php71/Dockerfile @@ -103,7 +103,7 @@ COPY config/php.ini /usr/local/etc/php/ COPY config/fpm.conf /usr/local/etc/php-fpm.d/zz-totara.conf # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ +RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc # Have the option of using the oh my zsh shell. diff --git a/php/php72/Dockerfile b/php/php72/Dockerfile index de7c6ea..fd01346 100644 --- a/php/php72/Dockerfile +++ b/php/php72/Dockerfile @@ -113,7 +113,7 @@ COPY config/php.ini /usr/local/etc/php/ COPY config/fpm.conf /usr/local/etc/php-fpm.d/zz-totara.conf # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ +RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc # Have the option of using the oh my zsh shell. diff --git a/php/php73/Dockerfile b/php/php73/Dockerfile index 221864a..8e7814e 100644 --- a/php/php73/Dockerfile +++ b/php/php73/Dockerfile @@ -114,7 +114,7 @@ COPY config/php.ini /usr/local/etc/php/ COPY config/fpm.conf /usr/local/etc/php-fpm.d/zz-totara.conf # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ +RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc # Have the option of using the oh my zsh shell. diff --git a/php/php74/Dockerfile b/php/php74/Dockerfile index 1c92477..f756198 100644 --- a/php/php74/Dockerfile +++ b/php/php74/Dockerfile @@ -109,7 +109,7 @@ COPY config/php.ini /usr/local/etc/php/ COPY config/fpm.conf /usr/local/etc/php-fpm.d/zz-totara.conf # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ +RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc # Have the option of using the oh my zsh shell. diff --git a/php/php80/Dockerfile b/php/php80/Dockerfile index 6fa8e66..6d1653d 100644 --- a/php/php80/Dockerfile +++ b/php/php80/Dockerfile @@ -109,7 +109,7 @@ COPY config/php.ini /usr/local/etc/php/ COPY config/fpm.conf /usr/local/etc/php-fpm.d/zz-totara.conf # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ +RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc # Have the option of using the oh my zsh shell. diff --git a/php/php81/Dockerfile b/php/php81/Dockerfile index 9dd43cd..cf1a857 100644 --- a/php/php81/Dockerfile +++ b/php/php81/Dockerfile @@ -109,7 +109,7 @@ COPY config/php.ini /usr/local/etc/php/ COPY config/fpm.conf /usr/local/etc/php-fpm.d/zz-totara.conf # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ +RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc # Have the option of using the oh my zsh shell. diff --git a/php/php82/Dockerfile b/php/php82/Dockerfile index f40334a..1259a5d 100644 --- a/php/php82/Dockerfile +++ b/php/php82/Dockerfile @@ -102,7 +102,7 @@ COPY config/php.ini /usr/local/etc/php/ COPY config/fpm.conf /usr/local/etc/php-fpm.d/zz-totara.conf # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ +RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc # Have the option of using the oh my zsh shell. diff --git a/php/php83/Dockerfile b/php/php83/Dockerfile index 976dd02..bd3c4ae 100644 --- a/php/php83/Dockerfile +++ b/php/php83/Dockerfile @@ -102,7 +102,7 @@ COPY config/php.ini /usr/local/etc/php/ COPY config/fpm.conf /usr/local/etc/php-fpm.d/zz-totara.conf # Source each .sh file found in the /shell/ folder, always source the default_aliases.sh file first -RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]] then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ +RUN echo 'if [[ -e "/root/custom_shell/default-aliases.sh" ]]; then source "/root/custom_shell/default-aliases.sh"; fi' >> ~/.bashrc && \ echo 'for f in /root/custom_shell/*.sh; do [[ "$f" != "/root/custom_shell/default-aliases.sh" && -e "$f" ]] && source "$f"; done;' >> ~/.bashrc # Have the option of using the oh my zsh shell. From 87a3dcf2a7862424fb47a2db53791f1085b4d0e1 Mon Sep 17 00:00:00 2001 From: Cody Finegan Date: Tue, 13 Aug 2024 14:50:16 +1200 Subject: [PATCH 02/11] Add missing aliases to nginx/apache config - fixes #280 --- compose/apache.yml | 6 ++++++ compose/nginx.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/compose/apache.yml b/compose/apache.yml index fc8acb5..9d65d62 100644 --- a/compose/apache.yml +++ b/compose/apache.yml @@ -57,6 +57,12 @@ services: - totara81 - totara81.behat - totara81.behat.totaralms.com + - totara82 + - totara82.behat + - totara82.behat.totaralms.com + - totara83 + - totara83.behat + - totara83.behat.totaralms.com volumes: totara-data: \ No newline at end of file diff --git a/compose/nginx.yml b/compose/nginx.yml index cf80da9..856f072 100644 --- a/compose/nginx.yml +++ b/compose/nginx.yml @@ -57,6 +57,12 @@ services: - totara81 - totara81.behat - totara81.behat.totaralms.com + - totara82 + - totara82.behat + - totara82.behat.totaralms.com + - totara83 + - totara83.behat + - totara83.behat.totaralms.com volumes: totara-data: \ No newline at end of file From 34f672cb7745af115a89494fbff01bc4a42ca85f Mon Sep 17 00:00:00 2001 From: Cody Finegan Date: Thu, 18 Jul 2024 15:25:39 +1200 Subject: [PATCH 03/11] Defaulting to docker compose over docker-compose --- bin/tdocker | 2 +- custom/.gitkeep | 2 +- docker-compose.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/tdocker b/bin/tdocker index 5657e2b..2d513ea 100755 --- a/bin/tdocker +++ b/bin/tdocker @@ -45,7 +45,7 @@ for file in custom/*.yaml; do [[ -e "$file" ]] && files+=($file) done; -command="docker-compose " +command="docker compose " for file in "${files[@]}"; do command+=" -f ${file}" done diff --git a/custom/.gitkeep b/custom/.gitkeep index 56ce26d..98339ad 100644 --- a/custom/.gitkeep +++ b/custom/.gitkeep @@ -1 +1 @@ -# Add any .yml or .yaml files in this folder to add additional or override existing docker-compose configurations \ No newline at end of file +# Add any .yml or .yaml files in this folder to add additional or override existing docker compose configurations \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index f0711b8..7b598c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: # please check the compose files in the 'compose' folder # you should use the built in bin/ scripts to run commands as it makes your life easier # otherwise you need to run something like: - # docker-compose -f docker-compose.yml -f compose/nginx.yml -f compose/pgsql.yml -f compose/php.yml up -d pgsql php-7.3 + # docker compose -f docker-compose.yml -f compose/nginx.yml -f compose/pgsql.yml -f compose/php.yml up -d pgsql php-7.3 nodejs: image: node:20 From f0192b092b5de63cbd89e74fd32d4b2d291a64f2 Mon Sep 17 00:00:00 2001 From: Fabian Derschatta Date: Tue, 20 Aug 2024 09:57:53 +1200 Subject: [PATCH 04/11] Undeprecate mutagen as it's still viable for Rancher Desktop --- bin/tdocker | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/tdocker b/bin/tdocker index 2d513ea..954e3b1 100755 --- a/bin/tdocker +++ b/bin/tdocker @@ -34,8 +34,6 @@ elif [[ "$USE_MUTAGEN" == "1" || -f "$project_path/.use-mutagen" ]]; then files+=( "compose/sync.yml" ) - - printf "\e[1;33mWarning:\e[0m \033[0;33mBuilt-in Mutagen integration is deprecated and will be removed in a future version. Please use the new Docker Desktop extension: https://github.com/totara/totara-docker-dev/wiki/Mutagen\033[0m"; fi for file in custom/*.yml; do From f59d9657db548314954cce69aa4b89c0d99a8374 Mon Sep 17 00:00:00 2001 From: Simon Chester Date: Thu, 22 Dec 2022 11:32:31 +1300 Subject: [PATCH 05/11] Add tphp command --- .env.dist | 3 +++ bin/tbash | 24 +----------------------- bin/texec | 39 +++++++++++++++++++++++++++++++++++++++ bin/tphp | 18 ++++++++++++++++++ bin/tzsh | 25 +++++-------------------- 5 files changed, 66 insertions(+), 43 deletions(-) create mode 100755 bin/texec create mode 100755 bin/tphp diff --git a/.env.dist b/.env.dist index 63ddb39..f24353d 100644 --- a/.env.dist +++ b/.env.dist @@ -24,6 +24,9 @@ HOST_IP=host.docker.internal # Available ngrok regions: us (Ohio), eu (Frankfurt), ap (Singapore), au (Sydney), sa (Sao Paulo), jp (Tokyo), in (Mumbai) NGROK_REGION=au +# Set your preferred shell (used by things like tphp). bash and zsh are available. +INTERACTIVE_SHELL=zsh + # Build settings (this will have an affect on build only) TIME_ZONE=Pacific/Auckland diff --git a/bin/tbash b/bin/tbash index 1eb4d38..ae7ebe0 100755 --- a/bin/tbash +++ b/bin/tbash @@ -1,11 +1,6 @@ #!/bin/bash -# Standard boilerplate code for getting the paths and environment variables we need. script_path="$( cd "$(dirname "$0")" ; pwd -P )" -project_path="$( cd $script_path && cd ..; pwd -P )" -export $(grep -E -v '^#' $project_path/.env | xargs) -sub_path="${PWD//$LOCAL_SRC/}" -remote_path="$REMOTE_SRC/$sub_path" if [ ! -f "$local_path/version.php" ]; then remote_path="$REMOTE_SRC" @@ -17,21 +12,4 @@ if [[ -z "$container" ]]; then container="php" fi -# If just 'php' is specified, then dynamically work out which one to actually use based upon the site composer.json -if [[ "$container" == "php" ]]; then - if [[ ! -f "$local_path/version.php" ]]; then - echo "This command must be run from a Totara site directory if 'php' is specified for the container" - exit 1 - fi - php_container=($(php "$project_path/bin/helpers/php_container.php" "$local_path")) - container=${php_container[0]} - echo -e "\x1B[2mUsing PHP Container: $container\x1B[0m" -fi - -# If we are bashing into php/apache/nginx, then lets make the shell begin in the remote directory -extra_args="" -if [[ "$container" =~ "php" || "$container" =~ "nginx" || "$container" =~ "apache" ]]; then - extra_args="-w $remote_path" -fi - -$script_path/tdocker exec $extra_args "$container" /bin/bash +$script_path/texec "$container" /bin/bash diff --git a/bin/texec b/bin/texec new file mode 100755 index 0000000..390890d --- /dev/null +++ b/bin/texec @@ -0,0 +1,39 @@ +#!/bin/bash + +# Standard boilerplate code for getting the paths and environment variables we need. +script_path="$( cd "$(dirname "$0")" ; pwd -P )" +project_path="$( cd $script_path && cd ..; pwd -P )" +export $(grep -E -v '^#' $project_path/.env | xargs) +sub_path="${PWD//$LOCAL_SRC/}" +remote_path="$REMOTE_SRC/$sub_path" +local_path="$LOCAL_SRC/$sub_path" + +container="$1" +shift +if [[ -z "$container" ]]; then + echo "Container must be specified" + exit 1 +fi + +# If just 'php' is specified, then dynamically work out which one to actually use based upon the site composer.json +if [[ "$container" == "php" ]]; then + if [[ ! -f "$local_path/version.php" ]]; then + echo "This command must be run from a Totara site directory if 'php' is specified for the container" + exit 1 + fi + php_container=($(php "$project_path/bin/helpers/php_container.php" "$local_path")) + container=${php_container[0]} + echo -e "\x1B[2mUsing PHP Container: $container\x1B[0m" +fi + +# If we are bashing into php/apache/nginx, then lets make the shell begin in the remote directory +extra_args="" +if [[ "$container" =~ "php" || "$container" =~ "nginx" || "$container" =~ "apache" ]]; then + extra_args="-w $remote_path" +fi + +# Quote command to be reused as shell input +command_str=$(printf " %q" "$@") + +$script_path/tdocker exec $extra_args "$container" "$command_str" + diff --git a/bin/tphp b/bin/tphp new file mode 100755 index 0000000..1a9f729 --- /dev/null +++ b/bin/tphp @@ -0,0 +1,18 @@ +#!/bin/bash + +# Standard boilerplate code for getting the paths and environment variables we need. +script_path="$( cd "$(dirname "$0")" ; pwd -P )" +project_path="$( cd $script_path && cd ..; pwd -P )" +export $(grep -E -v '^#' $project_path/.env | xargs) + +if [[ -z "$1" ]]; then + $script_path/texec php "${INTERACTIVE_SHELL:-zsh}" +else + # Quote command to be reused as shell input + command_str=$(printf " %q" "$@") + # Handle being called with a php script instead of a command + if [[ $1 == *.php ]]; then + command_str="php $command_str" + fi + $script_path/texec php bash -ic "$command_str" +fi diff --git a/bin/tzsh b/bin/tzsh index 10da074..1fc3b09 100755 --- a/bin/tzsh +++ b/bin/tzsh @@ -1,31 +1,16 @@ #!/bin/bash -# Standard boilerplate code for getting the paths and environment variables we need. script_path="$( cd "$(dirname "$0")" ; pwd -P )" -project_path="$( cd $script_path && cd ..; pwd -P )" -export $(grep -E -v '^#' $project_path/.env | xargs) -sub_path="${PWD//$LOCAL_SRC/}" -remote_path="$REMOTE_SRC/$sub_path" -local_path="$LOCAL_SRC/$sub_path" -if [ ! -f "$local_path/version.php" ]; then - remote_path="$REMOTE_SRC" +# If the container isn't specified, then we just default to the default php container. +container="$1" +if [[ -z "$container" ]]; then + container="php" fi -container="$1" if [[ ! "$container" =~ "php" ]]; then echo "tzsh only supports php containers" exit 1 fi -# If just 'php' is specified, then dynamically work out which one to actually use based upon the site composer.json -if [[ "$container" == "php" ]]; then - if [[ ! -f "$local_path/version.php" ]]; then - echo "This command must be run from a Totara site directory if 'php' is specified for the container" - exit 1 - fi - php_container=($(php "$project_path/bin/helpers/php_container.php" "$local_path")) - container=${php_container[0]} -fi - -$script_path/tdocker exec -w $remote_path "$container" /bin/zsh +$script_path/texec "$container" /bin/zsh From 7678ab80c75216de635816837a2b7eba9ea9dfb3 Mon Sep 17 00:00:00 2001 From: Fabian Derschatta Date: Tue, 20 Aug 2024 13:55:13 +1200 Subject: [PATCH 06/11] Add ngrok.app domain to ngrok urls in example config.php --- config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.php b/config.php index 6386fd0..cb79eb7 100644 --- a/config.php +++ b/config.php @@ -138,7 +138,8 @@ // Ngrok uses a few different URLs, add if a new one is used $ngrok_urls = [ 'ngrok.io', - 'ngrok-free.app' + 'ngrok-free.app', + 'ngrok.app', ]; // Depending on the Ngrok version its hostname is stored in different server vars From d85389c5dd73171229e6e615348387f4512ac601 Mon Sep 17 00:00:00 2001 From: Fabian Derschatta Date: Thu, 14 Nov 2024 15:21:51 +1300 Subject: [PATCH 07/11] Update config.php for latest behat changes in newer Totara versions --- config.php | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/config.php b/config.php index cb79eb7..c10ae96 100644 --- a/config.php +++ b/config.php @@ -312,15 +312,34 @@ } } -if ($DOCKER_DEV->major_version >= 10) { +if ($DOCKER_DEV->major_version > 18) { + // Behat config for Totara 19 and higher + $CFG->behat_profiles['default'] = array( + 'browser' => 'chrome', + 'wd_host' => "http://$DOCKER_DEV->behat_host:4444/wd/hub", + 'capabilities' => array( + 'extra_capabilities' => array( + 'goog:chromeOptions' => array( + 'args' => array( + '--disable-background-timer-throttling', + '--disable-backgrounding-occluded-windows' + ), + 'excludeSwitches' => array( + 'enable-automation' + ), + 'prefs' => array( + 'credentials_enable_service' => false, + ), + ) + ) + ) + ); +} else if ($DOCKER_DEV->major_version >= 10) { // Behat config for Totara 10+ $CFG->behat_profiles['default'] = array( 'browser' => 'chrome', 'wd_host' => "http://$DOCKER_DEV->behat_host:4444/wd/hub", 'capabilities' => array( - 'browserName' => 'chrome', - 'browserVersion' => '106.0', - 'platform' => 'Linux', 'extra_capabilities' => array( 'chromeOptions' => array( 'args' => array( @@ -363,7 +382,7 @@ 'wd_host' => "http://$DOCKER_DEV->behat_host:4444/wd/hub", 'capabilities' => array( 'version' => '', - 'platform' => 'LINUX' + 'platform' => 'LINUX', ) ) ) From 11f86cfb21aa0fa20bf5401d5e42091a02e9ad6a Mon Sep 17 00:00:00 2001 From: Fabian Derschatta Date: Mon, 9 Sep 2024 17:18:58 +1200 Subject: [PATCH 08/11] Move to newer xhprof extension repository --- php/php72/Dockerfile | 9 ++++++--- php/php73/Dockerfile | 9 ++++++--- php/php74/Dockerfile | 9 ++++++--- php/php80/Dockerfile | 9 ++++++--- php/php81/Dockerfile | 9 ++++++--- php/php82/Dockerfile | 9 ++++++--- php/php83/Dockerfile | 9 ++++++--- 7 files changed, 42 insertions(+), 21 deletions(-) diff --git a/php/php72/Dockerfile b/php/php72/Dockerfile index fd01346..2a00b6b 100644 --- a/php/php72/Dockerfile +++ b/php/php72/Dockerfile @@ -50,13 +50,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ && docker-php-ext-install -j$(nproc) gd \ && rm -rf /var/lib/apt/lists/* -RUN git clone https://github.com/tideways/php-profiler-extension.git \ - && cd php-profiler-extension \ +RUN git clone https://github.com/longxinH/xhprof.git ./xhprof \ + && cd xhprof \ + && git checkout v2.3.10 \ + && cd extension/ \ && phpize \ && ./configure \ && make && make install -RUN echo "extension=tideways_xhprof.so" >> /usr/local/etc/php/conf.d/tideways_xhprof.ini +RUN echo "extension=xhprof.so" >> /usr/local/etc/php/conf.d/xhprof.ini \ + && echo "xhprof.output_dir = /tmp/xhprof" >> /usr/local/etc/php/conf.d/xhprof.ini RUN pecl install -o -f redis \ && rm -rf /tmp/pear \ diff --git a/php/php73/Dockerfile b/php/php73/Dockerfile index 8e7814e..a3046a8 100644 --- a/php/php73/Dockerfile +++ b/php/php73/Dockerfile @@ -50,13 +50,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ && docker-php-ext-install -j$(nproc) gd \ && rm -rf /var/lib/apt/lists/* -RUN git clone https://github.com/tideways/php-profiler-extension.git \ - && cd php-profiler-extension \ +RUN git clone https://github.com/longxinH/xhprof.git ./xhprof \ + && cd xhprof \ + && git checkout v2.3.10 \ + && cd extension/ \ && phpize \ && ./configure \ && make && make install -RUN echo "extension=tideways_xhprof.so" >> /usr/local/etc/php/conf.d/tideways_xhprof.ini +RUN echo "extension=xhprof.so" >> /usr/local/etc/php/conf.d/xhprof.ini \ + && echo "xhprof.output_dir = /tmp/xhprof" >> /usr/local/etc/php/conf.d/xhprof.ini RUN pecl install -o -f redis \ && rm -rf /tmp/pear \ diff --git a/php/php74/Dockerfile b/php/php74/Dockerfile index f756198..86a49ab 100644 --- a/php/php74/Dockerfile +++ b/php/php74/Dockerfile @@ -45,13 +45,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ --with-jpeg \ && docker-php-ext-install -j$(nproc) gd -RUN git clone https://github.com/tideways/php-profiler-extension.git \ - && cd php-profiler-extension \ +RUN git clone https://github.com/longxinH/xhprof.git ./xhprof \ + && cd xhprof \ + && git checkout v2.3.10 \ + && cd extension/ \ && phpize \ && ./configure \ && make && make install -RUN echo "extension=tideways_xhprof.so" >> /usr/local/etc/php/conf.d/tideways_xhprof.ini +RUN echo "extension=xhprof.so" >> /usr/local/etc/php/conf.d/xhprof.ini \ + && echo "xhprof.output_dir = /tmp/xhprof" >> /usr/local/etc/php/conf.d/xhprof.ini RUN pecl install -o -f redis \ && rm -rf /tmp/pear \ diff --git a/php/php80/Dockerfile b/php/php80/Dockerfile index 6d1653d..ed584e5 100644 --- a/php/php80/Dockerfile +++ b/php/php80/Dockerfile @@ -45,13 +45,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ --with-jpeg \ && docker-php-ext-install -j$(nproc) gd -RUN git clone https://github.com/tideways/php-profiler-extension.git \ - && cd php-profiler-extension \ +RUN git clone https://github.com/longxinH/xhprof.git ./xhprof \ + && cd xhprof \ + && git checkout v2.3.10 \ + && cd extension/ \ && phpize \ && ./configure \ && make && make install -RUN echo "extension=tideways_xhprof.so" >> /usr/local/etc/php/conf.d/tideways_xhprof.ini +RUN echo "extension=xhprof.so" >> /usr/local/etc/php/conf.d/xhprof.ini \ + && echo "xhprof.output_dir = /tmp/xhprof" >> /usr/local/etc/php/conf.d/xhprof.ini RUN pecl install -o -f redis \ && rm -rf /tmp/pear \ diff --git a/php/php81/Dockerfile b/php/php81/Dockerfile index cf1a857..cc8dceb 100644 --- a/php/php81/Dockerfile +++ b/php/php81/Dockerfile @@ -45,13 +45,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ --with-jpeg \ && docker-php-ext-install -j$(nproc) gd -RUN git clone https://github.com/tideways/php-profiler-extension.git \ - && cd php-profiler-extension \ +RUN git clone https://github.com/longxinH/xhprof.git ./xhprof \ + && cd xhprof \ + && git checkout v2.3.10 \ + && cd extension/ \ && phpize \ && ./configure \ && make && make install -RUN echo "extension=tideways_xhprof.so" >> /usr/local/etc/php/conf.d/tideways_xhprof.ini +RUN echo "extension=xhprof.so" >> /usr/local/etc/php/conf.d/xhprof.ini \ + && echo "xhprof.output_dir = /tmp/xhprof" >> /usr/local/etc/php/conf.d/xhprof.ini RUN pecl install -o -f redis \ && rm -rf /tmp/pear \ diff --git a/php/php82/Dockerfile b/php/php82/Dockerfile index 1259a5d..e08e791 100644 --- a/php/php82/Dockerfile +++ b/php/php82/Dockerfile @@ -45,13 +45,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ --with-jpeg \ && docker-php-ext-install -j$(nproc) gd -RUN git clone https://github.com/tideways/php-profiler-extension.git \ - && cd php-profiler-extension \ +RUN git clone https://github.com/longxinH/xhprof.git ./xhprof \ + && cd xhprof \ + && git checkout v2.3.10 \ + && cd extension/ \ && phpize \ && ./configure \ && make && make install -RUN echo "extension=tideways_xhprof.so" >> /usr/local/etc/php/conf.d/tideways_xhprof.ini +RUN echo "extension=xhprof.so" >> /usr/local/etc/php/conf.d/xhprof.ini \ + && echo "xhprof.output_dir = /tmp/xhprof" >> /usr/local/etc/php/conf.d/xhprof.ini RUN pecl install -o -f redis \ && rm -rf /tmp/pear \ diff --git a/php/php83/Dockerfile b/php/php83/Dockerfile index bd3c4ae..ab97011 100644 --- a/php/php83/Dockerfile +++ b/php/php83/Dockerfile @@ -45,13 +45,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ --with-jpeg \ && docker-php-ext-install -j$(nproc) gd -RUN git clone https://github.com/tideways/php-profiler-extension.git \ - && cd php-profiler-extension \ +RUN git clone https://github.com/longxinH/xhprof.git ./xhprof \ + && cd xhprof \ + && git checkout v2.3.10 \ + && cd extension/ \ && phpize \ && ./configure \ && make && make install -RUN echo "extension=tideways_xhprof.so" >> /usr/local/etc/php/conf.d/tideways_xhprof.ini +RUN echo "extension=xhprof.so" >> /usr/local/etc/php/conf.d/xhprof.ini \ + && echo "xhprof.output_dir = /tmp/xhprof" >> /usr/local/etc/php/conf.d/xhprof.ini RUN pecl install -o -f redis \ && rm -rf /tmp/pear \ From 304c2e5ac0977b0d0916dbff579aac73cd08adb1 Mon Sep 17 00:00:00 2001 From: Fabian Derschatta Date: Thu, 1 Aug 2024 13:30:16 +1200 Subject: [PATCH 09/11] Add defaults settings for pcov library --- php/php71-debug/Dockerfile | 8 +++++++- php/php72-debug/Dockerfile | 6 ++++++ php/php73-debug/Dockerfile | 6 ++++++ php/php74-debug/Dockerfile | 6 ++++++ php/php80-debug/Dockerfile | 6 ++++++ php/php81-debug/Dockerfile | 6 ++++++ php/php82-debug/Dockerfile | 6 ++++++ php/php83-debug/Dockerfile | 6 ++++++ 8 files changed, 49 insertions(+), 1 deletion(-) diff --git a/php/php71-debug/Dockerfile b/php/php71-debug/Dockerfile index 91bdd7e..ba1cac3 100644 --- a/php/php71-debug/Dockerfile +++ b/php/php71-debug/Dockerfile @@ -4,4 +4,10 @@ RUN pecl install -f xdebug-2.9.6 && docker-php-ext-enable xdebug.so RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_autostart=0" >> /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file + && echo "xdebug.remote_autostart=0" >> /usr/local/etc/php/conf.d/xdebug.ini + +# Set some sensible defaults +RUN echo "pcov.enabled=1" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.exclude='~(vendor|tests|node_modules|.git|client|.scannerwork)~'" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.memory=1073741824" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.files=30000" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ No newline at end of file diff --git a/php/php72-debug/Dockerfile b/php/php72-debug/Dockerfile index bd0dfab..bb7c7df 100644 --- a/php/php72-debug/Dockerfile +++ b/php/php72-debug/Dockerfile @@ -5,3 +5,9 @@ RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ && echo "xdebug.start_with_request=trigger" >> /usr/local/etc/php/conf.d/xdebug.ini + +# Set some sensible defaults +RUN echo "pcov.enabled=1" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.exclude='~(vendor|tests|node_modules|.git|client|.scannerwork)~'" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.memory=1073741824" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.files=30000" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ No newline at end of file diff --git a/php/php73-debug/Dockerfile b/php/php73-debug/Dockerfile index e1c92af..593a843 100644 --- a/php/php73-debug/Dockerfile +++ b/php/php73-debug/Dockerfile @@ -5,3 +5,9 @@ RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ && echo "xdebug.start_with_request=trigger" >> /usr/local/etc/php/conf.d/xdebug.ini + +# Set some sensible defaults +RUN echo "pcov.enabled=1" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.exclude='~(vendor|tests|node_modules|.git|client|.scannerwork)~'" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.memory=1073741824" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.files=30000" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ No newline at end of file diff --git a/php/php74-debug/Dockerfile b/php/php74-debug/Dockerfile index dd58bf1..f4d3da0 100644 --- a/php/php74-debug/Dockerfile +++ b/php/php74-debug/Dockerfile @@ -5,3 +5,9 @@ RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ && echo "xdebug.start_with_request=trigger" >> /usr/local/etc/php/conf.d/xdebug.ini + +# Set some sensible defaults +RUN echo "pcov.enabled=1" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.exclude='~(vendor|tests|node_modules|.git|client|.scannerwork)~'" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.memory=1073741824" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.files=30000" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ No newline at end of file diff --git a/php/php80-debug/Dockerfile b/php/php80-debug/Dockerfile index cfd08d1..33dfcb2 100644 --- a/php/php80-debug/Dockerfile +++ b/php/php80-debug/Dockerfile @@ -5,3 +5,9 @@ RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ && echo "xdebug.start_with_request=trigger" >> /usr/local/etc/php/conf.d/xdebug.ini + +# Set some sensible defaults +RUN echo "pcov.enabled=1" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.exclude='~(vendor|tests|node_modules|.git|client|.scannerwork)~'" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.memory=1073741824" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.files=30000" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ No newline at end of file diff --git a/php/php81-debug/Dockerfile b/php/php81-debug/Dockerfile index 2dc74fe..04b429b 100644 --- a/php/php81-debug/Dockerfile +++ b/php/php81-debug/Dockerfile @@ -5,3 +5,9 @@ RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ && echo "xdebug.start_with_request=trigger" >> /usr/local/etc/php/conf.d/xdebug.ini + +# Set some sensible defaults +RUN echo "pcov.enabled=1" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.exclude='~(vendor|tests|node_modules|.git|client|.scannerwork)~'" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.memory=1073741824" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.files=30000" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ No newline at end of file diff --git a/php/php82-debug/Dockerfile b/php/php82-debug/Dockerfile index 25e5db7..a8633a1 100644 --- a/php/php82-debug/Dockerfile +++ b/php/php82-debug/Dockerfile @@ -5,3 +5,9 @@ RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ && echo "xdebug.start_with_request=trigger" >> /usr/local/etc/php/conf.d/xdebug.ini + +# Set some sensible defaults +RUN echo "pcov.enabled=1" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.exclude='~(vendor|tests|node_modules|.git|client|.scannerwork)~'" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.memory=1073741824" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.files=30000" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ No newline at end of file diff --git a/php/php83-debug/Dockerfile b/php/php83-debug/Dockerfile index 7cd6e1f..8b36a1b 100644 --- a/php/php83-debug/Dockerfile +++ b/php/php83-debug/Dockerfile @@ -5,3 +5,9 @@ RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ && echo "xdebug.start_with_request=trigger" >> /usr/local/etc/php/conf.d/xdebug.ini + +# Set some sensible defaults +RUN echo "pcov.enabled=1" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.exclude='~(vendor|tests|node_modules|.git|client|.scannerwork)~'" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.memory=1073741824" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ + && echo "pcov.initial.files=30000" >> /usr/local/etc/php/conf.d/docker-php-ext-pcov.ini \ No newline at end of file From 0cf2cf0cd3cb96aec3a3d01b22be08fcc1b1998a Mon Sep 17 00:00:00 2001 From: Fabian Derschatta Date: Fri, 15 Nov 2024 16:10:13 +1300 Subject: [PATCH 10/11] Update xdebug packages to latest versions --- php/php71-debug/Dockerfile | 2 +- php/php72-debug/Dockerfile | 2 +- php/php73-debug/Dockerfile | 2 +- php/php74-debug/Dockerfile | 2 +- php/php80-debug/Dockerfile | 2 +- php/php81-debug/Dockerfile | 2 +- php/php82-debug/Dockerfile | 2 +- php/php83-debug/Dockerfile | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/php/php71-debug/Dockerfile b/php/php71-debug/Dockerfile index ba1cac3..0bb8492 100644 --- a/php/php71-debug/Dockerfile +++ b/php/php71-debug/Dockerfile @@ -1,6 +1,6 @@ FROM totara/docker-dev-php71:latest -RUN pecl install -f xdebug-2.9.6 && docker-php-ext-enable xdebug.so +RUN pecl install -f xdebug-2.9.8 && docker-php-ext-enable xdebug.so RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \ diff --git a/php/php72-debug/Dockerfile b/php/php72-debug/Dockerfile index bb7c7df..300f70d 100644 --- a/php/php72-debug/Dockerfile +++ b/php/php72-debug/Dockerfile @@ -1,6 +1,6 @@ FROM totara/docker-dev-php72:latest -RUN pecl install -f xdebug-3.1.1 && docker-php-ext-enable xdebug.so +RUN pecl install -f xdebug-3.1.6 && docker-php-ext-enable xdebug.so RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ diff --git a/php/php73-debug/Dockerfile b/php/php73-debug/Dockerfile index 593a843..e6a17e0 100644 --- a/php/php73-debug/Dockerfile +++ b/php/php73-debug/Dockerfile @@ -1,6 +1,6 @@ FROM totara/docker-dev-php73:latest -RUN pecl install -f xdebug-3.1.1 && docker-php-ext-enable xdebug.so +RUN pecl install -f xdebug-3.1.6 && docker-php-ext-enable xdebug.so RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ diff --git a/php/php74-debug/Dockerfile b/php/php74-debug/Dockerfile index f4d3da0..99bbaee 100644 --- a/php/php74-debug/Dockerfile +++ b/php/php74-debug/Dockerfile @@ -1,6 +1,6 @@ FROM totara/docker-dev-php74:latest -RUN pecl install -f xdebug-3.1.1 && docker-php-ext-enable xdebug.so +RUN pecl install -f xdebug-3.1.6 && docker-php-ext-enable xdebug.so RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ diff --git a/php/php80-debug/Dockerfile b/php/php80-debug/Dockerfile index 33dfcb2..7d12ae5 100644 --- a/php/php80-debug/Dockerfile +++ b/php/php80-debug/Dockerfile @@ -1,6 +1,6 @@ FROM totara/docker-dev-php80:latest -RUN pecl install -f xdebug-3.1.1 && docker-php-ext-enable xdebug.so +RUN pecl install -f xdebug-3.3.2 && docker-php-ext-enable xdebug.so RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ diff --git a/php/php81-debug/Dockerfile b/php/php81-debug/Dockerfile index 04b429b..96e0fec 100644 --- a/php/php81-debug/Dockerfile +++ b/php/php81-debug/Dockerfile @@ -1,6 +1,6 @@ FROM totara/docker-dev-php81:latest -RUN pecl install -f xdebug-3.1.5 && docker-php-ext-enable xdebug.so +RUN pecl install -f xdebug-3.3.2 && docker-php-ext-enable xdebug.so RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ diff --git a/php/php82-debug/Dockerfile b/php/php82-debug/Dockerfile index a8633a1..36896e2 100644 --- a/php/php82-debug/Dockerfile +++ b/php/php82-debug/Dockerfile @@ -1,6 +1,6 @@ FROM totara/docker-dev-php82:latest -RUN pecl install -f xdebug-3.2.2 && docker-php-ext-enable xdebug.so +RUN pecl install -f xdebug-3.3.2 && docker-php-ext-enable xdebug.so RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ diff --git a/php/php83-debug/Dockerfile b/php/php83-debug/Dockerfile index 8b36a1b..8600ee4 100644 --- a/php/php83-debug/Dockerfile +++ b/php/php83-debug/Dockerfile @@ -1,6 +1,6 @@ FROM totara/docker-dev-php83:latest -RUN pecl install -f xdebug-3.3.0alpha3 && docker-php-ext-enable xdebug.so +RUN pecl install -f xdebug-3.3.2 && docker-php-ext-enable xdebug.so RUN pecl install -f pcov && docker-php-ext-enable pcov.so RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \ From 669b6ac268b7acd43e49130e6e0ff67ab91e372d Mon Sep 17 00:00:00 2001 From: Fabian Derschatta Date: Mon, 18 Nov 2024 10:46:24 +1300 Subject: [PATCH 11/11] Fix issue with hyphen in site name on apache --- apache/config/server.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache/config/server.conf b/apache/config/server.conf index 43bbe1c..318a69a 100644 --- a/apache/config/server.conf +++ b/apache/config/server.conf @@ -21,7 +21,7 @@ RewriteCond %{HTTP_HOST} totara(\d)(\d)\.debug(:[0-9]+)?$ RewriteRule \.php - [H=proxy:fcgi://php-%1.%2-debug:9000] # Handle if the site name is specified in the host, e.g. sitename.totara73 -RewriteCond %{HTTP_HOST} ^(\w+)\.totara +RewriteCond %{HTTP_HOST} ^(.+)\.totara RewriteRule ^(.*)$ - [E=SITENAME:%1] # If the server directory exists, then rewrite it to use it