{"id":23160936,"url":"https://github.com/Marrrco7/Scalable-Linux-Environment-for-Hosting-Web-Applications","last_synced_at":"2025-10-25T01:31:08.676Z","repository":{"id":261962975,"uuid":"885843265","full_name":"Marrrco7/Scalable-Linux-Environment-for-Hosting-Web-Applications","owner":"Marrrco7","description":"From Development to Deployment: End-to-End Web Application and a DevOps demonstration","archived":false,"fork":false,"pushed_at":"2025-05-23T07:14:05.000Z","size":15930,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-15T14:55:55.147Z","etag":null,"topics":["automated-backups","ci","gitflow-workflow","gunicorn","linux","netdata","networking","nginx","security","trunk-based-development","ubuntu","ufw","virtual-machine"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Marrrco7.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-09T14:43:30.000Z","updated_at":"2025-05-23T07:14:09.000Z","dependencies_parsed_at":"2024-11-10T12:35:33.977Z","dependency_job_id":"7e542aef-dfe8-4a49-bfee-5b34792e4305","html_url":"https://github.com/Marrrco7/Scalable-Linux-Environment-for-Hosting-Web-Applications","commit_stats":null,"previous_names":["marrrco7/django-web-application-with-crud-oeprations","marrrco7/django-web-application-with-crud-operations","marrrco7/end-to-end-game-library-solution-development-deployment-and-devops","marrrco7/scalable-linux-environment-for-hosting-web-applications"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Marrrco7/Scalable-Linux-Environment-for-Hosting-Web-Applications","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marrrco7%2FScalable-Linux-Environment-for-Hosting-Web-Applications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marrrco7%2FScalable-Linux-Environment-for-Hosting-Web-Applications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marrrco7%2FScalable-Linux-Environment-for-Hosting-Web-Applications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marrrco7%2FScalable-Linux-Environment-for-Hosting-Web-Applications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marrrco7","download_url":"https://codeload.github.com/Marrrco7/Scalable-Linux-Environment-for-Hosting-Web-Applications/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marrrco7%2FScalable-Linux-Environment-for-Hosting-Web-Applications/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280893655,"owners_count":26409279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated-backups","ci","gitflow-workflow","gunicorn","linux","netdata","networking","nginx","security","trunk-based-development","ubuntu","ufw","virtual-machine"],"created_at":"2024-12-17T23:12:48.439Z","updated_at":"2025-10-25T01:31:08.670Z","avatar_url":"https://github.com/Marrrco7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Overview\n--------\n\nAn end-to-end DevOps solution designed to deploy a Django web application securely and efficiently, integrating technologies such as Django with (for a web app with authentication and permissions), see [Django Web Appliation](DJANGO-WEBAPP.md), [PostgreSQL database management and advanced administration](Production_ready_database.md), Nginx as a reverse proxy web server, Gunicorn application server, UFW firewall for network security, Ubuntu LTS on a Linux virtual machine for isolated deployment, Logical Volume Management (LVM) for scalable storage, automated backups for disaster recovery, Netdata for real-time monitoring, and a customized and automated CI workflow built with GitHub Actions, see [GitHub Workflow](Git_Strategies.md) for a detailed explanation of the workflow supporting GitFlow and trunk-based strategies. \n\n\n## For the full documentation and implementation Guide see [Linux Environment Documentation PDF](Linux.pdf)\n\nTable of Contents\n-----------------\n- [Project Structure](#project-structure)\n- [Features](#features)\n- [Analysis and Design](#analysis-and-design)\n- [System Architecture](#system-architecture)\n- [How The Components Work Together](#security)\n- [Reason of the Chosen Architecture](#testing)\n\n\n## Project Structure\n-----------------\n\n\n## Features\n--------\n\n- **Django Web App**: CRUD operations, secure login and logout for staff members, user permissions for certain accesses and intuitive UI.\n- **Customized GitHub Actions Workflow**: A reusable workflow that gets triggered for both Gitflow and TrunkBased development methodologies.\n- **Security and best practices**: CSRF protection, use of environmental variables for database credentials, LVM-based volume isolation, regular automated backups and UFW for allowing only necessary traffic.\n- **Monitoring and Maintenance**: Netdata installed for real time monitoring.\n\n## Analysis and Design\n-------------------\n\n### System Architecture\n\n![img.png](img.png)\n\nComponents\n----------\n\n### 1. Virtual Machine\n\n- **Purpose**:\nThe virtual machine is the base of the infrastructure. It provides an isolated and secure\nenvironment to host the web application, database and the other supporting tools. It\nensures efficiency in the resource management, scalability, and reliability for the production\nenvironment.\n\n- **Role in the architecture**:\nIt is in charge of providing the Linux environment, Ubuntu LTS, to run all the components\nsafely and efficiently. It ensures that the system is independent of other environments, so\nexternal interference is minimized. It allocates the CPU, memory and disk resources to\nprovide consistent performance for the rest of the components, and also gives easiness to a\nfuture migration to a cloud platform without significant amounts of reconfiguration.\n\n### 2. Nginx Web Server\n\n- **Purpose**:  \n  Lightweight, high-performance web server and reverse proxy responsible for handling incoming HTTP/HTTPS requests and routing them to the Django application.\n\n- **Role in the architecture**:  \n  Acts as a reverse proxy, forwarding client requests to the Django application, serving static files, and securing connections by enabling TLS encryption, protecting user requests against interception or modification by encrypting the traffic.\n\n### 3. Django Web Application\n\n- **Purpose**:  \n  The Django web application is the core of the project, responsible for providing CRUD management functionalities for the videogames catalog.\n\n- **Role in the architecture**:  \n  Handles user interactions as well as business logic, and communicates with the PostgreSQ database to retrieve the stored data, it runs on a dedicated django_volume for isolation and  better storage management.\n\n### 4. PostgreSQL Database\n\n- **Purpose**:  \n  Stores all the videogame data managed by the web application.\n\n- **Role in the architecture**:  \n  Manages and stores videogame data such as titles, genres, release dates, and descriptions. It utilizes a dedicated logical volume volume to separate data storage from other system files, improving security and performance.\n\n### 5. Automated Backups\n\n- **Purpose**:  \n  Automated backups are meant to ensure data integrity and recovery in case of disasters\n\n- **Role in the architecture**:  \n  Automatically performs regular backups of the PostgreSQL database and critical application files, storing these backups in a dedicated logical volume to minimize downtime in case of data loss.\n\n### 6. Monitoring (Netdata)\n\n- **Purpose**:  \n  Tracks system performance metrics such as memory usage, CPU load, and disk space.\n\n- **Role in the architecture**:  \n  Detects potential issues like high resource usage early and alerts administrators, enabling proactive management to ensure ongoing system stability.\n\n### 7. UFW Firewall\n\n- **Purpose**:  \n  The Uncomplicated Firewall Network is used to secure the virtual machine by controlling the incoming and outgoing network traffic.\n\n\n- **Role in the architecture**:  \n  Ensures only essential network ports SSH, HTTP are accessible, preventing unauthorized access and protecting the application from external threats.\n\n### 8. Logical Volume Management (LVM)\n\n- **Purpose**:  \n  Provides flexibility and scalability for disk storage management, allowing for controlled data growth.\n\n- **Role in the architecture**:  \n  Allocates dedicated logical volumes for organized storage of the web application, PostgreSQL database, and automated backups. It allows resizing storage dynamically without service disruption, ensuring scalability and continuous operation.\n\n\n## How the Components Work Together\n-----------------------------------\nIncoming Requests enter the system by the UFW, which is mean to ensure that only\nlegitimate traffic is allowed, by restricting access to only specific ports for HTTP and HTTPS.\nOnce validated, Nginx is in charge of processing this requests, and forwarding to the web\napplication.\nThe Django web application handles the user interaction and requests so that when data is\nrequired, it interacts with the PostgreSQL database. The database is isolated in its own\npg_volume, ensuring efficiency in the performance and better security. Automated backups\nare scheduled at a certain time of the day to provide recoveries. Backups include all the\ndatabase files from the pg_volume. These backups are stored in another dedicated\nbackup_volume, for an easy recovery in case of system failures.\nRegarding the monitoring, the system monitoring tools have alerts configured to detect\npotential issues to encourage their fast resolution.\nIn terms of scalability, the LVM makes the architecture designed for future growth. Either if\nuser demands or data volume increases, the storage volumes can be resized dynamically\nwithout disrupting the system.\n\n\n## Reason of The Chosen Architecture\n--------------------------------------\nThis architecture establishes security by controlling invalid access and filter the malicious\nrequests. It has great level of reliability, since the components are isolated and the possibility\nof having issues does not mean having them everywhere but only in their own isolated\nenvironment. The automated backups protect the system from disasters. Moreover, the\narchitecture provides scalability, performance metrics and management easiness where\nmanual effort for backups is reduced and logical volumes also simplify the disk management.\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarrrco7%2FScalable-Linux-Environment-for-Hosting-Web-Applications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMarrrco7%2FScalable-Linux-Environment-for-Hosting-Web-Applications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarrrco7%2FScalable-Linux-Environment-for-Hosting-Web-Applications/lists"}