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
|
# Number of days to keep old backups
|
||||||
BACKUP_RETENTION_DAYS=7
|
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
|
- ${SSL_KEY_PATH}:/data/ssl/server.key:ro
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
|
logging:
|
||||||
logging:
|
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
options:
|
options:
|
||||||
max-size: "10m"
|
max-size: "${LOG_MAX_SIZE}"
|
||||||
max-file: "3"
|
max-file: "${LOG_MAX_FILE}"
|
||||||
|
|||||||
Reference in New Issue
Block a user