How devopsinsiders/pytodobackendmonolith works
Project type and purpose
• This is a single‐service backend application written in Python using FastAPI.
• It exposes REST endpoints for CRUD operations on “tasks,” and uses PyODBC to connect to a Microsoft SQL Server database.
• It is intended to run inside a Docker container (Dockerfile provided) and deploy on an Azure VM (Ubuntu 20.04).
File structure
• Top‐level files:
• app.py – the entire FastAPI application (routes, business logic, DB calls)
• requirements.txt – Python dependencies (FastAPI, Uvicorn, pyodbc, etc.)
• Dockerfile – container recipe (installs OS packages, ODBC drivers, Python, then app)
• Readme.md – setup guide for Azure VM, ODBC installation, and how to run Uvicorn
• No separate “frontend” folder or multiple microservices—this is a monolith that combines API and data‐access logic.
README for additional insights
• The app exposes endpoints under /api/tasks (GET, POST, PUT, DELETE).
• The app uses system‐level dependencies: unixODBC, msodbcsql17.
• Deployment steps involve apt-get, ODBC key install, pip install, and uvicorn app:app ….
• Target runtime: Azure VM (Ubuntu 20.04 LTS) but encapsulated via Docker.
Detail without overthinking
• Every runtime component (OS packages, ODBC driver) if relevant to ops teams.
• Separate the container’s internal layers (ASGI server vs. app code vs. driver) for clarity.