fix #9: stats doesn't need a separate server
All checks were successful
All checks were successful
This commit is contained in:
@@ -12,7 +12,6 @@ services:
|
|||||||
image: docker.asperti.com/paspo/webserver-nginx
|
image: docker.asperti.com/paspo/webserver-nginx
|
||||||
ports:
|
ports:
|
||||||
- 8888:80 # web server
|
- 8888:80 # web server
|
||||||
- 8889:8081 # stats page
|
|
||||||
- 8890:8080 # webdav access
|
- 8890:8080 # webdav access
|
||||||
- 2222:22 # sftp access
|
- 2222:22 # sftp access
|
||||||
volumes:
|
volumes:
|
||||||
@@ -21,7 +20,6 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
LOG_DAYS: 14 # default 7
|
LOG_DAYS: 14 # default 7
|
||||||
WEBDAV_PORT: 8080 # default: 8080
|
WEBDAV_PORT: 8080 # default: 8080
|
||||||
STATS_PORT: 8081 # default: 8081
|
|
||||||
PHP: php84 # none (default), php82, php83, php84
|
PHP: php84 # none (default), php82, php83, php84
|
||||||
POSTSIZE: 256M # default: 256M
|
POSTSIZE: 256M # default: 256M
|
||||||
PUID: 1000 # default: 1000
|
PUID: 1000 # default: 1000
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ PATH_AUTH=${PATH_BASE}/auth
|
|||||||
PATH_SSH_HOST=${PATH_BASE}/ssh
|
PATH_SSH_HOST=${PATH_BASE}/ssh
|
||||||
|
|
||||||
WEBDAV_PORT=${WEBDAV_PORT:-8080}
|
WEBDAV_PORT=${WEBDAV_PORT:-8080}
|
||||||
STATS_PORT=${STATS_PORT:-8081}
|
|
||||||
LOG_DAYS=${LOG_DAYS:-7}
|
LOG_DAYS=${LOG_DAYS:-7}
|
||||||
|
|
||||||
PHP=${PHP:-none}
|
PHP=${PHP:-none}
|
||||||
@@ -38,7 +37,6 @@ export PATH_LOGS
|
|||||||
export PATH_AUTH
|
export PATH_AUTH
|
||||||
export PATH_SSH_HOST
|
export PATH_SSH_HOST
|
||||||
export WEBDAV_PORT
|
export WEBDAV_PORT
|
||||||
export STATS_PORT
|
|
||||||
export POSTSIZE
|
export POSTSIZE
|
||||||
export LOG_DAYS
|
export LOG_DAYS
|
||||||
export PHP
|
export PHP
|
||||||
|
|||||||
@@ -12,26 +12,11 @@ touch "${PATH_AUTH}/stats"
|
|||||||
chown -R "${USERNAME}:${GROUPNAME}" "${PATH_AUTH}" "${PATH_STATS}" "${PATH_STATSDB}"
|
chown -R "${USERNAME}:${GROUPNAME}" "${PATH_AUTH}" "${PATH_STATS}" "${PATH_STATSDB}"
|
||||||
|
|
||||||
# stats endpoint
|
# stats endpoint
|
||||||
cat > /etc/nginx/http.d/stats.conf <<EOF
|
cat > /etc/nginx/local.d/stats.conf <<EOF
|
||||||
server {
|
location ^~ /stats {
|
||||||
listen ${STATS_PORT} default_server;
|
|
||||||
listen [::]:${STATS_PORT} default_server;
|
|
||||||
root ${PATH_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 "Restricted area";
|
||||||
auth_basic_user_file ${PATH_AUTH}/stats;
|
auth_basic_user_file ${PATH_AUTH}/stats;
|
||||||
|
try_files /index.html =404;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user