feat(logging): add logging limit configuration to prevent disk from filling up
This commit is contained in:
10
.env.sample
10
.env.sample
@@ -52,3 +52,13 @@ BACKUP_CRON="0 2 * * *"
|
||||
|
||||
# Number of days to keep old backups
|
||||
BACKUP_RETENTION_DAYS=7
|
||||
|
||||
|
||||
# ==========================================
|
||||
# Docker Logging Configuration
|
||||
# ==========================================
|
||||
# Maximum size of a single log file (e.g., 10m, 100m, 1g)
|
||||
LOG_MAX_SIZE=10m
|
||||
|
||||
# Maximum number of log files to keep per container
|
||||
LOG_MAX_FILE=3
|
||||
|
||||
@@ -23,9 +23,8 @@ services:
|
||||
- ${SSL_KEY_PATH}:/data/ssl/server.key:ro
|
||||
volumes:
|
||||
- ./data:/data
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "${LOG_MAX_SIZE}"
|
||||
max-file: "${LOG_MAX_FILE}"
|
||||
|
||||
Reference in New Issue
Block a user