Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git/*
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Variable | Example | Description
`SERVER_SENDFILE` | `SERVER_SENDFILE=off` | Allows runtime to specify value of nginx's `sendfile` (default, on)
`SERVER_KEEPALIVE` | `SERVER_KEEPALIVE=30` | Define HTTP 1.1's keepalive timeout
`SERVER_WORKER_CONNECTIONS` | `SERVER_WORKER_CONNECTIONS=2048` | Sets up the number of connections for worker processes
`SERVER_LOG_MINIMAL` | `SERVER_LOG_MINIMAL=1` | Minimize the logging format, appropriate for development environments


### Runtime Commands
Expand Down
2 changes: 2 additions & 0 deletions container/root/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ http {
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" NGINX_SERVER';

log_format minimal '$request_method $request_uri $status';

error_log /dev/stdout info;
access_log /dev/stdout main;

Expand Down
8 changes: 8 additions & 0 deletions container/root/run.d/10-nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ then
echo "[nginx] setting worker connection limit ${SERVER_WORKER_CONNECTIONS}"
sed -i "s/\worker_connections .*;/worker_connections ${SERVER_WORKER_CONNECTIONS};/" $CONF_NGINX_SERVER
fi

if [[ $SERVER_LOG_MINIMAL ]]
then
echo "[nginx] enabling minimal logging"
# Uncomments all gzip handling options
sed -i "s/access_log \/dev\/stdout .*;/access_log \/dev\/stdout minimal;/" $CONF_NGINX_SERVER
fi