smart-attendance-tracker
by alladu sahasra
Dockershowdown Demonstration (DA3)
Introduction
This blog documents my Smart Attendance System project and its three Development Assignments (DA1, DA2, DA3). The project demonstrates a progression from a single-container Flask web app (DA1) to a multi-container microservices setup (DA2), and finally a DA3 demonstration-ready package for the DockerShowdown event. The write-up is written in a student voice — describing objectives, architecture, procedure with screenshots, modifications done to downloaded containers, outcomes, and references.
Objectives of Part1
Build and dockerize a Flask web app that manages attendance records.
Package the web app into a single container for easy deployment.
Demonstrate basic volume persistence and health check endpoints.
Objectives of Part2
Split functionality into microservices (attendance, user/auth, email notification).
Orchestrate the services using docker-compose (multi-container setup).
Show inter-service communication and scaling possibilities.
Objectives of Part3
Prepare a demo-ready setup for the Dockershowdown event.
Provide documentation, CI/Deployment scripts, and a reproducible demo.
Optimize images and provide Docker Hub / GitHub links for evaluation.
Name of the containers involved and the download links
Flask app container: built from local Dockerfile. (Original base image likely python:3.9-slim.)
Email service container: services/email-service/Dockerfile
Name of the other software involved along with the purpose
Docker / Docker Compose — container runtime and orchestrator.
Python / Flask — application runtime and web framework.
Postgres / Mongo (if used) — persistent data storage
SMTP server or external email provider — used by the email service to send notifications.
Overall architecture of all three DAs
See Figures 1, 2 and 3 for diagrams describing DA1, DA2 and the overall system respectively.
Figure 1: DA1 block diagram.
Figure 2: DA2 block diagram.
Figure 3: Overall DA block diagram.
Architecture description
The system begins as a monolithic Flask web app in DA1, serving static pages and a REST API for attendance and user management. In this phase, the application and its data persistence are packaged together inside a single Docker container with volumes for data. The single-container approach simplifies deployment and is ideal for development and quick demos.
DA2 refactors the monolith into smaller microservices: an attendance service to record and query attendance, a user/auth service for user management, and an email service responsible for sending notifications. These services are composed via docker-compose and communicate over a private Docker network. The separation allows independent scaling and clearer separation of concerns, and it also makes it easier to swap out components (for example, replacing the email service with a third-party provider).
Procedure — Part1
Clone the repository and navigate to the project root.
Build the Docker image: docker build -t smart-attendance:da1 .
Run the container: docker run -p 5000:5000 --env-file .env -v attendance_data:/data smart-attendance:da1
Access the web UI at http://localhost:5000 and test endpoints /health and /attendance.
Figure 4: DA1 app home page screenshot
Procedure — Part2
From the project root run: docker-compose up --build to start all services defined in docker-compose.yml.
Inspect logs: docker-compose logs -f attendance-service and check inter-service communication.
Trigger an attendance event from the UI and confirm email notifications via the email service logs.
Figure 5: DA2
Procedure — Part3
Prepare optimized images for the Dockershowdown: multi-stage builds and minimized layers.
Push images to Docker Hub (or provide local tarball) and prepare demo script for the event.
Figure 6: DA3 demo screenshot
What modification is done in the containers after downloading - write step by step
I used downloaded base images and made the following modifications (step-by-step): 1. Pulled official Python base image and added project files into /app in the image.
2. Installed project-specific Python packages via requirements.txt and set up a non-root user for the container.
3. Added a health-check endpoint and Supervisor or gunicorn as the production WSGI server in the container command.
4. Configured environment variable handling via .env and included recommended environment checks in startup scripts.
5. Created a Docker volume mount to persist attendance data and adjusted file permissions to allow the container user to write to the volume.
Github link / DockerHub link of your modified containers
GitHub: https://github.com/alladusahasra/Smart-Attendance-System.git
Docker Hub: https://hub.docker.com/repositories/sahasraalladu
What are the outcomes of your DAs?
DA1: A working Flask web app packaged into a single Docker container.
DA2: Multi-container microservices demonstrating attendance, user management, and email notifications.
DA3: Demo-ready deployment artifacts and documentation for the Dockershowdown event.
Conclusion
This project demonstrates a clear evolution from monolithic development to microservice architecture using Docker and docker-compose. The system is modular, reproducible, and ready for demo and potential production hardening.
References and acknowledgement
Base Images
PostgreSQL – Postgres Docker Hub
NGINX – Nginx Docker Hub
Node.js – Node Docker Hub
Adminer – Adminer Docker Hub
Institution & Course
Vellore Institute of Technology (VIT) – School of Computer Science and Engineering (SCOPE).
Course: Cloud Computing
Special thanks to Dr. T Subbulakshmi maam for guidance and organizing the Docker Showdown event.
Tutorials & AI Assistance
IITB Docker Tutorial: https://spoken-tutorial.org/tutorial-search/?search_foss=Docker&search_language=
Google Gemini: Assisted with debugging, Docker optimization, and report structure.
The Benefits of Containerization: An academic-style paper from ResearchGate that discusses how Docker transforms the software development lifecycle, which is perfect for your conclusion.
Docker Compose Tutorial with PostgreSQL and Node.js: https://www.youtube.com/watch?v=A9bA5HpOk30
Alladu Sahasra
Comments
Post a Comment