Skip to content

Commit

Permalink
feat: use OpenResty image instead of NGINX
Browse files Browse the repository at this point in the history
* OpenResty = NGINX + LuaJIT + ngx_lua_module
* base for Redis integration with NGINX
* https://openresty.org/en/
  • Loading branch information
dhhyi authored and shauke committed Nov 29, 2023
1 parent cc2057a commit 7d7c8ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/guides/migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 8 additions & 1 deletion nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 7d7c8ec

Please sign in to comment.