A minimalist, containerized microservices architecture built to practice DevOps, DevSecOps, and basic MLOps principles.
This project is orchestrated via docker-compose.yml and consists of two internal services:
- Go API Gateway (
go-api): A lightweight REST API built with Go that acts as the single entry point, validating and routing external requests. - Python ML Engine (
python-engine): An isolated backend service running a machine learning inference script (infer.py). It does not expose ports to the public internet.
This repository emphasizes infrastructure, automation, and security over complex algorithmic implementation:
- Optimized Containerization: Uses multi-stage Dockerfiles for both services. The Go API is packaged in a minimal environment, and the Python ML Engine is configured to run as a secure, non-root user.
- DevSecOps CI/CD: Automated through GitHub Actions (
.github/workflows/main.yml). The pipeline builds the images and integrates Aqua Trivy for automated vulnerability scanning prior to deployment.
1. Build and start the services:
docker compose up -d --build- Verify health status:
curl http://localhost:8080/health- Send an inference request:
curl -X POST http://localhost:8080/predict \
-H "Content-Type: application/json" \
-d '{"features": [0.5, 0.4, 0.6, 0.5, 0.5, 0.5]}'