diff --git a/Dockerfile b/Dockerfile index 33b593d..8144ee7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:3.21 RUN \ apk --no-cache upgrade && \ - apk --no-cache add tini nginx curl logrotate openssh-server nginx-mod-http-dav-ext \ + apk --no-cache add tini nginx curl logrotate openssh-server nginx-mod-http-dav-ext goaccess \ php84 php84-fpm php84-mbstring php84-curl php84-ctype php84-dom php84-gd php84-json php84-openssl php84-session php84-simplexml php84-xml php84-zip \ php84-apcu php84-opcache php84-pecl-yaml php84-sqlite3 php84-mysqli \ php83 php83-fpm php83-mbstring php83-curl php83-ctype php83-dom php83-gd php83-json php83-openssl php83-session php83-simplexml php83-xml php83-zip \ diff --git a/README.md b/README.md index 6b913dd..17e04ec 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,10 @@ services: web: image: docker.asperti.com/paspo/webserver-nginx ports: - - 8888:80 - - 2222:22 + - 8888:80 # web server + - 8889:8081 # stats page + - 8890:8080 # webdav access + - 2222:22 # sftp access volumes: - ./data:/data - ./ssh:/ssh # add authorized_keys file here @@ -21,6 +23,7 @@ services: environment: LOG_DAYS: 14 # default 7 WEBDAV_PORT: 8080 # default: 8080 + STATS_PORT: 8081 # default: 8081 PHP: php84 # none (default), php82, php83, php84 POSTSIZE: 256M # default: 256M PUID: 1000 # default: 1000 diff --git a/rootfs/app/entrypoint.sh b/rootfs/app/entrypoint.sh index 9a43027..6ae3610 100755 --- a/rootfs/app/entrypoint.sh +++ b/rootfs/app/entrypoint.sh @@ -2,6 +2,7 @@ WEBROOT=/data/www WEBDAV_PORT=${WEBDAV_PORT:-8080} +STATS_PORT=${STATS_PORT:-8081} PHP=${PHP:-none} POSTSIZE=${POSTSIZE:-256M} USERNAME=${USERNAME:-theuser} @@ -125,8 +126,8 @@ EOF touch /app/htpasswd # make sure nginx can log -mkdir -p /data/logs -chown -R "${USERNAME}" /data/logs +mkdir -p /data/logs /data/stats /data/stats.db +chown -R "${USERNAME}:${GROUPNAME}" /data/logs /data/stats /data/stats.db # configure logrotate LOG_DAYS=${LOG_DAYS:-7} @@ -141,11 +142,37 @@ cat >/etc/logrotate.d/nginx < /etc/nginx/http.d/stats.conf <