From 7d7c8ecc6e4bae418309dd380d5750f896a5c2f6 Mon Sep 17 00:00:00 2001 From: Danilo Hoffmann Date: Wed, 2 Aug 2023 15:33:22 +0200 Subject: [PATCH] feat: use OpenResty image instead of NGINX * OpenResty = NGINX + LuaJIT + ngx_lua_module * base for Redis integration with NGINX * https://openresty.org/en/ --- docs/guides/migrations.md | 4 ++++ nginx/Dockerfile | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/guides/migrations.md b/docs/guides/migrations.md index 3daa683a0c..36093a5249 100644 --- a/docs/guides/migrations.md +++ b/docs/guides/migrations.md @@ -9,6 +9,10 @@ kb_sync_latest_only ## From 4.2 to 5.0 +For the optional usage of a shared Redis cache we switched from the plain standard NGINX Docker image to an [OpenResty](https://openresty.org/en/) Docker image that provides more flexibility to configure the underlying NGINX. +If the NGINX container was customized in the project it has to be checked if those customizations work in the same way with the OpenResty image. +Without any customizations the switch should not be noticeable and does not require any adaptions. + We renamed the input parameter 'id' to 'productListingId' for the product listing component to avoid unintentionally having more than one element with the same id in the HTML document. The api-token.service has been refactored and the class variables `apiToken$` and `cookieVanishes$` have got the private modifier. Use the public getter/setter methods to access these variables outside the class. diff --git a/nginx/Dockerfile b/nginx/Dockerfile index fec0b4797a..6e03f78590 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -1,4 +1,11 @@ -FROM nginx:1.22 +FROM openresty/openresty:1.21.4.3-1-jammy +COPY --from=nginx:mainline /docker-entrypoint.sh / +COPY --from=nginx:mainline /docker-entrypoint.d/*.sh /docker-entrypoint.d/ +RUN cp /usr/local/openresty/nginx/conf/mime.types /etc/nginx/mime.types \ + && useradd -Ms /bin/false nginx +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["nginx", "-c", "/etc/nginx/nginx.conf", "-g", "daemon off;"] + RUN apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y apache2-utils libnss3-tools COPY nginx.conf /etc/nginx/nginx.conf