fix #9: stats doesn't need a separate server
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (amd64) (push) Successful in 20s
Container Publish / build-image (arm64) (push) Successful in 19s
Container Publish / update docker manifest (push) Successful in 9s

This commit is contained in:
2025-07-31 16:16:02 +02:00
parent 9a838df27c
commit dfdea84bf7
3 changed files with 3 additions and 22 deletions

View File

@@ -9,7 +9,6 @@ PATH_AUTH=${PATH_BASE}/auth
PATH_SSH_HOST=${PATH_BASE}/ssh
WEBDAV_PORT=${WEBDAV_PORT:-8080}
STATS_PORT=${STATS_PORT:-8081}
LOG_DAYS=${LOG_DAYS:-7}
PHP=${PHP:-none}
@@ -38,7 +37,6 @@ export PATH_LOGS
export PATH_AUTH
export PATH_SSH_HOST
export WEBDAV_PORT
export STATS_PORT
export POSTSIZE
export LOG_DAYS
export PHP

View File

@@ -12,26 +12,11 @@ touch "${PATH_AUTH}/stats"
chown -R "${USERNAME}:${GROUPNAME}" "${PATH_AUTH}" "${PATH_STATS}" "${PATH_STATSDB}"
# stats endpoint
cat > /etc/nginx/http.d/stats.conf <<EOF
server {
listen ${STATS_PORT} default_server;
listen [::]:${STATS_PORT} default_server;
cat > /etc/nginx/local.d/stats.conf <<EOF
location ^~ /stats {
root ${PATH_STATS};
location = / {
index index.html;
try_files /index.html =404;
}
location /index.html {
try_files /index.html =404;
}
location / {
return 404;
}
auth_basic "Restricted area";
auth_basic_user_file ${PATH_AUTH}/stats;
try_files /index.html =404;
}
EOF