diff --git a/ops/forgejo/docker-compose.yml b/ops/forgejo/docker-compose.yml index d34ec78e..155b18b5 100644 --- a/ops/forgejo/docker-compose.yml +++ b/ops/forgejo/docker-compose.yml @@ -70,6 +70,18 @@ services: FORGEJO__security__INSTALL_LOCK: "true" volumes: - ./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: - "2222:22" networks: