From a1b51599c6c70c307bf90bcdb40df2d846992eae Mon Sep 17 00:00:00 2001 From: BeauTroll <-> Date: Sat, 20 Dec 2025 21:03:48 +0100 Subject: [PATCH] feat: expose Apache logs to host for fail2ban integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Mount Apache logs directory to ./logs/apache - Configure JSON file logging driver with rotation - Set max log size to 10MB with 3 files retention - Enable fail2ban to monitor access logs directly - Prevents need for systemd service to export logs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- docker-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index b7b39a7..9dc2c80 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,13 @@ services: volumes: - ./data:/var/www/html - ./apache/nextcloud.conf:/etc/apache2/conf-enabled/nextcloud.conf:ro + - ./logs/apache:/var/log/apache2 + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + tag: "nextcloud" environment: # Database - MYSQL_HOST=db