diff --git a/docker-compose.yml b/docker-compose.yml index 462f9a7..49e5ebe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.8' - services: monitoring-dashboard: build: @@ -10,11 +8,19 @@ services: environment: - NODE_ENV=development - PORT=3000 + - MONITOR_HOST=true # Flag to enable host monitoring volumes: - ./src:/app/src:ro - ./package.json:/app/package.json:ro - ./package-lock.json:/app/package-lock.json:ro + # Mount host system information (read-only) + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/host/root:ro,rslave restart: unless-stopped + # Grant access to host system information + privileged: false + pid: "host" # Share host PID namespace to see host processes healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"] interval: 30s