Skip to content

Commit

Permalink
fix(nginx): review and enhance
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD committed Nov 27, 2023
1 parent d95b1f5 commit 5adf303
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Alwatr Storage

This is an extremely fast and compact JSON-based database that operates in memory, includes a JSON file backup, and serve over the highly accelerated Nginx.
Extremely fast and compact JSON-based database that operates in memory, includes a JSON file backup, and serve over the highly accelerated Nginx.
29 changes: 12 additions & 17 deletions packages/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
FROM ghcr.io/alwatr/nginx-json:2.0.0

COPY etc/nginx/ /etc/nginx/
COPY data/ .
# COPY data/ .
RUN ls -RlahF /etc/nginx /data

# ENV NGINX_CLIENT_MAX_BODY_SIZE=1k \
# NGINX_SENDFILE=on \
# NGINX_SENDFILE_MAX_CHUNK=2m \
# NGINX_TCP_NOPUSH=on \
# NGINX_TCP_NODELAY=on \
# NGINX_OPEN_FILE_CACHE="max=5000 inactive=1h" \
# NGINX_OPEN_FILE_CACHE_VALID=1s \
# NGINX_OPEN_FILE_CACHE_MIN_USES=2 \
# NGINX_OUTPUT_BUFFERS="8 8k" \
# NGINX_EXPIRES_DYNAMIC=epoch \
# NGINX_EXPIRES_STATIC=max \
# NGINX_EXPIRES_DEFAULT=epoch \
# NGINX_LIMIT_REQ_RATE=400 \
# NGINX_LIMIT_REQ_BURST=1000 \
# NGINX_DISABLE_SYMLINKS=if_not_owner
ENV NGINX_OPEN_FILE_CACHE="max=5000 inactive=1h" \
NGINX_OPEN_FILE_CACHE_VALID=1s \
NGINX_OPEN_FILE_CACHE_MIN_USES=2 \
NGINX_OUTPUT_BUFFERS="8 8k" \
NGINX_EXPIRES_DYNAMIC=epoch \
NGINX_EXPIRES_STATIC=max \
NGINX_EXPIRES_DEFAULT=epoch \
NGINX_LIMIT_REQ_RATE=400 \
NGINX_LIMIT_REQ_BURST=1000 \
NGINX_DISABLE_SYMLINKS=if_not_owner

ARG BUILD_REV
ARG BUILD_DATE
LABEL org.opencontainers.image.title="alwatr/storage-nginx" \
org.opencontainers.image.description="This is a high-performance version of NGINX, which has been enhanced by Alwatr for the purpose of serving JSON content efficiently." \
org.opencontainers.image.description="Serve the content of the Alwatr Storage database extremely quickly with validating the authentication token." \
org.opencontainers.image.base.name="ghcr.io/alwatr/nginx-json:2.0.0" \
org.opencontainers.image.version="2.0.0" \
org.opencontainers.image.ref.name="2.0.0-nginx1.25.3-alpine3.18-slim" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ location @null_data {
}

# Deny locations containing /securage/
location ~ /securage/ {
return 403;
}
# location ~ /securage/ {
# return 403;
# }

# Deny all unknown location
location / {
Expand Down

0 comments on commit 5adf303

Please sign in to comment.