- 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>
37 lines
822 B
YAML
37 lines
822 B
YAML
|
|
services:
|
|
htop-web:
|
|
image: htop-web:latest
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: htop-web
|
|
restart: unless-stopped
|
|
# ports:
|
|
# - "8088:8000"
|
|
pid: host
|
|
read_only: true
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
tmpfs:
|
|
- /tmp:noexec,nosuid,size=64m
|
|
volumes:
|
|
- /proc:/host/proc:ro
|
|
- /sys:/host/sys:ro
|
|
- /etc/hostname:/host/etc/hostname:ro
|
|
- /etc/os-release:/host/etc/os-release:ro
|
|
- /var:/host/var:ro
|
|
- /home:/host/home:ro
|
|
- /opt:/host/opt:ro
|
|
- /tmp:/host/tmp:ro
|
|
- /srv:/host/srv:ro
|
|
- /usr:/host/usr:ro
|
|
labels:
|
|
caddy: htop-web.jambotron.com
|
|
caddy.reverse_proxy: "{{upstreams 8080}}"
|
|
networks:
|
|
- jambotron-net
|
|
|
|
networks:
|
|
jambotron-net:
|
|
external: true |