How barath-selvaraj/maintainance_mc works
This is an on-premise management service for discovering Docker containers, deploying and removing named feature applications, routing them through Nginx, and monitoring container restarts with email alerts. The principal workflow is an HTTP request handled by FastAPI, delegated to deployment logic, which manages feature source and Docker containers and refreshes Nginx routing. Monitoring runs separately from request handling. The tree includes Nginx configuration and deployment files, but their runtime wiring is not established by the excerpts, so those are omitted.
Main entry points: main.py HTTP API · deployment.py Deployment Service · monitoring.py Monitoring Service · docker_manager.py Container Listing
Components 13
Management API
- HTTP API
app/main.py - Feature Selection
app/schemas/deployment.py - Container Listing
app/docker_manager.py
Feature Deployment
- Deployment Service
app/deployment.py - Feature Sources
app/deployment.py - Feature Workspace
workspace - Nginx Routing
app/nginx_service.py
Container Monitoring
- Monitoring Service
app/monitoring.py - Email Alerts
app/email.py
Other components
- Operator
- Docker Engine
- Feature Containers
- SMTP Server
Connections 16
- Operator → HTTP API: requests
app/main.py - HTTP API → Feature Selection: accepts
app/main.py - HTTP API → Deployment Service: delegates
app/main.py - HTTP API → Container Listing: lists containers
app/main.py - HTTP API → Monitoring Service: reads status
app/main.py - HTTP API → Monitoring Service: starts at launch
app/main.py - Deployment Service → Feature Sources: selects source
app/deployment.py - Deployment Service → Feature Workspace: clones or pulls
app/deployment.py - Deployment Service → Docker Engine: builds and manages
app/deployment.py - Docker Engine → Feature Containers: runs containers
- Deployment Service → Nginx Routing: refreshes routes
app/deployment.py - Nginx Routing → Docker Engine: discovers and reloads
app/nginx_service.py - Container Listing → Docker Engine: lists containers
app/docker_manager.py - Monitoring Service → Docker Engine: checks containers
app/monitoring.py - Monitoring Service → Email Alerts: sends restart alert
app/monitoring.py - Email Alerts → SMTP Server: sends message
app/email.py