Skip to content

Commit

Permalink
Release: v1.0.0 (#1265)
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD authored Jun 14, 2023
2 parents 915298c + 8cb5f67 commit 5cc7ed2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
8 changes: 5 additions & 3 deletions cloud/container/nginx-pwa/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
ARG ALWATR_NGINX_VERSION=1.6.1-1.24-alpine
ARG ALWATR_NGINX_VERSION=1.7.0-1.24-alpine

FROM ghcr.io/alimd/nginx:$ALWATR_NGINX_VERSION

# Default environment for nginx template
ENV NGINX_OPEN_FILE_CACHE_INACTIVE=15m \
NGINX_OPEN_FILE_CACHE_VALID=30d \
ENV NGINX_OPEN_FILE_CACHE="max=1000 inactive=1h" \
NGINX_OPEN_FILE_CACHE_VALID=1M \
NGINX_OPEN_FILE_CACHE_MIN_USES=2 \
NGINX_OUTPUT_BUFFERS="8 8k" \
NGINX_EXPIRES_DYNAMIC=epoch \
NGINX_EXPIRES_STATIC=max \
NGINX_EXPIRES_DEFAULT=epoch \
Expand Down
6 changes: 4 additions & 2 deletions cloud/container/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ ENV NGINX_ACCESS_LOG=off \
NGINX_SENDFILE_MAX_CHUNK=2m \
NGINX_TCP_NOPUSH=on \
NGINX_TCP_NODELAY=on \
NGINX_OPEN_FILE_CACHE_INACTIVE=15m \
NGINX_OPEN_FILE_CACHE_VALID=30d \
NGINX_OPEN_FILE_CACHE="max=1000 inactive=30m" \
NGINX_OPEN_FILE_CACHE_VALID=1d \
NGINX_OPEN_FILE_CACHE_MIN_USES=2 \
NGINX_OUTPUT_BUFFERS="8 16k" \
NGINX_EXPIRES_DYNAMIC=max \
NGINX_EXPIRES_STATIC=max \
NGINX_EXPIRES_DEFAULT=max \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ ignore_invalid_headers on;

# File Cache
# Removed from the cache if it has not been accessed during `inactive` time
open_file_cache max=10000 inactive=$NGINX_OPEN_FILE_CACHE_INACTIVE;
open_file_cache $NGINX_OPEN_FILE_CACHE;
# Sets a time after which open_file_cache elements should be validated.
open_file_cache_valid $NGINX_OPEN_FILE_CACHE_VALID;
# Sets the minimum number of file accesses during the period configured by the inactive parameter
open_file_cache_min_uses 1;
open_file_cache_min_uses $NGINX_OPEN_FILE_CACHE_MIN_USES;
# Enables or disables caching of file lookup errors by open_file_cache.
open_file_cache_errors on;
# We need `open_log_file_cache` becouse https://serverfault.com/questions/547421
open_log_file_cache max=10000 inactive=60s min_uses=2;
open_log_file_cache max=10000 inactive=30s valid=1m min_uses=2;

# During which a keep-alive client connection will stay open on the server side.
keepalive_timeout 300;
Expand All @@ -25,3 +25,7 @@ keepalive_timeout 300;
keepalive_requests 1000;

types_hash_max_size 2048;

# The output_buffers directive in nginx controls the size and number of buffers used to store the response data before it is sent to the client.
# Increasing the number of buffers can improve performance for clients with slow connections, while decreasing the number of buffers can reduce memory usage for clients with fast connections.
output_buffers $NGINX_OUTPUT_BUFFERS;

0 comments on commit 5cc7ed2

Please sign in to comment.