feat(docker): enhance entrypoint script with gosu for privilege handling and improve healthcheck command

This commit is contained in:
Daniel Volz
2025-12-27 12:48:19 +01:00
parent bedf90d316
commit f7bad32d68
3 changed files with 38 additions and 4 deletions
+2 -2
View File
@@ -20,13 +20,13 @@ services:
# Security options
security_opt:
- no-new-privileges:true
read_only: true
# Note: read_only removed - entrypoint needs to fix permissions at startup
tmpfs:
- /tmp:noexec,nosuid,size=64m
cap_drop:
- ALL
healthcheck:
test: ["CMD", "/nodejs/bin/node", "-e", "fetch('http://localhost:3000/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"]
test: ["CMD", "node", "-e", "fetch('http://localhost:3000/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3