A practical DevOps lab showing how to package, test, run, monitor, and validate a small Python service.
- Dockerized FastAPI service with health, readiness, and Prometheus-style metrics endpoints
- Docker Compose stack with API, Prometheus, and Grafana
- GitHub Actions CI for tests and Docker image build
- Makefile commands for local development, tests, Compose, and smoke checks
- Request timing middleware and simple operational metrics
- Clear startup and verification workflow
flowchart LR
Dev["Developer"] --> CI["GitHub Actions"]
CI --> Tests["Pytest"]
CI --> Build["Docker Build"]
User["Operator"] --> API["FastAPI Service"]
Prom["Prometheus"] --> API
Grafana["Grafana"] --> Prom
python3 -m venv .venv
source .venv/bin/activate
make install
make test
make devdocker compose up --buildServices:
- API:
http://localhost:8000 - Prometheus:
http://localhost:9090 - Grafana:
http://localhost:3000usingadmin/admin
curl http://localhost:8000/health
curl http://localhost:8000/ready
curl http://localhost:8000/metrics
make smokeJunior DevOps roles often require supporting services across CI/CD, containers, monitoring, logs, health checks, and operational validation. This project demonstrates those fundamentals in a small, understandable lab.