compile temp paths into binary, all tmpfs-backed (/run/nginx/temp/)
build-and-publish / build (debian:13, NEXUS_PASS_TRIXIE, NEXUS_REPO_TRIXIE, NEXUS_USER_TRIXIE, trixie) (push) Successful in 3m7s
build-and-publish / build (ubuntu:26.04, NEXUS_PASS_RACCOON, NEXUS_REPO_RACCOON, NEXUS_USER_RACCOON, raccoon) (push) Successful in 3m16s

This commit is contained in:
root
2026-05-15 16:51:06 +00:00
parent 0b9651ca05
commit b7b4447afc
6 changed files with 43 additions and 30 deletions
+6 -16
View File
@@ -59,12 +59,7 @@ jobs:
"${PKG_DIR}/etc/systemd/system" "${PKG_DIR}/var/log/nginx" \ "${PKG_DIR}/etc/systemd/system" "${PKG_DIR}/var/log/nginx" \
"${PKG_DIR}/usr/lib" \ "${PKG_DIR}/usr/lib" \
"${PKG_DIR}/hostdata/default/public_html" \ "${PKG_DIR}/hostdata/default/public_html" \
"${PKG_DIR}/usr/nginx_lua" \ "${PKG_DIR}/usr/nginx_lua"
"${PKG_DIR}/usr/local/nginx/client_body_temp" \
"${PKG_DIR}/usr/local/nginx/proxy_temp" \
"${PKG_DIR}/usr/local/nginx/fastcgi_temp" \
"${PKG_DIR}/usr/local/nginx/uwsgi_temp" \
"${PKG_DIR}/usr/local/nginx/scgi_temp"
cp /usr/sbin/nginx "${PKG_DIR}/usr/sbin/" cp /usr/sbin/nginx "${PKG_DIR}/usr/sbin/"
cp -R /nginx/* "${PKG_DIR}/nginx/" || true cp -R /nginx/* "${PKG_DIR}/nginx/" || true
@@ -99,16 +94,11 @@ jobs:
cat > "${DEB_DIR}/postinst" <<'EOFPOSTINST' cat > "${DEB_DIR}/postinst" <<'EOFPOSTINST'
#!/bin/bash #!/bin/bash
useradd -r -d /usr/local/nginx -s /bin/false nginx 2>/dev/null || true useradd -r -s /bin/false nginx 2>/dev/null || true
install -d -o nginx -g nginx -m 0755 \ install -d -o nginx -g nginx -m 0755 /var/log/nginx
/usr/local/nginx \ # /run/nginx/temp/* is recreated on every systemd start (ExecStartPre)
/usr/local/nginx/client_body_temp \ # since /run is tmpfs and cleared on reboot.
/usr/local/nginx/proxy_temp \ chown -R nginx:nginx /var/log/nginx /nginx 2>/dev/null || true
/usr/local/nginx/fastcgi_temp \
/usr/local/nginx/uwsgi_temp \
/usr/local/nginx/scgi_temp \
/var/log/nginx
chown -R nginx:nginx /var/log/nginx /nginx /usr/local/nginx 2>/dev/null || true
systemctl daemon-reload 2>/dev/null || true systemctl daemon-reload 2>/dev/null || true
systemctl enable nginx.service 2>/dev/null || true systemctl enable nginx.service 2>/dev/null || true
systemctl restart nginx.service 2>/dev/null || true systemctl restart nginx.service 2>/dev/null || true
+1
View File
@@ -4,6 +4,7 @@
.creds .creds
.workers .workers
.local .local
.pi
Dockerfile Dockerfile
docker-compose.yaml docker-compose.yaml
docker-compose.yml docker-compose.yml
+12 -2
View File
@@ -263,9 +263,14 @@ test_nginx() {
--conf-path=/nginx/nginx.conf \ --conf-path=/nginx/nginx.conf \
--modules-path=/nginx/modules \ --modules-path=/nginx/modules \
--pid-path=/run/nginx.pid \ --pid-path=/run/nginx.pid \
--lock-path=/var/run/nginx.lock \ --lock-path=/run/nginx.lock \
--error-log-path=/var/log/nginx/error.log \ --error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \ --http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/run/nginx/temp/client_body \
--http-proxy-temp-path=/run/nginx/temp/proxy \
--http-fastcgi-temp-path=/run/nginx/temp/fastcgi \
--http-uwsgi-temp-path=/run/nginx/temp/uwsgi \
--http-scgi-temp-path=/run/nginx/temp/scgi \
--with-pcre \ --with-pcre \
--with-pcre-jit \ --with-pcre-jit \
--with-pcre=/opt/mod/pcre2-${SYSTEM_PCRE} \ --with-pcre=/opt/mod/pcre2-${SYSTEM_PCRE} \
@@ -321,9 +326,14 @@ function build() {
--conf-path=/nginx/nginx.conf \ --conf-path=/nginx/nginx.conf \
--modules-path=/nginx/modules \ --modules-path=/nginx/modules \
--pid-path=/run/nginx.pid \ --pid-path=/run/nginx.pid \
--lock-path=/var/run/nginx.lock \ --lock-path=/run/nginx.lock \
--error-log-path=/var/log/nginx/error.log \ --error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \ --http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/run/nginx/temp/client_body \
--http-proxy-temp-path=/run/nginx/temp/proxy \
--http-fastcgi-temp-path=/run/nginx/temp/fastcgi \
--http-uwsgi-temp-path=/run/nginx/temp/uwsgi \
--http-scgi-temp-path=/run/nginx/temp/scgi \
--with-pcre \ --with-pcre \
--with-pcre-jit \ --with-pcre-jit \
--with-pcre=/opt/mod/pcre2-${SYSTEM_PCRE} \ --with-pcre=/opt/mod/pcre2-${SYSTEM_PCRE} \
+12 -2
View File
@@ -263,9 +263,14 @@ test_nginx() {
--conf-path=/nginx/nginx.conf \ --conf-path=/nginx/nginx.conf \
--modules-path=/nginx/modules \ --modules-path=/nginx/modules \
--pid-path=/run/nginx.pid \ --pid-path=/run/nginx.pid \
--lock-path=/var/run/nginx.lock \ --lock-path=/run/nginx.lock \
--error-log-path=/var/log/nginx/error.log \ --error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \ --http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/run/nginx/temp/client_body \
--http-proxy-temp-path=/run/nginx/temp/proxy \
--http-fastcgi-temp-path=/run/nginx/temp/fastcgi \
--http-uwsgi-temp-path=/run/nginx/temp/uwsgi \
--http-scgi-temp-path=/run/nginx/temp/scgi \
--with-pcre \ --with-pcre \
--with-pcre-jit \ --with-pcre-jit \
--with-pcre=/opt/mod/pcre2-${SYSTEM_PCRE} \ --with-pcre=/opt/mod/pcre2-${SYSTEM_PCRE} \
@@ -321,9 +326,14 @@ function build() {
--conf-path=/nginx/nginx.conf \ --conf-path=/nginx/nginx.conf \
--modules-path=/nginx/modules \ --modules-path=/nginx/modules \
--pid-path=/run/nginx.pid \ --pid-path=/run/nginx.pid \
--lock-path=/var/run/nginx.lock \ --lock-path=/run/nginx.lock \
--error-log-path=/var/log/nginx/error.log \ --error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \ --http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/run/nginx/temp/client_body \
--http-proxy-temp-path=/run/nginx/temp/proxy \
--http-fastcgi-temp-path=/run/nginx/temp/fastcgi \
--http-uwsgi-temp-path=/run/nginx/temp/uwsgi \
--http-scgi-temp-path=/run/nginx/temp/scgi \
--with-pcre \ --with-pcre \
--with-pcre-jit \ --with-pcre-jit \
--with-pcre=/opt/mod/pcre2-${SYSTEM_PCRE} \ --with-pcre=/opt/mod/pcre2-${SYSTEM_PCRE} \
+6 -5
View File
@@ -4,14 +4,15 @@ After=syslog.target network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target Wants=network-online.target
[Service] [Service]
Type=notify Type=forking
NotifyAccess=main
PIDFile=/run/nginx.pid PIDFile=/run/nginx.pid
Environment=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 Environment=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
ExecStartPre=/usr/bin/install -d -o nginx -g nginx -m 0755 /usr/local/nginx /usr/local/nginx/client_body_temp /usr/local/nginx/proxy_temp /usr/local/nginx/fastcgi_temp /usr/local/nginx/uwsgi_temp /usr/local/nginx/scgi_temp /var/log/nginx ExecStartPre=/usr/bin/install -d -o nginx -g nginx -m 0755 /run/nginx/temp /run/nginx/temp/client_body /run/nginx/temp/proxy /run/nginx/temp/fastcgi /run/nginx/temp/uwsgi /run/nginx/temp/scgi /var/log/nginx
ExecStartPre=/usr/sbin/nginx -t ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx ExecStart=/usr/sbin/nginx -c /nginx/nginx.conf
ExecReload=/usr/sbin/nginx -s reload ExecReload=/bin/sh -c "/bin/kill -s HUP $(/bin/cat /run/nginx.pid)"
ExecStop=/bin/sh -c "/bin/kill -s QUIT $(/bin/cat /run/nginx.pid)"
TimeoutStartSec=10
LimitNOFILE=65535 LimitNOFILE=65535
[Install] [Install]
+6 -5
View File
@@ -4,14 +4,15 @@ After=syslog.target network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target Wants=network-online.target
[Service] [Service]
Type=notify Type=forking
NotifyAccess=main
PIDFile=/run/nginx.pid PIDFile=/run/nginx.pid
Environment=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 Environment=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
ExecStartPre=/usr/bin/install -d -o nginx -g nginx -m 0755 /usr/local/nginx /usr/local/nginx/client_body_temp /usr/local/nginx/proxy_temp /usr/local/nginx/fastcgi_temp /usr/local/nginx/uwsgi_temp /usr/local/nginx/scgi_temp /var/log/nginx ExecStartPre=/usr/bin/install -d -o nginx -g nginx -m 0755 /run/nginx/temp /run/nginx/temp/client_body /run/nginx/temp/proxy /run/nginx/temp/fastcgi /run/nginx/temp/uwsgi /run/nginx/temp/scgi /var/log/nginx
ExecStartPre=/usr/sbin/nginx -t ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx ExecStart=/usr/sbin/nginx -c /nginx/nginx.conf
ExecReload=/usr/sbin/nginx -s reload ExecReload=/bin/sh -c "/bin/kill -s HUP $(/bin/cat /run/nginx.pid)"
ExecStop=/bin/sh -c "/bin/kill -s QUIT $(/bin/cat /run/nginx.pid)"
TimeoutStartSec=10
LimitNOFILE=65535 LimitNOFILE=65535
[Install] [Install]