chore(forgejo): ограничить размер json-лога контейнера #3587
1 changed files with 12 additions and 0 deletions
|
|
@ -70,6 +70,18 @@ services:
|
||||||
FORGEJO__security__INSTALL_LOCK: "true"
|
FORGEJO__security__INSTALL_LOCK: "true"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/forgejo:/data
|
- ./data/forgejo:/data
|
||||||
|
# Container log cap. Measured 2026-09-17: this container's json log had
|
||||||
|
# grown to 3.35 GiB in 23 days (~150 MB/day) with no rotation at all,
|
||||||
|
# the single largest log on the host by two orders of magnitude. Docker's
|
||||||
|
# json-file driver never rotates unless told to, and there is no
|
||||||
|
# /etc/docker/daemon.json on this VM to set a global default. 50m x 3
|
||||||
|
# caps this container at 150 MB; recreating it also drops the old
|
||||||
|
# unbounded file.
|
||||||
|
logging:
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "50m"
|
||||||
|
max-file: "3"
|
||||||
ports:
|
ports:
|
||||||
- "2222:22"
|
- "2222:22"
|
||||||
networks:
|
networks:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue