diff --git a/.github/workflows/pr-nginx-tests.yml b/.github/workflows/pr-nginx-tests.yml index 08913b4..9d0cae1 100644 --- a/.github/workflows/pr-nginx-tests.yml +++ b/.github/workflows/pr-nginx-tests.yml @@ -28,6 +28,7 @@ jobs: - examples/1.23 - examples/1.24 - examples/1.25 + - examples/1.26 - examples/custom steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 909aadd..9561b82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/builders/nginx.js b/builders/nginx.js index a7401b0..22fe2da 100644 --- a/builders/nginx.js +++ b/builders/nginx.js @@ -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', diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 4f5bf39..23c0669 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -53,4 +53,4 @@ function sidebar() { ], }, ]; -}; \ No newline at end of file +}; diff --git a/docs/config.md b/docs/config.md index 0018a54..5982e69 100644 --- a/docs/config.md +++ b/docs/config.md @@ -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: diff --git a/docs/index.md b/docs/index.md index 7075af1..f7334f4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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: @@ -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) @@ -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 diff --git a/examples/1.26/.lando.yml b/examples/1.26/.lando.yml new file mode 100644 index 0000000..1573fb6 --- /dev/null +++ b/examples/1.26/.lando.yml @@ -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": ../.. diff --git a/examples/1.26/README.md b/examples/1.26/README.md new file mode 100644 index 0000000..92a8ae2 --- /dev/null +++ b/examples/1.26/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.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 +``` diff --git a/examples/1.26/index.html b/examples/1.26/index.html new file mode 100644 index 0000000..83213b2 --- /dev/null +++ b/examples/1.26/index.html @@ -0,0 +1 @@ +ROOTDIR diff --git a/package-lock.json b/package-lock.json index ae37289..f19b36c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,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", @@ -1191,18 +1191,39 @@ "node": ">=14.0.0" } }, + "node_modules/@lando/chai": { + "name": "chai", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@lando/leia": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/@lando/leia/-/leia-0.6.7.tgz", - "integrity": "sha512-1ldWSeDABuELs4mDcmIFVbl3yB/hVWDjk1f8SFtNGwouR3SAPezoQ67EpCM+4WVnuLk4e2Q0y4dkOeNf14b6wg==", + "version": "1.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@lando/leia/-/leia-1.0.0-beta.3.tgz", + "integrity": "sha512-JW8so42+UcDHzNg1LHb7wta13NRAEd4ammKNaPSJVd5qZ4tu4aVk8aUi1wmUONamZlLEsB8/oy7eBFzbHjumvw==", "dev": true, + "license": "GPL-3.0", "dependencies": { "@lando/argv": "^1.0.6", + "@lando/chai": "npm:chai@^4.4.1", "@oclif/command": "^1.8.0", "@oclif/config": "^1.17.0", "@oclif/errors": "^1.3.5", "@oclif/plugin-help": "^3.2.3", - "chai": "^4.2.0", "chalk": "^4.1.2", "command-line-test": "^1.0.10", "debug": "^4.3.2", @@ -1212,14 +1233,14 @@ "glob": "^7.1.3", "lodash": "^4.17.11", "marked": "^4.0.10", - "mocha": "^5.2.0", + "mocha": "^9.2.2", "object-hash": "^2.2.0" }, "bin": { "leia": "bin/leia" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@lando/leia/node_modules/ansi-styles": { @@ -1271,112 +1292,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/@lando/leia/node_modules/commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, - "node_modules/@lando/leia/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/@lando/leia/node_modules/he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha512-z/GDPjlRMNOa2XJiB4em8wJpuuBfrFOlYKTZxtpkdr1uPdibHI8rYA3MY0KDObpVyaes0e/aunid/t88ZI2EKA==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/@lando/leia/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@lando/leia/node_modules/mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", - "dev": true, - "dependencies": { - "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.5", - "he": "1.1.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "supports-color": "5.4.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/@lando/leia/node_modules/mocha/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/@lando/leia/node_modules/mocha/node_modules/glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@lando/leia/node_modules/mocha/node_modules/supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@lando/leia/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, "node_modules/@lando/leia/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -5211,12 +5126,6 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==", - "dev": true - }, "node_modules/minimist-options": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", @@ -5243,19 +5152,6 @@ "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", "dev": true }, - "node_modules/mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", - "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", - "dev": true, - "dependencies": { - "minimist": "0.0.8" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/mocha": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", diff --git a/package.json b/package.json index 79dc123..abbe349 100644 --- a/package.json +++ b/package.json @@ -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",