From 47dbf150973bd2540f61e3472c4a3a6933d4efed Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 1 Oct 2026 07:11:32 +1000 Subject: [PATCH 1/8] [#3169] Made 'nginx' depend on 'php' so Compose starts 'php' before 'nginx' resolves its upstream. --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 78afa732a..e8099d703 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -151,6 +151,7 @@ services: <<: [ *default-volumes, *default-user ] depends_on: - cli + - php networks: - default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported. - amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI. From 5efb93b8efaef7e5d95bbdea8f334a75afcc3e87 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 1 Oct 2026 07:11:34 +1000 Subject: [PATCH 2/8] [#3169] Changed 'vortex-doctor' to recommend recreating the CLI container when the SSH key is missing inside it. --- .vortex/tooling/src/vortex-doctor | 4 +- .vortex/tooling/tests/unit/doctor.bats | 131 +++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 .vortex/tooling/tests/unit/doctor.bats diff --git a/.vortex/tooling/src/vortex-doctor b/.vortex/tooling/src/vortex-doctor index e5b247c0e..1fa6a62c4 100755 --- a/.vortex/tooling/src/vortex-doctor +++ b/.vortex/tooling/src/vortex-doctor @@ -137,7 +137,7 @@ main() { # Check that the key is injected into pygmy ssh-agent container. if ! pygmy status 2>&1 | grep -q "${VORTEX_SSH_FILE}"; then warn "SSH key is not added to pygmy." - note "The SSH key will not be available in the CLI container. Run 'pygmy restart' and then 'ahoy up'." + note "The SSH key will not be available in the CLI container. Run 'pygmy restart' and then 'ahoy up --no-deps --force-recreate cli'." else ssh_key_added_to_pygmy=1 fi @@ -155,7 +155,7 @@ main() { if [ "${ssh_key_added_to_pygmy}" = "1" ] && [ "${ssh_key_volume_mounted}" = "1" ]; then if ! docker compose exec -T cli bash -c "ssh-add -l >/dev/null 2>&1"; then - fail "SSH key was not added to the container. Run 'pygmy restart'." + fail "SSH key was not added to the container. Run 'ahoy up --no-deps --force-recreate cli'." else pass "SSH key is available within the CLI container." fi diff --git a/.vortex/tooling/tests/unit/doctor.bats b/.vortex/tooling/tests/unit/doctor.bats new file mode 100644 index 000000000..7f816d635 --- /dev/null +++ b/.vortex/tooling/tests/unit/doctor.bats @@ -0,0 +1,131 @@ +#!/usr/bin/env bats +## +# Unit tests for the 'vortex-doctor' script. +# +# shellcheck disable=SC2030,SC2031,SC2034 + +load ../_helper.bash + +# Runs the SSH check on its own: the helper disables every other host check +# except the containers check. +fixture_variables() { + export VORTEX_DOCTOR_CHECK_CONTAINERS=0 + export VORTEX_DOCTOR_CHECK_SSH=1 + export VORTEX_SSH_FILE="/home/user/.ssh/id_rsa" +} + +@test "doctor: SSH key available in the CLI container passes the SSH check" { + pushd "${LOCAL_REPO_DIR}" >/dev/null || exit 1 + + fixture_variables + + declare -a STEPS=( + "@pygmy status # 0 # [*] amazeeio-ssh-agent: Running as container amazeeio-ssh-agent\n4096 SHA256:fingerprint ${VORTEX_SSH_FILE} (RSA)" + '@docker compose exec -T cli bash -c grep "^/dev" /etc/mtab | grep -q /tmp/amazeeio_ssh-agent # 0' + "@docker compose exec -T cli bash -c ssh-add -l >/dev/null 2>&1 # 0" + "SSH key is available within the CLI container." + "- SSH key is not added to pygmy." + "- SSH key volume is not mounted into CLI container." + "- SSH key was not added to the container." + "All required checks have passed." + ) + mocks="$(steps_run "setup")" + + run .vortex/tooling/src/vortex-doctor + assert_success + steps_run "assert" "${mocks[@]}" + + popd >/dev/null || exit 1 +} + +@test "doctor: unreachable SSH agent in the CLI container recommends recreating the CLI container" { + pushd "${LOCAL_REPO_DIR}" >/dev/null || exit 1 + + fixture_variables + + declare -a STEPS=( + "@pygmy status # 0 # [*] amazeeio-ssh-agent: Running as container amazeeio-ssh-agent\n4096 SHA256:fingerprint ${VORTEX_SSH_FILE} (RSA)" + '@docker compose exec -T cli bash -c grep "^/dev" /etc/mtab | grep -q /tmp/amazeeio_ssh-agent # 0' + "@docker compose exec -T cli bash -c ssh-add -l >/dev/null 2>&1 # 2" + "SSH key was not added to the container. Run 'ahoy up --no-deps --force-recreate cli'." + "- Run 'pygmy restart'." + "- SSH key is available within the CLI container." + "- All required checks have passed." + ) + mocks="$(steps_run "setup")" + + run .vortex/tooling/src/vortex-doctor + assert_failure + steps_run "assert" "${mocks[@]}" + + popd >/dev/null || exit 1 +} + +@test "doctor: SSH key missing from Pygmy recommends restarting Pygmy and recreating the CLI container" { + pushd "${LOCAL_REPO_DIR}" >/dev/null || exit 1 + + fixture_variables + + declare -a STEPS=( + "@pygmy status # 0 # [*] amazeeio-ssh-agent: Running as container amazeeio-ssh-agent\nThe agent has no identities." + '@docker compose exec -T cli bash -c grep "^/dev" /etc/mtab | grep -q /tmp/amazeeio_ssh-agent # 0' + "SSH key is not added to pygmy." + "The SSH key will not be available in the CLI container. Run 'pygmy restart' and then 'ahoy up --no-deps --force-recreate cli'." + "- and then 'ahoy up'." + "- SSH key is available within the CLI container." + "- SSH key was not added to the container." + "All required checks have passed." + ) + mocks="$(steps_run "setup")" + + run .vortex/tooling/src/vortex-doctor + assert_success + steps_run "assert" "${mocks[@]}" + + popd >/dev/null || exit 1 +} + +@test "doctor: SSH key volume missing from the CLI container recommends mounting it" { + pushd "${LOCAL_REPO_DIR}" >/dev/null || exit 1 + + fixture_variables + + declare -a STEPS=( + "@pygmy status # 0 # [*] amazeeio-ssh-agent: Running as container amazeeio-ssh-agent\n4096 SHA256:fingerprint ${VORTEX_SSH_FILE} (RSA)" + '@docker compose exec -T cli bash -c grep "^/dev" /etc/mtab | grep -q /tmp/amazeeio_ssh-agent # 1' + "SSH key volume is not mounted into CLI container." + 'Make sure that your "docker-compose.yml" has the following lines for CLI service:' + "volumes_from:" + "container:amazeeio-ssh-agent" + "After adding these lines, run 'ahoy up'." + "- SSH key is available within the CLI container." + "- SSH key was not added to the container." + "All required checks have passed." + ) + mocks="$(steps_run "setup")" + + run .vortex/tooling/src/vortex-doctor + assert_success + steps_run "assert" "${mocks[@]}" + + popd >/dev/null || exit 1 +} + +@test "doctor: disabled SSH check skips the SSH key checks" { + pushd "${LOCAL_REPO_DIR}" >/dev/null || exit 1 + + fixture_variables + export VORTEX_DOCTOR_CHECK_SSH=0 + + mock_pygmy=$(mock_command "pygmy") + mock_docker=$(mock_command "docker") + + run .vortex/tooling/src/vortex-doctor + assert_success + assert_output_contains "All required checks have passed." + assert_output_not_contains "SSH key" + assert_equal "0" "$(mock_get_call_num "${mock_pygmy}")" + assert_equal "0" "$(mock_get_call_num "${mock_docker}")" + + popd >/dev/null || exit 1 +} From 0300ea692046c44f1bf763f9148e4529e5bf62de Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 1 Oct 2026 07:11:35 +1000 Subject: [PATCH 3/8] [#3169] Documented recreating the CLI container after 'pygmy restart' while the stack is running. --- .../content/development/environment/pygmy.mdx | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.vortex/docs/content/development/environment/pygmy.mdx b/.vortex/docs/content/development/environment/pygmy.mdx index 05a3eab2c..c13442ecf 100644 --- a/.vortex/docs/content/development/environment/pygmy.mdx +++ b/.vortex/docs/content/development/environment/pygmy.mdx @@ -36,3 +36,25 @@ pygmy restart # Restart the services. pygmy status # Show the status of the services. pygmy clean # Stop and remove all services. Useful if you have issues with pygmy. ``` + +## SSH key in the CLI container + +The CLI container uses the SSH agent from Pygmy's `amazeeio-ssh-agent` +container. It mounts the agent's volume through `volumes_from` and links to the +agent's socket only when the CLI container starts. + +`pygmy restart` removes the agent container and creates a new one. If the stack +is running at the time, the CLI container stays attached to the previous agent, +so the SSH key is no longer available inside it. The same happens when the +stack starts before Pygmy. + +Recreate the CLI container to attach it to the current agent: + +```shell +ahoy up --no-deps --force-recreate cli +``` + +Running `ahoy up` on its own doesn't help: it leaves a running container as it +is while its configuration stays the same. [`ahoy doctor`](doctor.mdx) checks +that the SSH key is available in the CLI container and prints this command when +it isn't. From 1649bb4fcc7995c3ba8143796b0858f34206d0b3 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 1 Oct 2026 07:12:31 +1000 Subject: [PATCH 4/8] [#3169] Updated Docker Compose config fixtures for the 'nginx' dependency on 'php'. --- .vortex/tests/phpunit/Fixtures/docker-compose.env.json | 4 ++++ .vortex/tests/phpunit/Fixtures/docker-compose.env_local.json | 4 ++++ .vortex/tests/phpunit/Fixtures/docker-compose.env_mod.json | 4 ++++ .vortex/tests/phpunit/Fixtures/docker-compose.noenv.json | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/.vortex/tests/phpunit/Fixtures/docker-compose.env.json b/.vortex/tests/phpunit/Fixtures/docker-compose.env.json index 4a8cfd3ca..c98d3aba7 100644 --- a/.vortex/tests/phpunit/Fixtures/docker-compose.env.json +++ b/.vortex/tests/phpunit/Fixtures/docker-compose.env.json @@ -341,6 +341,10 @@ "cli": { "condition": "service_started", "required": true + }, + "php": { + "condition": "service_started", + "required": true } }, "entrypoint": null, diff --git a/.vortex/tests/phpunit/Fixtures/docker-compose.env_local.json b/.vortex/tests/phpunit/Fixtures/docker-compose.env_local.json index 4a8cfd3ca..c98d3aba7 100644 --- a/.vortex/tests/phpunit/Fixtures/docker-compose.env_local.json +++ b/.vortex/tests/phpunit/Fixtures/docker-compose.env_local.json @@ -341,6 +341,10 @@ "cli": { "condition": "service_started", "required": true + }, + "php": { + "condition": "service_started", + "required": true } }, "entrypoint": null, diff --git a/.vortex/tests/phpunit/Fixtures/docker-compose.env_mod.json b/.vortex/tests/phpunit/Fixtures/docker-compose.env_mod.json index d976c8129..9c87a1d74 100644 --- a/.vortex/tests/phpunit/Fixtures/docker-compose.env_mod.json +++ b/.vortex/tests/phpunit/Fixtures/docker-compose.env_mod.json @@ -341,6 +341,10 @@ "cli": { "condition": "service_started", "required": true + }, + "php": { + "condition": "service_started", + "required": true } }, "entrypoint": null, diff --git a/.vortex/tests/phpunit/Fixtures/docker-compose.noenv.json b/.vortex/tests/phpunit/Fixtures/docker-compose.noenv.json index 8e08ac611..8f9ad7295 100644 --- a/.vortex/tests/phpunit/Fixtures/docker-compose.noenv.json +++ b/.vortex/tests/phpunit/Fixtures/docker-compose.noenv.json @@ -341,6 +341,10 @@ "cli": { "condition": "service_started", "required": true + }, + "php": { + "condition": "service_started", + "required": true } }, "entrypoint": null, From 62507cbc61aa74550da9aee8e5c4cd1faf7029b7 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 1 Oct 2026 07:12:38 +1000 Subject: [PATCH 5/8] Updated snapshots. --- .../handler_process/_baseline/docker-compose.yml | 1 + .../docker-compose.yml | 6 +++--- .../hosting_lagoon/docker-compose.yml | 14 +++++++------- .../docker-compose.yml | 14 +++++++------- .../migration_disabled_lagoon/docker-compose.yml | 14 +++++++------- .../migration_enabled/docker-compose.yml | 4 ++-- .../migration_enabled_circleci/docker-compose.yml | 4 ++-- .../migration_enabled_lagoon/docker-compose.yml | 14 +++++++------- .../docker-compose.yml | 4 ++-- .../docker-compose.yml | 4 ++-- .../migration_fetch_source_ftp/docker-compose.yml | 4 ++-- .../docker-compose.yml | 4 ++-- .../migration_fetch_source_s3/docker-compose.yml | 4 ++-- .../migration_fetch_source_url/docker-compose.yml | 4 ++-- .../non_interactive_config_file/docker-compose.yml | 4 ++-- .../docker-compose.yml | 4 ++-- .../provision_database_lagoon/docker-compose.yml | 14 +++++++------- .../services_no_clamav/docker-compose.yml | 4 ++-- .../services_no_redis/docker-compose.yml | 4 ++-- .../services_no_solr/docker-compose.yml | 6 +++--- .../services_none/docker-compose.yml | 6 +++--- 21 files changed, 69 insertions(+), 68 deletions(-) diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/_baseline/docker-compose.yml index 45c9d0b10..e3ec42b9f 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/docker-compose.yml @@ -121,6 +121,7 @@ services: <<: [ *default-volumes, *default-user ] depends_on: - cli + - php networks: - default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported. - amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI. diff --git a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/docker-compose.yml index 8c34eda32..104f70328 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/docker-compose.yml @@ -1,4 +1,4 @@ -@@ -155,17 +155,6 @@ +@@ -156,17 +156,6 @@ redis: image: uselagoon/valkey-8:__VERSION__ @@ -16,7 +16,7 @@ clamav: build: context: . -@@ -196,13 +185,10 @@ +@@ -197,13 +186,10 @@ - clamav - database - redis @@ -30,7 +30,7 @@ networks: ### Use external networks locally. Automatically removed in CI. amazeeio-network: ### Automatically removed in CI. -@@ -211,7 +197,6 @@ +@@ -212,7 +198,6 @@ volumes: app: {} files: {} diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/docker-compose.yml index 95a08119a..3460d1a23 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/docker-compose.yml @@ -17,7 +17,7 @@ nginx: build: -@@ -124,6 +129,11 @@ +@@ -125,6 +130,11 @@ networks: - default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported. - amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI. @@ -29,7 +29,7 @@ # PHP FPM container. All web requests are going through this container. php: -@@ -139,6 +149,11 @@ +@@ -140,6 +150,11 @@ <<: [ *default-volumes, *default-user ] depends_on: - cli @@ -41,7 +41,7 @@ database: build: -@@ -151,9 +166,13 @@ +@@ -152,9 +167,13 @@ <<: *default-user ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -55,7 +55,7 @@ solr: build: -@@ -165,6 +184,8 @@ +@@ -166,6 +185,8 @@ - solr:/var/solr ports: - '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`. @@ -64,7 +64,7 @@ clamav: build: -@@ -176,6 +197,10 @@ +@@ -177,6 +198,10 @@ - '3310' # Find port on host with `docker compose port clamav 3310`. networks: - default @@ -75,7 +75,7 @@ # Chrome container, used for browser testing. chrome: -@@ -188,6 +213,8 @@ +@@ -189,6 +214,8 @@ ports: - '7900' # Find port on host with `docker compose port chrome 7900`. shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing. @@ -84,7 +84,7 @@ # Helper container to wait for services to become available. wait-for-dependencies: -@@ -203,6 +230,8 @@ +@@ -204,6 +231,8 @@ - redis:6379 - solr:8983 - curl -s "http://solr:8983/solr/drupal/select?q=*:*&rows=0&wt=json" | grep response diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/docker-compose.yml index 95a08119a..3460d1a23 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/docker-compose.yml @@ -17,7 +17,7 @@ nginx: build: -@@ -124,6 +129,11 @@ +@@ -125,6 +130,11 @@ networks: - default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported. - amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI. @@ -29,7 +29,7 @@ # PHP FPM container. All web requests are going through this container. php: -@@ -139,6 +149,11 @@ +@@ -140,6 +150,11 @@ <<: [ *default-volumes, *default-user ] depends_on: - cli @@ -41,7 +41,7 @@ database: build: -@@ -151,9 +166,13 @@ +@@ -152,9 +167,13 @@ <<: *default-user ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -55,7 +55,7 @@ solr: build: -@@ -165,6 +184,8 @@ +@@ -166,6 +185,8 @@ - solr:/var/solr ports: - '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`. @@ -64,7 +64,7 @@ clamav: build: -@@ -176,6 +197,10 @@ +@@ -177,6 +198,10 @@ - '3310' # Find port on host with `docker compose port clamav 3310`. networks: - default @@ -75,7 +75,7 @@ # Chrome container, used for browser testing. chrome: -@@ -188,6 +213,8 @@ +@@ -189,6 +214,8 @@ ports: - '7900' # Find port on host with `docker compose port chrome 7900`. shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing. @@ -84,7 +84,7 @@ # Helper container to wait for services to become available. wait-for-dependencies: -@@ -203,6 +230,8 @@ +@@ -204,6 +231,8 @@ - redis:6379 - solr:8983 - curl -s "http://solr:8983/solr/drupal/select?q=*:*&rows=0&wt=json" | grep response diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/docker-compose.yml index 95a08119a..3460d1a23 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/docker-compose.yml @@ -17,7 +17,7 @@ nginx: build: -@@ -124,6 +129,11 @@ +@@ -125,6 +130,11 @@ networks: - default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported. - amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI. @@ -29,7 +29,7 @@ # PHP FPM container. All web requests are going through this container. php: -@@ -139,6 +149,11 @@ +@@ -140,6 +150,11 @@ <<: [ *default-volumes, *default-user ] depends_on: - cli @@ -41,7 +41,7 @@ database: build: -@@ -151,9 +166,13 @@ +@@ -152,9 +167,13 @@ <<: *default-user ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -55,7 +55,7 @@ solr: build: -@@ -165,6 +184,8 @@ +@@ -166,6 +185,8 @@ - solr:/var/solr ports: - '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`. @@ -64,7 +64,7 @@ clamav: build: -@@ -176,6 +197,10 @@ +@@ -177,6 +198,10 @@ - '3310' # Find port on host with `docker compose port clamav 3310`. networks: - default @@ -75,7 +75,7 @@ # Chrome container, used for browser testing. chrome: -@@ -188,6 +213,8 @@ +@@ -189,6 +214,8 @@ ports: - '7900' # Find port on host with `docker compose port chrome 7900`. shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing. @@ -84,7 +84,7 @@ # Helper container to wait for services to become available. wait-for-dependencies: -@@ -203,6 +230,8 @@ +@@ -204,6 +231,8 @@ - redis:6379 - solr:8983 - curl -s "http://solr:8983/solr/drupal/select?q=*:*&rows=0&wt=json" | grep response diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/docker-compose.yml index ba9c983ea..c62947d38 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/docker-compose.yml @@ -15,7 +15,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,6 +162,19 @@ +@@ -153,6 +163,19 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -35,7 +35,7 @@ redis: image: uselagoon/valkey-8:__VERSION__ -@@ -195,11 +218,13 @@ +@@ -196,11 +219,13 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/docker-compose.yml index ba9c983ea..c62947d38 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/docker-compose.yml @@ -15,7 +15,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,6 +162,19 @@ +@@ -153,6 +163,19 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -35,7 +35,7 @@ redis: image: uselagoon/valkey-8:__VERSION__ -@@ -195,11 +218,13 @@ +@@ -196,11 +219,13 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/docker-compose.yml index 2e66f5314..3b18e9eca 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/docker-compose.yml @@ -34,7 +34,7 @@ nginx: build: -@@ -124,6 +139,11 @@ +@@ -125,6 +140,11 @@ networks: - default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported. - amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI. @@ -46,7 +46,7 @@ # PHP FPM container. All web requests are going through this container. php: -@@ -139,6 +159,11 @@ +@@ -140,6 +160,11 @@ <<: [ *default-volumes, *default-user ] depends_on: - cli @@ -58,7 +58,7 @@ database: build: -@@ -151,9 +176,26 @@ +@@ -152,9 +177,26 @@ <<: *default-user ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -85,7 +85,7 @@ solr: build: -@@ -165,6 +207,8 @@ +@@ -166,6 +208,8 @@ - solr:/var/solr ports: - '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`. @@ -94,7 +94,7 @@ clamav: build: -@@ -176,6 +220,10 @@ +@@ -177,6 +221,10 @@ - '3310' # Find port on host with `docker compose port clamav 3310`. networks: - default @@ -105,7 +105,7 @@ # Chrome container, used for browser testing. chrome: -@@ -188,6 +236,8 @@ +@@ -189,6 +237,8 @@ ports: - '7900' # Find port on host with `docker compose port chrome 7900`. shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing. @@ -114,7 +114,7 @@ # Helper container to wait for services to become available. wait-for-dependencies: -@@ -195,14 +245,18 @@ +@@ -196,14 +246,18 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/docker-compose.yml index ba9c983ea..c62947d38 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/docker-compose.yml @@ -15,7 +15,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,6 +162,19 @@ +@@ -153,6 +163,19 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -35,7 +35,7 @@ redis: image: uselagoon/valkey-8:__VERSION__ -@@ -195,11 +218,13 @@ +@@ -196,11 +219,13 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/docker-compose.yml index ba9c983ea..c62947d38 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/docker-compose.yml @@ -15,7 +15,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,6 +162,19 @@ +@@ -153,6 +163,19 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -35,7 +35,7 @@ redis: image: uselagoon/valkey-8:__VERSION__ -@@ -195,11 +218,13 @@ +@@ -196,11 +219,13 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/docker-compose.yml index ba9c983ea..c62947d38 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/docker-compose.yml @@ -15,7 +15,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,6 +162,19 @@ +@@ -153,6 +163,19 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -35,7 +35,7 @@ redis: image: uselagoon/valkey-8:__VERSION__ -@@ -195,11 +218,13 @@ +@@ -196,11 +219,13 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/docker-compose.yml index ba9c983ea..c62947d38 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/docker-compose.yml @@ -15,7 +15,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,6 +162,19 @@ +@@ -153,6 +163,19 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -35,7 +35,7 @@ redis: image: uselagoon/valkey-8:__VERSION__ -@@ -195,11 +218,13 @@ +@@ -196,11 +219,13 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/docker-compose.yml index ba9c983ea..c62947d38 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/docker-compose.yml @@ -15,7 +15,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,6 +162,19 @@ +@@ -153,6 +163,19 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -35,7 +35,7 @@ redis: image: uselagoon/valkey-8:__VERSION__ -@@ -195,11 +218,13 @@ +@@ -196,11 +219,13 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/docker-compose.yml index ba9c983ea..c62947d38 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/docker-compose.yml @@ -15,7 +15,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,6 +162,19 @@ +@@ -153,6 +163,19 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -35,7 +35,7 @@ redis: image: uselagoon/valkey-8:__VERSION__ -@@ -195,11 +218,13 @@ +@@ -196,11 +219,13 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/docker-compose.yml index 6fa4c05b2..692212f1d 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/docker-compose.yml @@ -7,7 +7,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,9 +150,6 @@ +@@ -153,9 +151,6 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -17,7 +17,7 @@ solr: build: context: . -@@ -195,12 +190,10 @@ +@@ -196,12 +191,10 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/docker-compose.yml index a98532e58..041b1b533 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_string/docker-compose.yml @@ -1,4 +1,4 @@ -@@ -166,17 +166,6 @@ +@@ -167,17 +167,6 @@ ports: - '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`. @@ -16,7 +16,7 @@ # Chrome container, used for browser testing. chrome: image: selenium/standalone-chromium:__VERSION__ -@@ -193,12 +182,10 @@ +@@ -194,12 +183,10 @@ wait-for-dependencies: image: drevops/docker-wait-for-dependencies:__VERSION__ depends_on: diff --git a/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/docker-compose.yml index 95a08119a..3460d1a23 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/docker-compose.yml @@ -17,7 +17,7 @@ nginx: build: -@@ -124,6 +129,11 @@ +@@ -125,6 +130,11 @@ networks: - default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported. - amazeeio-network ### This network is supported by Pygmy and used to route all requests to host machine locally. Removed in CI. @@ -29,7 +29,7 @@ # PHP FPM container. All web requests are going through this container. php: -@@ -139,6 +149,11 @@ +@@ -140,6 +150,11 @@ <<: [ *default-volumes, *default-user ] depends_on: - cli @@ -41,7 +41,7 @@ database: build: -@@ -151,9 +166,13 @@ +@@ -152,9 +167,13 @@ <<: *default-user ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -55,7 +55,7 @@ solr: build: -@@ -165,6 +184,8 @@ +@@ -166,6 +185,8 @@ - solr:/var/solr ports: - '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`. @@ -64,7 +64,7 @@ clamav: build: -@@ -176,6 +197,10 @@ +@@ -177,6 +198,10 @@ - '3310' # Find port on host with `docker compose port clamav 3310`. networks: - default @@ -75,7 +75,7 @@ # Chrome container, used for browser testing. chrome: -@@ -188,6 +213,8 @@ +@@ -189,6 +214,8 @@ ports: - '7900' # Find port on host with `docker compose port chrome 7900`. shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing. @@ -84,7 +84,7 @@ # Helper container to wait for services to become available. wait-for-dependencies: -@@ -203,6 +230,8 @@ +@@ -204,6 +231,8 @@ - redis:6379 - solr:8983 - curl -s "http://solr:8983/solr/drupal/select?q=*:*&rows=0&wt=json" | grep response diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/docker-compose.yml index a98532e58..041b1b533 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_clamav/docker-compose.yml @@ -1,4 +1,4 @@ -@@ -166,17 +166,6 @@ +@@ -167,17 +167,6 @@ ports: - '8983' # Solr port in a container. Find port on host with `ahoy info` or `docker compose port solr 8983`. @@ -16,7 +16,7 @@ # Chrome container, used for browser testing. chrome: image: selenium/standalone-chromium:__VERSION__ -@@ -193,12 +182,10 @@ +@@ -194,12 +183,10 @@ wait-for-dependencies: image: drevops/docker-wait-for-dependencies:__VERSION__ depends_on: diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/docker-compose.yml index 6fa4c05b2..692212f1d 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/docker-compose.yml @@ -7,7 +7,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,9 +150,6 @@ +@@ -153,9 +151,6 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -17,7 +17,7 @@ solr: build: context: . -@@ -195,12 +190,10 @@ +@@ -196,12 +191,10 @@ depends_on: - clamav - database diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/docker-compose.yml index 8c34eda32..104f70328 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_solr/docker-compose.yml @@ -1,4 +1,4 @@ -@@ -155,17 +155,6 @@ +@@ -156,17 +156,6 @@ redis: image: uselagoon/valkey-8:__VERSION__ @@ -16,7 +16,7 @@ clamav: build: context: . -@@ -196,13 +185,10 @@ +@@ -197,13 +186,10 @@ - clamav - database - redis @@ -30,7 +30,7 @@ networks: ### Use external networks locally. Automatically removed in CI. amazeeio-network: ### Automatically removed in CI. -@@ -211,7 +197,6 @@ +@@ -212,7 +198,6 @@ volumes: app: {} files: {} diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_none/docker-compose.yml b/.vortex/installer/tests/Fixtures/handler_process/services_none/docker-compose.yml index f5ed51407..cad54237c 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_none/docker-compose.yml +++ b/.vortex/installer/tests/Fixtures/handler_process/services_none/docker-compose.yml @@ -7,7 +7,7 @@ # The default user under which the containers should run. x-user: &default-user -@@ -152,31 +150,6 @@ +@@ -153,31 +151,6 @@ ports: - '3306' # Database port in a container. Find port on host with `ahoy info` or `docker compose port database 3306`. @@ -39,7 +39,7 @@ # Chrome container, used for browser testing. chrome: image: selenium/standalone-chromium:__VERSION__ -@@ -193,16 +166,9 @@ +@@ -194,16 +167,9 @@ wait-for-dependencies: image: drevops/docker-wait-for-dependencies:__VERSION__ depends_on: @@ -56,7 +56,7 @@ networks: ### Use external networks locally. Automatically removed in CI. amazeeio-network: ### Automatically removed in CI. -@@ -211,7 +177,6 @@ +@@ -212,7 +178,6 @@ volumes: app: {} files: {} From e2939b7ff1fbdd54a9aea27f16f726ac3533707e Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 1 Oct 2026 07:18:42 +1000 Subject: [PATCH 6/8] [#3169] Reworded the Pygmy SSH key section to pass the 'Vortex.Contractions' prose rule. --- .vortex/docs/content/development/environment/pygmy.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.vortex/docs/content/development/environment/pygmy.mdx b/.vortex/docs/content/development/environment/pygmy.mdx index c13442ecf..a667469d6 100644 --- a/.vortex/docs/content/development/environment/pygmy.mdx +++ b/.vortex/docs/content/development/environment/pygmy.mdx @@ -54,7 +54,7 @@ Recreate the CLI container to attach it to the current agent: ahoy up --no-deps --force-recreate cli ``` -Running `ahoy up` on its own doesn't help: it leaves a running container as it -is while its configuration stays the same. [`ahoy doctor`](doctor.mdx) checks -that the SSH key is available in the CLI container and prints this command when -it isn't. +Running `ahoy up` on its own isn't enough: Docker Compose leaves a running +container alone when its configuration hasn't changed. [`ahoy doctor`](doctor.mdx) +checks that the SSH key is available in the CLI container and prints this +command when it isn't. From e1cff1889b9d796af79f0c80aff05181cc905e92 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 1 Oct 2026 07:54:02 +1000 Subject: [PATCH 7/8] [#3169] Reset the 'MINIMAL' and 'PREFLIGHT' doctor presets in 'doctor.bats' so an inherited preset can't turn off the SSH check. --- .vortex/tooling/tests/unit/doctor.bats | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.vortex/tooling/tests/unit/doctor.bats b/.vortex/tooling/tests/unit/doctor.bats index 7f816d635..1caff7f9d 100644 --- a/.vortex/tooling/tests/unit/doctor.bats +++ b/.vortex/tooling/tests/unit/doctor.bats @@ -7,8 +7,11 @@ load ../_helper.bash # Runs the SSH check on its own: the helper disables every other host check -# except the containers check. +# except the containers check. The MINIMAL and PREFLIGHT presets override the +# per-check flags, so a preset inherited from the environment is reset. fixture_variables() { + export VORTEX_DOCTOR_CHECK_MINIMAL=0 + export VORTEX_DOCTOR_CHECK_PREFLIGHT=0 export VORTEX_DOCTOR_CHECK_CONTAINERS=0 export VORTEX_DOCTOR_CHECK_SSH=1 export VORTEX_SSH_FILE="/home/user/.ssh/id_rsa" From dd1d0ecc2b4130da5241cfeb6aff83a0c47d4c60 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 1 Oct 2026 07:56:52 +1000 Subject: [PATCH 8/8] [#3169] Reset only the 'MINIMAL' doctor preset in 'doctor.bats', since 'PREFLIGHT' only defaults flags the fixture already sets. --- .vortex/tooling/tests/unit/doctor.bats | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.vortex/tooling/tests/unit/doctor.bats b/.vortex/tooling/tests/unit/doctor.bats index 1caff7f9d..4a792dc75 100644 --- a/.vortex/tooling/tests/unit/doctor.bats +++ b/.vortex/tooling/tests/unit/doctor.bats @@ -7,11 +7,10 @@ load ../_helper.bash # Runs the SSH check on its own: the helper disables every other host check -# except the containers check. The MINIMAL and PREFLIGHT presets override the -# per-check flags, so a preset inherited from the environment is reset. +# except the containers check. The MINIMAL preset overwrites the per-check +# flags, so a preset inherited from the environment is reset. fixture_variables() { export VORTEX_DOCTOR_CHECK_MINIMAL=0 - export VORTEX_DOCTOR_CHECK_PREFLIGHT=0 export VORTEX_DOCTOR_CHECK_CONTAINERS=0 export VORTEX_DOCTOR_CHECK_SSH=1 export VORTEX_SSH_FILE="/home/user/.ssh/id_rsa"