lopuh@void:~/projects/weather-mon$

// flask app with docker & monitoring

$ stat project.info
Name: weather-mon
Type: web app with monitoring
Stack: Flask + Docker + Prometheus
Services: "4 containers"

$ ls -la media/

Weather App Preview
preview.png [weather app]
Grafana Dashboard
dashboard.png [grafana dashboard]

$ docker-compose up -d

# Quick Start
## 1. Run the Application
$ docker-compose up -d

## 2. Check Services
$ curl -I http://localhost:5000
$ curl http://localhost:5000/health

$ cat docker-compose.yml | head -20

# Service URLs
- Weather App: http://localhost:5000
- Prometheus: http://localhost:9090

# Default credentials:
Grafana: admin / admin
Prometheus: no authentication by default

$ docker-compose ps

# Container Status
$ docker-compose ps

# Check logs:
$ docker-compose logs --tail=10 weather-app

$ cat architecture.txt

// System Architecture
┌─────────────────────────────────────────┐
Weather App (Flask)
• Serves weather data API
• Exposes /metrics for Prometheus
• Containerized with Docker
├─────────────────────────────────────────┤
Prometheus
• Scrapes metrics every 15s
• Time-series database
├─────────────────────────────────────────┤
Grafana
• Visualizes Prometheus data
• Pre-configured dashboard
└─────────────────────────────────────────┘
Flask
Docker
Prometheus
Grafana
Monitoring
Containers
REST API
Metrics

$ docker-compose down && docker-compose up -d

# Management Commands
## Restart services:
$ docker-compose restart

## Rebuild and restart:
$ docker-compose down
$ docker-compose up -d --build

## View resource usage:
$ docker stats
CONTAINER CPU % MEM USAGE / LIMIT MEM %
weather-app 0.15% 45.2MiB / 1GiB 4.4%
prometheus 0.08% 85.1MiB / 1GiB 8.3%
grafana 0.12% 120.3MiB / 1GiB 11.7%