From 86f59aebd55aae36f7b6ce34e606b698a4f88f11 Mon Sep 17 00:00:00 2001 From: 11notes Date: Thu, 3 Nov 2022 14:30:56 +0100 Subject: [PATCH] cull conf and ad correct startup --- hooks/post_push | 4 -- multi-arch-manifest.yaml | 16 ------- rootfs/etc/nginx/nginx.conf | 71 ++++++++++++++---------------- rootfs/usr/local/bin/entrypoint.sh | 2 +- 4 files changed, 33 insertions(+), 60 deletions(-) delete mode 100644 hooks/post_push delete mode 100644 multi-arch-manifest.yaml diff --git a/hooks/post_push b/hooks/post_push deleted file mode 100644 index 2903347..0000000 --- a/hooks/post_push +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.9.0/manifest-tool-linux-amd64 -chmod +x manifest-tool -./manifest-tool push from-spec multi-arch-manifest.yaml \ No newline at end of file diff --git a/multi-arch-manifest.yaml b/multi-arch-manifest.yaml deleted file mode 100644 index d9538ab..0000000 --- a/multi-arch-manifest.yaml +++ /dev/null @@ -1,16 +0,0 @@ -image: 11notes/nginx:stable -manifests: - - image: 11notes/nginx:amd64-1.22.1 - platform: - architecture: amd64 - os: linux - - image: 11notes/nginx:arm64v8-1.22.1 - platform: - architecture: arm64 - os: linux - variant: v8 - - image: 11notes/nginx:arm32v7-1.22.1 - platform: - architecture: arm - os: linux - variant: v7 \ No newline at end of file diff --git a/rootfs/etc/nginx/nginx.conf b/rootfs/etc/nginx/nginx.conf index b9caf4b..68f8d0d 100644 --- a/rootfs/etc/nginx/nginx.conf +++ b/rootfs/etc/nginx/nginx.conf @@ -1,47 +1,40 @@ - # - Global Server Options - +worker_processes auto; +worker_cpu_affinity auto; +worker_rlimit_nofile 204800; +error_log /var/log/nginx/error.log warn; - worker_processes auto; - worker_cpu_affinity auto; - worker_rlimit_nofile 204800; - error_log /var/log/nginx/error.log warn; +events { + worker_connections 1024; + use epoll; + multi_accept on; +} - # - Global Server Events - - events { +http { + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; - worker_connections 1024; - use epoll; - multi_accept on; + access_log off; + server_tokens off; - } + include mime.types; + default_type application/octet-stream; - # - HTTP Protocol Settings - - http { + tcp_nopush on; + tcp_nodelay on; + gzip on; - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; + client_max_body_size 1M; + keepalive_timeout 65; + keepalive_requests 102400; + reset_timedout_connection on; + client_body_timeout 10; + send_timeout 5; - access_log off; - server_tokens off; + open_file_cache max=204800 inactive=20s; + open_file_cache_valid 60s; + open_file_cache_min_uses 2; + open_file_cache_errors on; - include mime.types; - default_type application/octet-stream; - - tcp_nopush on; - tcp_nodelay on; - gzip on; - - client_max_body_size 1M; - keepalive_timeout 65; - keepalive_requests 102400; - reset_timedout_connection on; - client_body_timeout 10; - send_timeout 5; - - open_file_cache max=204800 inactive=20s; - open_file_cache_valid 60s; - open_file_cache_min_uses 2; - open_file_cache_errors on; - - include /nginx/etc/*.conf; - } + include /nginx/etc/*.conf; +} \ No newline at end of file diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh index a15b70a..2b74bce 100644 --- a/rootfs/usr/local/bin/entrypoint.sh +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -2,7 +2,7 @@ if [ -z "$1" ]; then set -- "nginx" \ -g \ - daemon off + 'daemon off;' fi exec "$@" \ No newline at end of file