Skip to content

Commit

Permalink
Updated nginx Versions
Browse files Browse the repository at this point in the history
* Added nginx version 1.27
* Updated other bitnami versions
* Minor improvements to curl commands
  • Loading branch information
lefte committed Oct 10, 2024
1 parent 0c58e57 commit 1032068
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 21 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr-nginx-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- examples/1.24
- examples/1.25
- examples/1.26
- examples/1.27
- examples/custom

steps:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
11 changes: 6 additions & 5 deletions builders/nginx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
23 changes: 12 additions & 11 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions examples/1.27/.lando.yml
Original file line number Diff line number Diff line change
@@ -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": ../..
44 changes: 44 additions & 0 deletions examples/1.27/README.md
Original file line number Diff line number Diff line change
@@ -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 https://localhost" || echo $? | grep 1
```

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
```
1 change: 1 addition & 0 deletions examples/1.27/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ROOTDIR
2 changes: 1 addition & 1 deletion examples/custom/.lando.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
8 changes: 4 additions & 4 deletions examples/custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1032068

Please sign in to comment.