Harden sondib: non-root setpriv wrapper supervisor, cap_drop ALL, read_only rootfs with tmpfs, cleaner merged into sondibd
This commit is contained in:
1 parent
58bdfcb829
commit
25baa8fc2b
2 files changed
+19
-35
No files matched your search
+14
-32
@@ -9,6 +9,20 @@ services:
|
||||
working_dir: /data
|
||||
volumes:
|
||||
- station-data:/data
|
||||
environment:
|
||||
SONDIB_RETENTION_SECONDS: ${SONDIB_RETENTION_SECONDS:-3600}
|
||||
SONDIB_CLEAN_INTERVAL_SECONDS: ${SONDIB_CLEAN_INTERVAL_SECONDS:-30}
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- CHOWN
|
||||
- SETGID
|
||||
- SETUID
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp:noexec,nosuid,size=64m
|
||||
cpus: 2.0
|
||||
mem_limit: 2g
|
||||
pids_limit: 64
|
||||
@@ -24,37 +38,5 @@ services:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
cleaner:
|
||||
image: sondib:latest
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
entrypoint: ["/app/bin/sdclean"]
|
||||
command: ["/data"]
|
||||
|
||||
working_dir: /data
|
||||
pid: service:sondibd
|
||||
depends_on:
|
||||
sondibd:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- station-data:/data
|
||||
environment:
|
||||
SONDIB_RETENTION_SECONDS: ${SONDIB_RETENTION_SECONDS:-3600}
|
||||
SONDIB_CLEAN_INTERVAL_SECONDS: ${SONDIB_CLEAN_INTERVAL_SECONDS:-30}
|
||||
cpus: 2.0
|
||||
mem_limit: 2g
|
||||
pids_limit: 32
|
||||
healthcheck:
|
||||
test: ["CMD", "/app/bin/sdclean", "/data", "check"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
volumes:
|
||||
station-data:
|
||||
Reference in new issue
Block a user