From 6db107f0fc6735ac1ec8715e579aebe895b5a3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Fri, 18 Sep 2026 11:20:21 -0300 Subject: [PATCH] fix: use Compose deploy resource limits --- docker-compose.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2ce84c6..1e3d2b2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,18 +32,19 @@ x-app: &app cap_drop: [ALL] read_only: true tmpfs: [/tmp] - pids_limit: 128 logging: driver: json-file options: {max-size: "10m", max-file: "3"} + deploy: + resources: + limits: + pids: 128 services: scanner: image: clamav/clamav@sha256:9cb27d7660bdf66e9878c832cb433dd8aa152cfbe16f3c2c0084c80b04ae22b4 entrypoint: [clamd, --foreground=true, --config-file=/etc/clamav/clamd.conf] volumes: [./local/clamd.conf:/etc/clamav/clamd.conf:ro] networks: [local] - mem_limit: 3g - pids_limit: 128 security_opt: [no-new-privileges:true] healthcheck: test: [CMD, clamdscan, --config-file=/etc/clamav/clamd.conf, --ping, "3"] @@ -51,6 +52,11 @@ services: interval: 10s timeout: 5s retries: 30 + deploy: + resources: + limits: + memory: 3G + pids: 128 db-init: build: context: .