Major improvements: multi-stage Docker, security hardening, host metrics, tests
- Multi-stage Docker build: Dockerfile compiles frontend (Node.js) and backend (Gradle) inside Docker; no local Java/Node.js required - Security hardening: replaced full host root mount with specific directory mounts (/proc, /sys, /etc, /var, /home, /opt, /tmp, /srv, /usr) - Host metrics consistency: LinuxMemoryService and CpuDetailsService now read from /host/proc instead of container OSHI - Concurrency: replaced synchronized with AtomicReference in 3 services - Global error handling: added @RestControllerAdvice for JSON error responses - Unit tests: added 32 tests for /proc parsers, CPU usage, process uptime - Docker security: non-root user, read-only FS, no-new-privileges, healthcheck - Debug logging: added log.debug() in silent catch blocks - Documentation: updated README, INSTALLATION, DEVELOPMENT, CONFIGURATION, ARCHITECTURE, CHANGELOG Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -66,7 +66,11 @@ tasks.register('buildFrontend', Exec) {
|
||||
}
|
||||
}
|
||||
|
||||
// Skip frontend build tasks when building inside Docker (frontend already built in Stage 1)
|
||||
def skipFrontend = project.hasProperty('skipFrontend') || System.getenv('SKIP_FRONTEND') != null
|
||||
|
||||
tasks.register('copyFrontend', Copy) {
|
||||
onlyIf { !skipFrontend }
|
||||
dependsOn 'buildFrontend'
|
||||
outputs.upToDateWhen { false }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user