fix: use Compose deploy resource limits
This commit is contained in:
@@ -32,18 +32,19 @@ x-app: &app
|
|||||||
cap_drop: [ALL]
|
cap_drop: [ALL]
|
||||||
read_only: true
|
read_only: true
|
||||||
tmpfs: [/tmp]
|
tmpfs: [/tmp]
|
||||||
pids_limit: 128
|
|
||||||
logging:
|
logging:
|
||||||
driver: json-file
|
driver: json-file
|
||||||
options: {max-size: "10m", max-file: "3"}
|
options: {max-size: "10m", max-file: "3"}
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
pids: 128
|
||||||
services:
|
services:
|
||||||
scanner:
|
scanner:
|
||||||
image: clamav/clamav@sha256:9cb27d7660bdf66e9878c832cb433dd8aa152cfbe16f3c2c0084c80b04ae22b4
|
image: clamav/clamav@sha256:9cb27d7660bdf66e9878c832cb433dd8aa152cfbe16f3c2c0084c80b04ae22b4
|
||||||
entrypoint: [clamd, --foreground=true, --config-file=/etc/clamav/clamd.conf]
|
entrypoint: [clamd, --foreground=true, --config-file=/etc/clamav/clamd.conf]
|
||||||
volumes: [./local/clamd.conf:/etc/clamav/clamd.conf:ro]
|
volumes: [./local/clamd.conf:/etc/clamav/clamd.conf:ro]
|
||||||
networks: [local]
|
networks: [local]
|
||||||
mem_limit: 3g
|
|
||||||
pids_limit: 128
|
|
||||||
security_opt: [no-new-privileges:true]
|
security_opt: [no-new-privileges:true]
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [CMD, clamdscan, --config-file=/etc/clamav/clamd.conf, --ping, "3"]
|
test: [CMD, clamdscan, --config-file=/etc/clamav/clamd.conf, --ping, "3"]
|
||||||
@@ -51,6 +52,11 @@ services:
|
|||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 30
|
retries: 30
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 3G
|
||||||
|
pids: 128
|
||||||
db-init:
|
db-init:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
|||||||
Reference in New Issue
Block a user