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 ba7d09c..75706e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +## v1.2.0 - [August 29, 2025](https://github.com/lando/apache/releases/tag/v1.2.0) + +* 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) * Updated the version index.md to get Docuverse page to build correctly. diff --git a/builders/apache.js b/builders/apache.js index 02fb3a6..115f56f 100644 --- a/builders/apache.js +++ b/builders/apache.js @@ -9,9 +9,10 @@ module.exports = { name: 'apache', config: { version: '2.4', - supported: ['2.4'], + supported: ['2', '2.4'], pinPairs: { - '2.4': 'bitnami/apache:2.4.41-debian-10-r52', + '2': 'bitnamilegacy/apache:2.4.65-debian-12-r2', + '2.4': 'bitnamilegacy/apache:2.4.65-debian-12-r2', }, patchesSupported: true, confSrc: path.resolve(__dirname, '..', 'config'), @@ -48,7 +49,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/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/docs/config.md b/docs/config.md index 6da22d8..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: @@ -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 f2fa4fc..b44ae1e 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: @@ -18,8 +18,9 @@ services: ## Supported versions -* **[2.4](https://hub.docker.com/r/bitnami/apache)** **(default)** -* [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides) +* [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/services/lando-3.html#overrides) ## Patch versions @@ -32,8 +33,8 @@ 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/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..c9c2e1c 100644 --- a/examples/2.4/.lando.yml +++ b/examples/2.4/.lando.yml @@ -4,9 +4,13 @@ proxy: - landoapache.lndo.site services: defaults: - type: apache + type: apache:2.4 patch: - type: apache:2.4.39 + 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 75442a2..92a3203 100644 --- a/examples/2.4/README.md +++ b/examples/2.4/README.md @@ -19,17 +19,17 @@ 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.65 -# Should return 2.4.39 for the patch service -lando exec patch -- apachectl -V | grep 2.4.39 +# 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 +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 4e6af9f..8d339af 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: @@ -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..b0a5a15 100644 --- a/examples/custom/README.md +++ b/examples/custom/README.md @@ -20,17 +20,17 @@ 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 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 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"