From 9470b801a0523d326fbf9bbdb7d1b473e8a3645e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 03:34:18 +0000 Subject: [PATCH 1/7] Bump @lando/argv from 1.1.2 to 1.2.0 Bumps [@lando/argv](https://github.com/lando/argv) from 1.1.2 to 1.2.0. - [Release notes](https://github.com/lando/argv/releases) - [Changelog](https://github.com/lando/argv/blob/main/CHANGELOG.md) - [Commits](https://github.com/lando/argv/compare/v1.1.2...v1.2.0) --- updated-dependencies: - dependency-name: "@lando/argv" dependency-version: 1.2.0 dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1e737a4..f387390 100644 --- a/package-lock.json +++ b/package-lock.json @@ -176,6 +176,7 @@ "integrity": "sha512-mVnkDZjpbiqdXRz0NrQlx6+QsnKYENuruYyjTJNcG3qAe015tvGAHcvvzRT78ZxETS7WjruWSlXBcL5llycNsQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@algolia/client-common": "5.16.0", "@algolia/requester-browser-xhr": "5.16.0", @@ -318,6 +319,7 @@ "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.0", @@ -1348,13 +1350,13 @@ } }, "node_modules/@lando/argv": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@lando/argv/-/argv-1.1.2.tgz", - "integrity": "sha512-b3d4zF1QBrFgUCFxEb48b0hse98wRhfnnydFsKXTcQc4aogfCBZc9wbgktLrs6TUtLKvU57YtlfNU4ack1ll7w==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@lando/argv/-/argv-1.2.0.tgz", + "integrity": "sha512-Usr0FuXfzDezQG7ZSuaaMNoF9v/YsavgnclQqTBzV48oku/vi9fiKttlaSoXOQ1UPrC1KPC/ean1ZrDnZqcosw==", "dev": true, - "license": "GPL-3.0", + "license": "MIT", "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" } }, "node_modules/@lando/chai": { @@ -2922,6 +2924,7 @@ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2986,6 +2989,7 @@ "integrity": "sha512-0zWz0LGfB0MLrhcnyGDpvVWPSsZnECNU6V/GPtNkHHSgaUj/7i+j36bZm6HClCvo8GvuxbN+ccbFREWUouHlfg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@algolia/client-abtesting": "5.16.0", "@algolia/client-analytics": "5.16.0", @@ -3243,6 +3247,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001669", "electron-to-chromium": "^1.5.41", @@ -4117,6 +4122,7 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.4.3", @@ -4653,6 +4659,7 @@ "integrity": "sha512-9FhUxK1hVju2+AiQIDJ5Dd//9R2n2RAfJ0qfhF4IHGHgcoEUTMpbTeG/zbEuwaiYXfuAH6XE0/aCyxDdRM+W5w==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "tabbable": "^6.2.0" } @@ -8321,6 +8328,7 @@ "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", @@ -8381,6 +8389,7 @@ "integrity": "sha512-q4Q/G2zjvynvizdB3/bupdYkCJe2umSAMv9Ju4d92E6/NXJ59z70xB0q5p/4lpRyAwflDsbwy1mLV9Q5+nlB+g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@docsearch/css": "^3.6.2", "@docsearch/js": "^3.6.2", @@ -8434,6 +8443,7 @@ "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@vue/compiler-dom": "3.5.13", "@vue/compiler-sfc": "3.5.13", From 082787da7d498a1af277e3c88efa352593a065a2 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Mon, 9 Mar 2026 20:16:03 -0500 Subject: [PATCH 2/7] fix: strip additional_contexts and resolve relative build contexts - Strip build.additional_contexts from parsed service config since Lando splits services into separate compose files and service: refs cannot resolve across them. The CLI_IMAGE build arg handles cross-service image references instead. - Use path.resolve instead of path.join for build.context so relative contexts (eg context: frontend for monorepos) resolve correctly against the project root instead of always being forced to root. Fixes #7, fixes #53 --- builders/_lagoon.js | 7 +++++-- lib/config.js | 21 +++++++++++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/builders/_lagoon.js b/builders/_lagoon.js index 45a75e7..c7e5860 100644 --- a/builders/_lagoon.js +++ b/builders/_lagoon.js @@ -20,8 +20,11 @@ module.exports = { const hostnames = _.get(options, '_app.lagoon.containers', []); // Normalize the dockerfile situation - // We need to do this again since this isnt technically an override - if (_.has(lagoon, 'build.context')) lagoon.build.context = path.join(options.root); + // Resolve build context relative to the project root so non-root contexts + // (eg context: frontend) work correctly instead of always forcing root + if (_.has(lagoon, 'build.context')) { + lagoon.build.context = path.resolve(options.root, lagoon.build.context); + } // Handle portfoward in the usual way if (options.portforward) { diff --git a/lib/config.js b/lib/config.js index 1da63f3..6361af2 100644 --- a/lib/config.js +++ b/lib/config.js @@ -44,11 +44,20 @@ exports.loadConfigFiles = baseDir => { */ exports.parseServices = (services, recipeConfig) => _(services) // Remove unneeded things from the docker config and determine the type of the service - .map((config, name) => _.merge({}, { - name, - type: getLabel(config.labels), - compose: _.omit(config, ['volumes', 'volumes_from', 'networks', 'user']), - config: recipeConfig, - })) + .map((config, name) => { + // Strip additional_contexts from build config since Lando splits services + // into separate compose files and service: refs cant resolve across them + if (_.has(config, 'build.additional_contexts')) { + config = _.cloneDeep(config); + delete config.build.additional_contexts; + } + + return _.merge({}, { + name, + type: getLabel(config.labels), + compose: _.omit(config, ['volumes', 'volumes_from', 'networks', 'user']), + config: recipeConfig, + }); + }) // Return .value(); From 1f14da733ab3e894047fee887b6550e5f5085638 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Mon, 9 Mar 2026 20:40:59 -0500 Subject: [PATCH 3/7] test: validate CLI_IMAGE cross-service builds and additional_contexts stripping Adds assertions to drupal9-base leia test: - Verify nginx and php services have /app/web/index.php (copied from cli via CLI_IMAGE build arg, proving cross-service builds work) - Verify additional_contexts is stripped from generated compose files --- examples/drupal9-base/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/drupal9-base/README.md b/examples/drupal9-base/README.md index 3049337..5d19b72 100644 --- a/examples/drupal9-base/README.md +++ b/examples/drupal9-base/README.md @@ -41,6 +41,15 @@ docker ps --filter label=com.docker.compose.project | grep Up | grep drupalbase_ docker ps --filter label=com.docker.compose.project | grep Up | grep drupalbase_php_1 docker ps --filter label=com.docker.compose.project | grep Up | grep drupalbase_cli_1 +# Should have built nginx and php from the cli image via CLI_IMAGE build arg +cd drupal +lando ssh -s cli -c "test -f /app/web/index.php" +lando ssh -s nginx -c "test -f /app/web/index.php" +lando ssh -s php -c "test -f /app/web/index.php" + +# Should not have additional_contexts in the generated compose files +cat ~/.lando/compose/drupalbase-* 2>/dev/null | grep -c "additional_contexts" | grep 0 + # Should ssh against the cli container by default cd drupal lando ssh -c "env | grep LAGOON=" | grep cli-drupal From 263b2a09819f517e37b7f056109023574d097bd4 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Mon, 9 Mar 2026 23:00:42 -0500 Subject: [PATCH 4/7] fix: correct additional_contexts assertion in drupal9-base leia test grep -c exits non-zero when count is 0, causing the test to fail even though the assertion is correct. Use grep + exit 1 pattern instead. --- examples/drupal9-base/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/drupal9-base/README.md b/examples/drupal9-base/README.md index 5d19b72..91c282f 100644 --- a/examples/drupal9-base/README.md +++ b/examples/drupal9-base/README.md @@ -48,7 +48,8 @@ lando ssh -s nginx -c "test -f /app/web/index.php" lando ssh -s php -c "test -f /app/web/index.php" # Should not have additional_contexts in the generated compose files -cat ~/.lando/compose/drupalbase-* 2>/dev/null | grep -c "additional_contexts" | grep 0 +cd drupal +cat ~/.lando/compose/drupalbase-* 2>/dev/null | grep "additional_contexts" && exit 1 || true # Should ssh against the cli container by default cd drupal From ece3c84cbbac6407384ad542bccb8de72056a900 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Tue, 23 Jun 2026 15:14:25 -0500 Subject: [PATCH 5/7] docs: update Lagoon Solr image link --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config.md b/docs/config.md index 1206396..d131852 100644 --- a/docs/config.md +++ b/docs/config.md @@ -103,7 +103,7 @@ The services we currently support with links to their associated Lagoon docs is Note that we are testing against the "Drupal" variants of the above but it's _possible_ the base services work as well. -*Please note: if using [uselagoon/solr-8-drupal](https://github.com/uselagoon/lagoon-images/blob/main/images/solr-drupal/8.Dockerfile) you will need to add the following command to your `Solr` service in your `.lando.yml` file. Alternate Solr images are supported and may require different commands, this is just one example. +*Please note: if using [uselagoon/solr-9-drupal](https://github.com/uselagoon/lagoon-images/blob/main/images/solr-drupal/9.Dockerfile) you will need to add the following command to your `Solr` service in your `.lando.yml` file. Alternate Solr images are supported and may require different commands, this is just one example. ```yaml recipe: lagoon From 520949bfb26f636a7b29b1bf9834c26b5f88bce5 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Tue, 23 Jun 2026 19:31:28 -0500 Subject: [PATCH 6/7] test: avoid lagoon example port collisions --- examples/all-services/docker-compose.yml | 8 ++++---- examples/proxy-tests/docker-compose.yml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/all-services/docker-compose.yml b/examples/all-services/docker-compose.yml index 6945a96..30edf19 100644 --- a/examples/all-services/docker-compose.yml +++ b/examples/all-services/docker-compose.yml @@ -25,7 +25,7 @@ services: lagoon.type: node lando.type: node ports: - - "3000" + - "3001:3000" user: root environment: << : *default-environment # loads the defined environment variables from the top @@ -38,7 +38,7 @@ services: lagoon.type: python lando.type: python ports: - - "8800" + - "8801:8800" environment: << : *default-environment # loads the defined environment variables from the top networks: @@ -50,7 +50,7 @@ services: lagoon.type: ruby lando.type: ruby ports: - - "3000" + - "3002:3000" environment: << : *default-environment # loads the defined environment variables from the top networks: @@ -74,7 +74,7 @@ services: lagoon.type: basic lando.type: basic ports: - - "3000" + - "3003:3000" user: root environment: << : *default-environment # loads the defined environment variables from the top diff --git a/examples/proxy-tests/docker-compose.yml b/examples/proxy-tests/docker-compose.yml index f820d51..32f49e5 100644 --- a/examples/proxy-tests/docker-compose.yml +++ b/examples/proxy-tests/docker-compose.yml @@ -25,7 +25,7 @@ services: lagoon.type: node lando.type: node ports: - - "3000" + - "3011:3000" user: root environment: << : *default-environment # loads the defined environment variables from the top @@ -38,7 +38,7 @@ services: lagoon.type: python lando.type: python ports: - - "8800" + - "8811:8800" environment: << : *default-environment # loads the defined environment variables from the top networks: @@ -50,7 +50,7 @@ services: lagoon.type: ruby lando.type: ruby ports: - - "3000" + - "3012:3000" environment: << : *default-environment # loads the defined environment variables from the top networks: From 55eb8c0057d0ea06d4455f80da1960c6bcd138f5 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Thu, 25 Jun 2026 03:12:56 -0500 Subject: [PATCH 7/7] Fix Lagoon basic proxy route ports --- lib/proxy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/proxy.js b/lib/proxy.js index 02cd86d..443698c 100644 --- a/lib/proxy.js +++ b/lib/proxy.js @@ -26,7 +26,8 @@ const getBasicContainers = services => { const basicContainers = _(services).filter(service => service.type === 'lagoon-basic').map('name').value(); let basicPort = ''; if (!_.isEmpty(basicContainers)) { - basicPort = services[_.first(basicContainers)].lagoon.ports[0]; + const port = services[_.first(basicContainers)].lagoon.ports[0]; + basicPort = port.includes(':') ? port.split(':')[1] : port; } return [basicContainers, basicPort]; };