Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for nginx:1.26 #55

Merged
merged 8 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr-nginx-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- examples/1.23
- examples/1.24
- examples/1.25
- examples/1.26
- examples/custom

steps:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* Added support for `nginx:1.26`.
* Changed default version to `1.26`

## v1.1.0 - [March 8, 2024](https://github.com/lando/nginx/releases/tag/v1.1.0)
* Updated to latest database services.

Expand Down
5 changes: 3 additions & 2 deletions builders/nginx.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ const path = require('path');
module.exports = {
name: 'nginx',
config: {
version: '1.25',
supported: ['1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22', '1.23', '1.24', '1.25'],
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'],
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.23': 'bitnami/nginx:1.23.4-debian-11-r24',
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ function sidebar() {
],
},
];
};
};
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Learn how to configure the Lando NGINX service.

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-service.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-service.html#build-steps) and [overrides](https://docs.lando.dev/core/v3/lando-service.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/core/v3/services/lando.html#build-steps) and [overrides](https://docs.lando.dev/core/v3/services/lando.html#overrides) that are available to every service, are shown below:

```yaml
services:
Expand Down
7 changes: 4 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ next: ./config.html

[NGINX](https://www.nginx.com/resources/wiki/) is a very common web server and reverse proxy.

You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/core/v3/lando-service.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/core/v3/services/lando.html) top-level config in your [Landofile](https://docs.lando.dev/core/v3).

```yaml
services:
Expand All @@ -18,7 +18,8 @@ services:

## Supported versions

* **[1.25](https://hub.docker.com/r/bitnami/nginx)** **(default)**
* **[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)
Expand All @@ -28,7 +29,7 @@ services:
* [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)
* [custom](https://docs.lando.dev/core/v3/lando-service.html#overrides)
* [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides)

## Patch versions

Expand Down
11 changes: 11 additions & 0 deletions examples/1.26/.lando.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: lando-nginx-126
services:
defaults:
type: nginx:1.26
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.26/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.26.x as the default version
lando ssh -s defaults -c "nginx -v 2>&1 | grep 1.26"

# Should serve from the app root by default
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
```

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.26/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ROOTDIR
160 changes: 28 additions & 132 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.16.0",
"@lando/leia": "^0.6.5",
"@lando/leia": "^1.0.0-beta.3",
"@lando/vitepress-theme-default-plus": "^1.0.2",
"chai": "^4.3.4",
"command-line-test": "^1.0.10",
Expand Down
Loading