From 54a284a3ad48c7f73a77d061e5ba6e8d73218f04 Mon Sep 17 00:00:00 2001 From: Ava Hahn Date: Tue, 16 Apr 2024 16:20:06 -0700 Subject: [PATCH 1/2] Add additional information to the README * expand on docker instructions * identify API documentation * identify WASM documentation Acked-by: Andrew Clayton Signed-off-by: Ava Hahn --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dfa0572b3..6ec5c83a2 100644 --- a/README.md +++ b/README.md @@ -42,12 +42,22 @@ For details and available language packages, see the ``` console $ docker pull unit +$ mkdir /tmp/unit-control # customize as needed. +$ docker run -d \ + --mount type=bind,src=/tmp/unit-control,dst=/var/run \ + --mount type=bind,src=.,dst=/www \ + --network host \ + unit ``` For a description of image tags, see the [docs](https://unit.nginx.org/installation/#docker-images). +Your current working directory will now be mounted to the Unit image at `/www`. +You can reach its socket at `/tmp/unit-control/control.unit.sock` assuming no +further customizations have been made. + ### Amazon Linux, Fedora, Red Hat ``` console @@ -71,6 +81,15 @@ $ wget https://raw.githubusercontent.com/nginx/unit/master/tools/setup-unit && c For details and available language packages, see the [docs](https://unit.nginx.org/installation/#official-packages). +## Configuration + +NGINX Unit provides a RESTful API for dynamic configuration. +See the [control API documentation](https://unit.nginx.org/controlapi/) +for more information on what endpoints are available and how to use them. + + +For full details of configuration management, see the +[docs](https://unit.nginx.org/configuration/#configuration-management). ## Running a Hello World App @@ -161,8 +180,10 @@ Unit's output should contain both snippets, neatly organized: } ``` -For full details of configuration management, see the -[docs](https://unit.nginx.org/configuration/#configuration-management). +## WebAssembly +Unit supports running WebAssembly Components (WASI 0.2). +For more information see the +[Unit Configuration Docs](https://unit.nginx.org/configuration/#configuration-wasm). ## OpenAPI Specification From 5b11f5c2a642bfcb859fefc1159eeb47b0abb888 Mon Sep 17 00:00:00 2001 From: Ava Hahn Date: Wed, 17 Apr 2024 20:43:48 -0700 Subject: [PATCH 2/2] Elaborate on docker image differences * This commit adds a warning to readers to clarify that they should be aware of our different image tags before pulling their image. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ec5c83a2..2f6e76904 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ For details and available language packages, see the ### Docker ``` console -$ docker pull unit +$ docker pull unit: $ mkdir /tmp/unit-control # customize as needed. $ docker run -d \ --mount type=bind,src=/tmp/unit-control,dst=/var/run \ @@ -53,6 +53,8 @@ $ docker run -d \ For a description of image tags, see the [docs](https://unit.nginx.org/installation/#docker-images). +WARNING: latest image tag may not provide support for specific language modules, +*do* check the available image tags from the link above before pulling your image. Your current working directory will now be mounted to the Unit image at `/www`. You can reach its socket at `/tmp/unit-control/control.unit.sock` assuming no