Files
harbor-ci-cd-demo/docker-compose.yml
stephenminakian a2cff31126
Some checks failed
CI/CD Pipeline - Build, Test, and Deploy / 🔒 Security Scan (push) Successful in 9m29s
CI/CD Pipeline - Build, Test, and Deploy / 🧹 Cleanup (push) Successful in 1s
CI/CD Pipeline - Build, Test, and Deploy / 🧪 Test & Lint (push) Successful in 9m33s
CI/CD Pipeline - Build, Test, and Deploy / 🏗️ Build & Push Image (push) Successful in 29s
CI/CD Pipeline - Build, Test, and Deploy / 🛡️ Image Security Scan (push) Failing after 18s
Remove SBOM and Security scan, update docker-compose
2025-07-03 11:04:46 -06:00

49 lines
1.3 KiB
YAML

services:
monitoring-dashboard:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
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
timeout: 10s
retries: 3
start_period: 40s
networks:
- monitoring
# Optional: Add a reverse proxy for local development
nginx:
image: nginx:alpine
ports:
- "8080:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- monitoring-dashboard
networks:
- monitoring
profiles:
- with-proxy
networks:
monitoring:
driver: bridge