diff --git a/.github/workflows/pr-nginx-tests.yml b/.github/workflows/pr-nginx-tests.yml index 887903d..922a791 100644 --- a/.github/workflows/pr-nginx-tests.yml +++ b/.github/workflows/pr-nginx-tests.yml @@ -29,6 +29,7 @@ jobs: - examples/1.24 - examples/1.25 - examples/1.26 + - examples/1.27 - examples/custom steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 8305b0a..2e8f4a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +* Added nginx 1.27 +* Updated other versions to latest bitnami images +* Minor curl improvements + ## v1.2.0 - [June 11, 2024](https://github.com/lando/nginx/releases/tag/v1.2.0) * Added support for `nginx:1.26`. diff --git a/builders/nginx.js b/builders/nginx.js index 22fe2da..cee1ba6 100644 --- a/builders/nginx.js +++ b/builders/nginx.js @@ -8,12 +8,13 @@ const path = require('path'); module.exports = { name: 'nginx', config: { - version: '1.26', - supported: ['1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22', '1.23', '1.24', '1.25', '1.26'], + version: '1.27', + supported: ['1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22', '1.23', '1.24', '1.25', '1.26', '1.27'], pinPairs: { - '1.26': 'bitnami/nginx:1.26.1-debian-12-r0', - '1.25': 'bitnami/nginx:1.25.3-debian-11-r1', - '1.24': 'bitnami/nginx:1.24.0-debian-11-r153', + '1.27': 'bitnami/nginx:1.27.2-debian-12-r0', + '1.26': 'bitnami/nginx:1.26.2-debian-12-r6', + '1.25': 'bitnami/nginx:1.25.5-debian-12-r7', + '1.24': 'bitnami/nginx:1.24.0-debian-12-r25', '1.23': 'bitnami/nginx:1.23.4-debian-11-r24', '1.22': 'bitnami/nginx:1.22.1-debian-11-r66', '1.21': 'bitnami/nginx:1.21.6-debian-11-r21', diff --git a/docs/index.md b/docs/index.md index f7334f4..5905d77 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,17 +18,18 @@ services: ## Supported versions -* **[1.26](https://hub.docker.com/r/bitnami/nginx)** **(default)** -* [1.25](https://hub.docker.com/r/bitnami/nginx) -* [1.24](https://hub.docker.com/r/bitnami/nginx) -* [1.23](https://hub.docker.com/r/bitnami/nginx) -* [1.22](https://hub.docker.com/r/bitnami/nginx) -* [1.21](https://hub.docker.com/r/bitnami/nginx) -* [1.20](https://hub.docker.com/r/bitnami/nginx) -* [1.19](https://hub.docker.com/r/bitnami/nginx) -* [1.18](https://hub.docker.com/r/bitnami/nginx) -* [1.17](https://hub.docker.com/r/bitnami/nginx) -* [1.16](https://hub.docker.com/r/bitnami/nginx) +* **[1.27](https://hub.docker.com/r/bitnami/nginx/tags?name=1.27)** **(default)** +* [1.26](https://hub.docker.com/r/bitnami/nginx/tags?name=1.26) +* [1.25](https://hub.docker.com/r/bitnami/nginx/tags?name=1.25) +* [1.24](https://hub.docker.com/r/bitnami/nginx/tags?name=1.24) +* [1.23](https://hub.docker.com/r/bitnami/nginx/tags?name=1.23) +* [1.22](https://hub.docker.com/r/bitnami/nginx/tags?name=1.22) +* [1.21](https://hub.docker.com/r/bitnami/nginx/tags?name=1.21) +* [1.20](https://hub.docker.com/r/bitnami/nginx/tags?name=1.20) +* [1.19](https://hub.docker.com/r/bitnami/nginx/tags?name=1.19) +* [1.18](https://hub.docker.com/r/bitnami/nginx/tags?name=1.18) +* [1.17](https://hub.docker.com/r/bitnami/nginx/tags?name=1.17) +* [1.16](https://hub.docker.com/r/bitnami/nginx/tags?name=1.16) * [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides) ## Patch versions diff --git a/examples/1.16/README.md b/examples/1.16/README.md index bfac4c9..d457c26 100644 --- a/examples/1.16/README.md +++ b/examples/1.16/README.md @@ -32,7 +32,7 @@ lando ssh -s patch -c "nginx -v 2>&1 | grep 1.16.1" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.17/README.md b/examples/1.17/README.md index 46c8de6..82f1976 100644 --- a/examples/1.17/README.md +++ b/examples/1.17/README.md @@ -32,7 +32,7 @@ lando ssh -s patch -c "nginx -v 2>&1 | grep 1.17.10" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.18/README.md b/examples/1.18/README.md index 529f052..3f1dc99 100644 --- a/examples/1.18/README.md +++ b/examples/1.18/README.md @@ -29,7 +29,7 @@ lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.18" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.19/README.md b/examples/1.19/README.md index fa55702..da56751 100644 --- a/examples/1.19/README.md +++ b/examples/1.19/README.md @@ -29,7 +29,7 @@ lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.19" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.20/README.md b/examples/1.20/README.md index a3db7f0..606e876 100644 --- a/examples/1.20/README.md +++ b/examples/1.20/README.md @@ -29,7 +29,7 @@ lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.20" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.21/README.md b/examples/1.21/README.md index 4722270..00dbd05 100644 --- a/examples/1.21/README.md +++ b/examples/1.21/README.md @@ -29,7 +29,7 @@ lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.21" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.22/README.md b/examples/1.22/README.md index 8d38c4f..72be643 100644 --- a/examples/1.22/README.md +++ b/examples/1.22/README.md @@ -29,7 +29,7 @@ lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.22" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.23/README.md b/examples/1.23/README.md index f323635..921a956 100644 --- a/examples/1.23/README.md +++ b/examples/1.23/README.md @@ -29,7 +29,7 @@ lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.23" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.24/README.md b/examples/1.24/README.md index 74cde45..8b45ca0 100644 --- a/examples/1.24/README.md +++ b/examples/1.24/README.md @@ -29,7 +29,7 @@ lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.24" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.25/README.md b/examples/1.25/README.md index f38acf7..5b575a0 100644 --- a/examples/1.25/README.md +++ b/examples/1.25/README.md @@ -29,7 +29,7 @@ lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.25" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.26/README.md b/examples/1.26/README.md index 92a8ae2..2ee843f 100644 --- a/examples/1.26/README.md +++ b/examples/1.26/README.md @@ -29,7 +29,7 @@ lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.26" lando ssh -s defaults -c "curl http://localhost | grep ROOTDIR" # Should only serve over http by default -lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 1 +lando ssh -s defaults -c "curl https://localhost" || echo $? | grep 7 ``` Destroy tests diff --git a/examples/1.27/.lando.yml b/examples/1.27/.lando.yml new file mode 100644 index 0000000..4d99e1d --- /dev/null +++ b/examples/1.27/.lando.yml @@ -0,0 +1,11 @@ +name: lando-nginx-127 +services: + defaults: + type: nginx:1.27 + build_as_root: + - apt-get update && apt-get install -y curl + +# This is important because it lets lando know to test against the plugin in this repo +# DO NOT REMOVE THIS! +plugins: + "@lando/nginx": ../.. diff --git a/examples/1.27/README.md b/examples/1.27/README.md new file mode 100644 index 0000000..a2cb493 --- /dev/null +++ b/examples/1.27/README.md @@ -0,0 +1,44 @@ +nginx Example +============= + +This example exists primarily to test the following documentation: + +* [nginx Service](https://docs.devwithlando.io/tutorials/nginx.html) + +Start up tests +-------------- + +Run the following commands to get up and running with this example. + +```bash +# Should start up successfully +lando poweroff +lando start +``` + +Verification commands +--------------------- + +Run the following commands to validate things are rolling as they should. + +```bash +# Should use 1.27.x as the default version +lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.27" + +# Should serve from the app root by default +lando ssh -s defaults -c "curl -s http://localhost | grep ROOTDIR" + +# Should only serve over http by default +lando ssh -s defaults -c "curl -s --write-out \"%{exitcode}\" https://localhost | grep 7" +``` + +Destroy tests +------------- + +Run the following commands to trash this app like nothing ever happened. + +```bash +# Should be destroyed with success +lando destroy -y +lando poweroff +``` diff --git a/examples/1.27/index.html b/examples/1.27/index.html new file mode 100644 index 0000000..83213b2 --- /dev/null +++ b/examples/1.27/index.html @@ -0,0 +1 @@ +ROOTDIR diff --git a/examples/custom/.lando.yml b/examples/custom/.lando.yml index edb5676..302c7fa 100644 --- a/examples/custom/.lando.yml +++ b/examples/custom/.lando.yml @@ -1,7 +1,7 @@ name: lando-nginx-custom services: custom: - type: nginx:1.25 + type: nginx:1.27 ssl: true webroot: www build_as_root: diff --git a/examples/custom/README.md b/examples/custom/README.md index 48863ce..a78b519 100644 --- a/examples/custom/README.md +++ b/examples/custom/README.md @@ -23,12 +23,12 @@ Run the following commands to validate things are rolling as they should. ```bash # Should serve from webroot if specified -lando ssh -s custom -c "curl http://localhost" | grep WWWDIR -lando ssh -s custom_116 -c "curl http://localhost | grep WWWDIR" +lando ssh -s custom -c "curl -s http://localhost" | grep WWWDIR +lando ssh -s custom_116 -c "curl -s http://localhost | grep WWWDIR" # Should serve from https when specified -lando ssh -s custom -c "curl https://localhost | grep WWWDIR" -lando ssh -s custom_116 -c "curl https://localhost | grep WWWDIR" +lando ssh -s custom -c "curl -s https://localhost | grep WWWDIR" +lando ssh -s custom_116 -c "curl -s https://localhost | grep WWWDIR" # Should mount custom config to the correct locations and render the correct vars lando ssh -s custom -c "cat /opt/bitnami/nginx/conf/nginx.conf" | grep LANDOSERVER