feat: expose Apache logs to host for fail2ban integration

- 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 <noreply@anthropic.com>
This commit is contained in:
BeauTroll
2025-12-20 21:03:48 +01:00
parent 123f7b6a9c
commit a1b51599c6

View File

@@ -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