A self-hosted server monitoring platform. Three target servers (Alpha, Beta, Gamma) are continuously checked for availability — login to the dashboard to watch their status in real time.
| Layer | Technology |
|---|---|
| Frontend | PHP 8.2 + Nginx |
| Backend | Node.js |
| Database | MySQL 8.0 |
| Cache | Redis 7 |
| Orchestration | Docker Swarm |
| CI/CD | GitLab CI |
| Monitoring | Prometheus + Grafana + Node Exporter + cAdvisor |
| Service | Description |
|---|---|
frontend-web |
Nginx — serves PHP files and proxies /api/ to backend |
frontend-php |
PHP-FPM — renders dashboard and login page |
backend |
Node.js REST API — auth, server management, status |
worker |
Node.js — pings target servers every 15 seconds |
mysql |
Stores users, servers, check history |
redis |
Caches latest server statuses |
target-alpha/beta/gamma |
Nginx containers acting as monitored servers |
prometheus |
Scrapes metrics from backend, node-exporter, cAdvisor |
grafana |
Visualizes infrastructure metrics |
node-exporter |
Sends host metrics |
cadvisor |
Sends info about containers |
- (You can setup new server using ansible playbook)
- Docker with Swarm mode enabled
- GitLab Runner with
devopstag registered on your server
docker network create --driver overlay --attachable app-networkmkdir -p secrets
echo "your_db_password" > secrets/db_password.txt
echo "your_db_user" > secrets/db_user.txt
echo "your_db_name" > secrets/db_name.txt
echo "your_jwt_secret" > secrets/jwt_secret.txt
echo "your_gf_password" > secrets/gf_password.txtdocker stack deploy -c docker-stack.yml uptime-stack
docker stack deploy -c monitoring-stack.yml monitoring| Service | URL |
|---|---|
| Dashboard | http://your-ip |
| Grafana | http://your-ip:3000 |
| Prometheus | http://your-ip:9090 |
Push to main → GitLab CI automatically:
- Builds
backendandfrontendimages - Pushes them to GitLab Container Registry
- Deploys updated stack via Docker Swarm (CI/CD doesnt deploy nor build monitoring stack)
username: zweihaka
password: password
Change the password hash in
db/init.sqlbefore deploying to production.