From 9af60130a3b6e966f94bc5e7f1ea819a5d4455ae Mon Sep 17 00:00:00 2001 From: Erik Hanson Date: Sat, 30 Aug 2025 01:03:23 -0500 Subject: [PATCH 1/7] Migrate to Bitnamilegacy * Migrated packages to use the Bitnamilegacy repository * Minor updates to use any new tags and release builds --- CHANGELOG.md | 5 +++++ builders/apache.js | 4 ++-- docs/index.md | 4 ++-- examples/2.4/.lando.yml | 4 ++-- examples/2.4/README.md | 8 ++++---- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba7d09c..d91c2d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +## v1.2.0 - [August 29, 2025](https://github.com/lando/apache/releases/tag/v1.2.0) + +* Migrated packages to use the Bitnamilegacy repository +* Minor updates to use any new tags and release builds + ## v1.1.3 - [December 6, 2024](https://github.com/lando/apache/releases/tag/v1.1.3) * Updated the version index.md to get Docuverse page to build correctly. diff --git a/builders/apache.js b/builders/apache.js index 02fb3a6..33c4f41 100644 --- a/builders/apache.js +++ b/builders/apache.js @@ -11,7 +11,7 @@ module.exports = { version: '2.4', supported: ['2.4'], pinPairs: { - '2.4': 'bitnami/apache:2.4.41-debian-10-r52', + '2.4': 'bitnamilegacy/apache:2.4.65-debian-12-r2', }, patchesSupported: true, confSrc: path.resolve(__dirname, '..', 'config'), @@ -48,7 +48,7 @@ module.exports = { // Build the default stuff here const apache = { - image: `bitnami/apache:${options.version}`, + image: `bitnamilegacy/apache:${options.version}`, command: '/launch.sh', environment: options.environment, user: 'root', diff --git a/docs/index.md b/docs/index.md index f2fa4fc..0d123d6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,7 +18,7 @@ services: ## Supported versions -* **[2.4](https://hub.docker.com/r/bitnami/apache)** **(default)** +* **[2.4](https://hub.docker.com/r/bitnamilegacy/apache/tags?name=2.4.)** **(default)** * [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides) ## Patch versions @@ -35,5 +35,5 @@ services: type: apache:2.4.62 ``` -But make sure you use one of the available [patch tags](https://hub.docker.com/r/bitnami/apache/tags) for the underlying image we are using. +But make sure you use one of the available [patch tags](https://hub.docker.com/r/bitnamilegacy/apache/tags) for the underlying image we are using. diff --git a/examples/2.4/.lando.yml b/examples/2.4/.lando.yml index 9f5b8e2..24931c8 100644 --- a/examples/2.4/.lando.yml +++ b/examples/2.4/.lando.yml @@ -4,9 +4,9 @@ proxy: - landoapache.lndo.site services: defaults: - type: apache + type: apache:2.4 patch: - type: apache:2.4.39 + type: apache:2.4.64 # This is important because it lets lando know to test against the plugin in this repo # DO NOT REMOVE THIS! diff --git a/examples/2.4/README.md b/examples/2.4/README.md index 75442a2..104e726 100644 --- a/examples/2.4/README.md +++ b/examples/2.4/README.md @@ -19,11 +19,11 @@ lando start Run the following commands to validate things are rolling as they should. ```bash -# Should return 2.4.41 for the default version -lando exec defaults -- apachectl -V | grep 2.4.41 +# Should return 2.4.65 for the default version +lando exec defaults -- apachectl -V | grep 2.4 -# Should return 2.4.39 for the patch service -lando exec patch -- apachectl -V | grep 2.4.39 +# Should return 2.4.64 for the patch service +lando exec patch -- apachectl -V | grep 2.4.64 # Should serve from the app root by default lando exec defaults -- curl http://localhost | grep ROOTDIR From 40c1e190fe0ec828ee558f31e63ccd00c86459f9 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Sat, 30 Aug 2025 11:27:06 -0400 Subject: [PATCH 2/7] standarize with other bitnami brownout changes --- .github/workflows/pr-unit-tests.yml | 2 +- .github/workflows/release.yml | 4 +--- CHANGELOG.md | 5 +++-- builders/apache.js | 1 + docs/config.md | 2 +- docs/development.md | 2 +- docs/index.md | 5 +++-- netlify.toml | 11 +++++++++-- 8 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pr-unit-tests.yml b/.github/workflows/pr-unit-tests.yml index c64da65..501c954 100644 --- a/.github/workflows/pr-unit-tests.yml +++ b/.github/workflows/pr-unit-tests.yml @@ -12,7 +12,7 @@ jobs: os: - windows-2022 - ubuntu-24.04 - - macos-13 + - macos-15 node-version: - '20' steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1135c23..b225647 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,9 +3,7 @@ name: Publish to NPM on: release: types: - - published - - edited - + - created jobs: deploy: runs-on: ${{ matrix.os }} diff --git a/CHANGELOG.md b/CHANGELOG.md index d91c2d3..75706e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ ## v1.2.0 - [August 29, 2025](https://github.com/lando/apache/releases/tag/v1.2.0) -* Migrated packages to use the Bitnamilegacy repository -* Minor updates to use any new tags and release builds +* Switched images to [bitnamilegacy](https://github.com/bitnami/containers/issues/83267) namspace +* Updated `apache:2` to `2.4.65` +* Updated `apache:2.4` to `2.4.65` ## v1.1.3 - [December 6, 2024](https://github.com/lando/apache/releases/tag/v1.1.3) diff --git a/builders/apache.js b/builders/apache.js index 33c4f41..2ba931b 100644 --- a/builders/apache.js +++ b/builders/apache.js @@ -11,6 +11,7 @@ module.exports = { version: '2.4', supported: ['2.4'], pinPairs: { + '2': 'bitnamilegacy/apache:2.4.65-debian-12-r2', '2.4': 'bitnamilegacy/apache:2.4.65-debian-12-r2', }, patchesSupported: true, diff --git a/docs/config.md b/docs/config.md index 6da22d8..133a788 100644 --- a/docs/config.md +++ b/docs/config.md @@ -45,7 +45,7 @@ Note that you can put your configuration files anywhere inside your application ```yaml services: myservice: - type: apache + type: apache:2.4 webroot: docroot config: server: config/httpd.conf diff --git a/docs/development.md b/docs/development.md index 5f39814..002371d 100644 --- a/docs/development.md +++ b/docs/development.md @@ -13,7 +13,7 @@ At the very least you will need to have the following installed: * [Lando 3.21.0+](https://docs.lando.dev/getting-started/installation.html) preferably installed [from source](https://docs.lando.dev/install/source.html). * [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) -* [Node 18](https://nodejs.org/dist/latest-v18.x/) +* [Node 20](https://nodejs.org/dist/latest-v20.x/) ## Installation diff --git a/docs/index.md b/docs/index.md index 0d123d6..2d70f17 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,7 +18,8 @@ services: ## Supported versions -* **[2.4](https://hub.docker.com/r/bitnamilegacy/apache/tags?name=2.4.)** **(default)** +* [2](https://hub.docker.com/r/bitnamilegacy/apache/tags?name=2.4.) +* [2.4](https://hub.docker.com/r/bitnamilegacy/apache/tags?name=2.4.) * [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides) ## Patch versions @@ -32,7 +33,7 @@ To use a patch version, you can do something as shown below: ```yaml services: myservice: - type: apache:2.4.62 + type: apache:2.4.65 ``` But make sure you use one of the available [patch tags](https://hub.docker.com/r/bitnamilegacy/apache/tags) for the underlying image we are using. diff --git a/netlify.toml b/netlify.toml index 0fe356d..b69a084 100644 --- a/netlify.toml +++ b/netlify.toml @@ -14,8 +14,6 @@ skipPatterns = [ ".rss", ".gif", ".jpg" ] checkExternal = true - - # Sets our asset optimization [build.processing.css] bundle = true @@ -44,6 +42,15 @@ # We need this so preview environments and the base site look ok on their own +[[redirects]] + from = "https://lando-apache.netlify.app" + to = "https://lando-apache.netlify.app/plugins/apache/index.html" + status = 301 + force = true +[[redirects]] + from = "https://lando-apache.netlify.app/*" + to = "https://docs.lando.dev/:splat" + status = 301 [[redirects]] from = "/" to = "/plugins/apache" From 7996581f5360532b50e5029ccbaa513583128be7 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Sat, 30 Aug 2025 12:44:39 -0400 Subject: [PATCH 3/7] accomodate recent changes in 2.4.64 --- builders/apache.js | 2 +- config/launch.sh | 22 ++++++++++++++++++++-- examples/2.4/.lando.yml | 2 +- examples/2.4/README.md | 6 +++--- examples/custom/.lando.yml | 4 ++-- 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/builders/apache.js b/builders/apache.js index 2ba931b..115f56f 100644 --- a/builders/apache.js +++ b/builders/apache.js @@ -9,7 +9,7 @@ module.exports = { name: 'apache', config: { version: '2.4', - supported: ['2.4'], + supported: ['2', '2.4'], pinPairs: { '2': 'bitnamilegacy/apache:2.4.65-debian-12-r2', '2.4': 'bitnamilegacy/apache:2.4.65-debian-12-r2', diff --git a/config/launch.sh b/config/launch.sh index 9741c27..52a284f 100755 --- a/config/launch.sh +++ b/config/launch.sh @@ -1,7 +1,14 @@ #!/bin/bash -# Errors and logz -set -e +set -eo pipefail + +# Make tmp folder and make it writable if it doesnt exist +if [ ! -d "/opt/bitnami/apache/tmp" ]; then + mkdir -p "/opt/bitnami/apache/tmp" +fi +if [ -d "/opt/bitnami/apache/tmp" ]; then + chmod -R 777 "/opt/bitnami/apache/tmp" +fi # Enable SSL if we have to if [ -f "/etc/apache2/mods-available/ssl.load" ]; then @@ -10,6 +17,17 @@ if [ -f "/etc/apache2/mods-available/ssl.load" ]; then cp -rf /etc/apache2/mods-available/socache_shmcb* /etc/apache2/mods-enabled || true fi +# if new bitnami certs are missing AND we have lando ones then copy the lando ones +if [ -f "/certs/cert.crt" ]; then + cp -rf /certs/cert.crt /certs/tls.crt + chown www-data /certs/tls.crt + chmod 0644 /certs/tls.crt + + cp -rf /certs/cert.key /certs/tls.key + chown www-data /certs/tls.key + chmod 0640 /certs/tls.key +fi + # Detect and run the correct entrypoint script. THANKS BITNAMI! if [ -f "/opt/bitnami/scripts/apache/entrypoint.sh" ]; then /opt/bitnami/scripts/apache/entrypoint.sh /opt/bitnami/scripts/apache/run.sh diff --git a/examples/2.4/.lando.yml b/examples/2.4/.lando.yml index 24931c8..bfed306 100644 --- a/examples/2.4/.lando.yml +++ b/examples/2.4/.lando.yml @@ -6,7 +6,7 @@ services: defaults: type: apache:2.4 patch: - type: apache:2.4.64 + type: apache:2.4.41 # This is important because it lets lando know to test against the plugin in this repo # DO NOT REMOVE THIS! diff --git a/examples/2.4/README.md b/examples/2.4/README.md index 104e726..d86f472 100644 --- a/examples/2.4/README.md +++ b/examples/2.4/README.md @@ -20,10 +20,10 @@ Run the following commands to validate things are rolling as they should. ```bash # Should return 2.4.65 for the default version -lando exec defaults -- apachectl -V | grep 2.4 +lando exec defaults -- apachectl -V | grep 2.4.65 -# Should return 2.4.64 for the patch service -lando exec patch -- apachectl -V | grep 2.4.64 +# Should return 2.4.41 for the patch service +lando exec patch -- apachectl -V | grep 2.4.41 # Should serve from the app root by default lando exec defaults -- curl http://localhost | grep ROOTDIR diff --git a/examples/custom/.lando.yml b/examples/custom/.lando.yml index 4e6af9f..0dda77f 100644 --- a/examples/custom/.lando.yml +++ b/examples/custom/.lando.yml @@ -4,14 +4,14 @@ proxy: - landoapachecustom.lndo.site services: custom: - type: apache + type: apache:2 webroot: web ssl: true config: server: config/httpd.conf vhosts: config/custom.conf override: - type: apache + type: apache:2.4 webroot: web overrides: ports: From f545d4b7018a102e3629893b1397d94fbf6df421 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Sat, 30 Aug 2025 12:52:15 -0400 Subject: [PATCH 4/7] rework tests for independent curl --- examples/2.4/.lando.yml | 4 ++++ examples/2.4/README.md | 4 ++-- examples/custom/.lando.yml | 5 +++++ examples/custom/README.md | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/2.4/.lando.yml b/examples/2.4/.lando.yml index bfed306..c9c2e1c 100644 --- a/examples/2.4/.lando.yml +++ b/examples/2.4/.lando.yml @@ -7,6 +7,10 @@ services: type: apache:2.4 patch: type: apache:2.4.41 + curl: + api: 4 + image: curlimages/curl:8.15.0 + command: sleep infinity # This is important because it lets lando know to test against the plugin in this repo # DO NOT REMOVE THIS! diff --git a/examples/2.4/README.md b/examples/2.4/README.md index d86f472..92a3203 100644 --- a/examples/2.4/README.md +++ b/examples/2.4/README.md @@ -26,10 +26,10 @@ lando exec defaults -- apachectl -V | grep 2.4.65 lando exec patch -- apachectl -V | grep 2.4.41 # Should serve from the app root by default -lando exec defaults -- curl http://localhost | grep ROOTDIR +lando exec curl -- curl http://defaults | grep ROOTDIR # Should only serve over http by default -lando exec defaults -- curl https://localhost || echo $? | grep 7 +lando exec curl -- curl https://defaults || echo $? | grep 7 ``` ## Destroy tests diff --git a/examples/custom/.lando.yml b/examples/custom/.lando.yml index 0dda77f..8d339af 100644 --- a/examples/custom/.lando.yml +++ b/examples/custom/.lando.yml @@ -19,6 +19,11 @@ services: published: 8080 protocol: tcp mode: host + curl: + api: 4 + image: curlimages/curl:8.15.0 + command: sleep infinity + # This is important because it lets lando know to test against the plugin in this repo # DO NOT REMOVE THIS! diff --git a/examples/custom/README.md b/examples/custom/README.md index a31a3cb..88688fb 100644 --- a/examples/custom/README.md +++ b/examples/custom/README.md @@ -20,10 +20,10 @@ Run the following commands to validate things are rolling as they should. ```bash # Should serve from webroot if specified -lando exec custom -- curl http://localhost | grep WEBDIR +lando exec curl -- curl http://custom | grep WEBDIR # Should serve from https when specified -lando exec custom -- curl https://localhost | grep WEBDIR +lando exec curl -- curl https://custom | grep WEBDIR # Should mount custom config to the correct locationz lando exec custom -- cat /opt/bitnami/apache/conf/httpd.conf | grep LANDOHTTPD From 9445a37c02abb702fd54b1ddd6809742dc052686 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Sat, 30 Aug 2025 12:54:48 -0400 Subject: [PATCH 5/7] rework tests for independent curl part 2 --- examples/custom/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/custom/README.md b/examples/custom/README.md index 88688fb..b0a5a15 100644 --- a/examples/custom/README.md +++ b/examples/custom/README.md @@ -30,7 +30,7 @@ lando exec custom -- cat /opt/bitnami/apache/conf/httpd.conf | grep LANDOHTTPD lando exec custom -- cat /opt/bitnami/apache/conf/vhosts/lando.conf | grep LANDOCUSTOM # Should use htaccess-lando if it exists -lando exec override -- curl -I http://landoapachecustom.lndo.site/folder1 | grep Location | grep http://landoapachecustom.lndo.site/folder2/ +lando exec curl -- curl -I http://landoapachecustom.lndo.site/folder1 | grep Location | grep http://landoapachecustom.lndo.site/folder2/ ``` ## Destroy tests From 4c7303c53c2c47711e602e1359776835e9c94fc0 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Sat, 30 Aug 2025 13:00:08 -0400 Subject: [PATCH 6/7] chxlnx --- docs/config.md | 4 ++-- docs/index.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/config.md b/docs/config.md index 133a788..5e62f51 100644 --- a/docs/config.md +++ b/docs/config.md @@ -5,9 +5,9 @@ description: Learn how to configure the Lando Apache service. # Configuration -Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/core/v3/lando.html) to get a good handle on how the magicks work. +Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/services/lando-3.html) to get a good handle on how the magicks work. -Also note that options, in addition to the [build steps](https://docs.lando.dev/core/v3/lando.html#build-steps) and [overrides](https://docs.lando.dev/core/v3/lando.html#overrides) that are available to every service, are shown below: +Also note that options, in addition to the [build steps](https://docs.lando.dev/services/lando-3.html#build-steps) and [overrides](https://docs.lando.dev/services/lando-3.html#overrides) that are available to every service, are shown below: ```yaml services: diff --git a/docs/index.md b/docs/index.md index 2d70f17..0bbc395 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,9 +6,9 @@ next: ./config.html # Apache -[Apache](https://www.apache.org/) is a very common web server which you can easily add to your Lando app by adding an entry to the [services](https://docs.lando.dev/core/v3/services/lando.html) top-level config in your [Landofile](https://docs.lando.dev/core/v3). +[Apache](https://www.apache.org/) is a very common web server which you can easily add to your Lando app by adding an entry to the [services](https://docs.lando.dev/services/lando-3.html) top-level config in your [Landofile](https://docs.lando.dev/landofile). -You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/core/v3/services/lando.html) top-level config in your [Landofile](https://docs.lando.dev/core/v3). +You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/services/lando-3.html) top-level config in your [Landofile](https://docs.lando.dev/landofile). ```yaml services: From 8bb4a3263f8bc6ce0e999195d0631232523b372c Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Sat, 30 Aug 2025 13:03:49 -0400 Subject: [PATCH 7/7] chxlnx2 --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 0bbc395..b44ae1e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,7 +20,7 @@ services: * [2](https://hub.docker.com/r/bitnamilegacy/apache/tags?name=2.4.) * [2.4](https://hub.docker.com/r/bitnamilegacy/apache/tags?name=2.4.) -* [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides) +* [custom](https://docs.lando.dev/services/lando-3.html#overrides) ## Patch versions