Skip to content

Commit

Permalink
feat(nginx): Update nginx version and add default error JSON file
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Dec 25, 2023
1 parent 7e58911 commit 5213c65
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/nginx/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*
!etc/nginx/
!data/
!default-data/
4 changes: 2 additions & 2 deletions packages/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM ghcr.io/alwatr/nginx-json:2.2.1
LABEL org.opencontainers.image.base.name="ghcr.io/alwatr/nginx-json:2.2.1"

COPY etc/nginx/ /etc/nginx/
# COPY data/ .
RUN set -eux; ls -RlahF /etc/nginx /data
COPY default-data/ /default-data/
RUN ls -RlahF /etc/nginx /default-data /data

ENV NGINX_DOCUMENT_ROOT=/data \
NGINX_OPEN_FILE_CACHE="max=5000 inactive=1h" \
Expand Down
9 changes: 9 additions & 0 deletions packages/nginx/default-data/_error.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ok": false,
"statusCode": <!--# echo var="status" default="500" -->,
"errorCode": "serve_error",
"meta": {
"server": "AlwatrStore",
"status": "<!--# echo var="status_text" default="Something goes wrong." -->"
}
}

0 comments on commit 5213c65

Please sign in to comment.