{"id":23537444,"url":"https://github.com/thetoriqul/docker-in-memory-storage","last_synced_at":"2026-05-20T07:32:28.415Z","repository":{"id":264466710,"uuid":"891575001","full_name":"TheToriqul/docker-in-memory-storage","owner":"TheToriqul","description":"The project implements a microservice-based approach using Docker containers with tmpfs mounts for secure in-memory storage.","archived":false,"fork":false,"pushed_at":"2024-11-24T14:45:57.000Z","size":399,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T00:21:20.306Z","etag":null,"topics":["docker","docker-microservice"],"latest_commit_sha":null,"homepage":"https://thetoriqul.com","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/TheToriqul.png","metadata":{"files":{"readme":"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}},"created_at":"2024-11-20T15:20:04.000Z","updated_at":"2024-11-24T14:53:25.000Z","dependencies_parsed_at":"2024-11-24T18:00:57.336Z","dependency_job_id":null,"html_url":"https://github.com/TheToriqul/docker-in-memory-storage","commit_stats":null,"previous_names":["thetoriqul/docker-in-memory-storage"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheToriqul/docker-in-memory-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheToriqul%2Fdocker-in-memory-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheToriqul%2Fdocker-in-memory-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheToriqul%2Fdocker-in-memory-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheToriqul%2Fdocker-in-memory-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheToriqul","download_url":"https://codeload.github.com/TheToriqul/docker-in-memory-storage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheToriqul%2Fdocker-in-memory-storage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263184626,"owners_count":23427058,"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","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":["docker","docker-microservice"],"created_at":"2024-12-26T03:15:32.009Z","updated_at":"2026-05-20T07:32:23.362Z","avatar_url":"https://github.com/TheToriqul.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Docker In-Memory Storage Implementation\n\n[![GitHub](https://img.shields.io/badge/GitHub-Docker_In_Memory_Storage-blue?style=flat\u0026logo=github)](https://github.com/TheToriqul/docker-in-memory-storage)\n[![GitHub stars](https://img.shields.io/github/stars/TheToriqul/docker-in-memory-storage?style=social)](https://github.com/TheToriqul/docker-in-memory-storage/stargazers)\n![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge\u0026logo=docker\u0026logoColor=white)\n![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54)\n\n## 📋 Overview\n\nThis project demonstrates my implementation of secure in-memory storage using Docker containers with tmpfs mounts. Through this journey, I've explored handling sensitive configuration files, such as private keys and API credentials, ensuring they never touch the disk. The project showcases my understanding of container security best practices and memory-based filesystem management.\n\n## 🏗 Technical Architecture\n\nThe project implements a microservice-based approach using Docker containers with tmpfs mounts for secure in-memory storage. Here's the high-level architecture:\n\n```mermaid\nflowchart TD\n    subgraph External\n        Client([Client Request])\n        Auth[Authentication]\n        CDN[Content Delivery]\n    end\n\n    subgraph LoadBalancer\n        LB{Load Balancer}\n        SSL[SSL Termination]\n    end\n\n    subgraph Security Zone\n        subgraph Container\n            Docker[Docker Container]\n            Python[Python Service]\n            Storage[(tmpfs Storage)]\n            Process[Data Processing]\n            Cache[[Redis Cache]]\n            Queue[[Message Queue]]\n        end\n\n        subgraph Database\n            Primary[(Primary DB)]\n            Replica[(Replica DB)]\n        end\n\n        subgraph Monitoring\n            Log[/Logging Service/]\n            Metrics[/Metrics Collection/]\n            Alert{Alert Manager}\n        end\n    end\n\n    Client --\u003e|HTTPS Request| CDN\n    CDN --\u003e|Forward| LB\n    LB --\u003e|Route| SSL\n    SSL --\u003e|Decrypt| Auth\n    Auth --\u003e|Verify| Docker\n\n    Docker --\u003e|Route| Python\n    Python --\u003e|Temporary| Storage\n    Storage --\u003e|Process| Process\n    Process --\u003e|Response| Client\n\n    Python \u003c--\u003e|Cache Data| Cache\n    Python --\u003e|Queue Job| Queue\n    Queue --\u003e|Background| Process\n    Python --\u003e|Write| Primary\n    Primary --\u003e|Replicate| Replica\n    \n    Docker --\u003e|Container Logs| Log\n    Python --\u003e|App Logs| Log\n    Process --\u003e|Job Logs| Log\n    Log --\u003e|Alert Rules| Alert\n    Docker --\u003e|Health Data| Metrics\n    Python --\u003e|Performance| Metrics\n    Metrics --\u003e|Threshold| Alert\n    Alert --\u003e|Notify| LB\n```\n\n## 💻 Technical Stack\n\n- **Container Platform**: Docker\n- **Programming Language**: Python 3.9\n- **Base Image**: python:3.9-slim\n- **Storage**: tmpfs (memory-based filesystem)\n- **File System**: Alpine Linux\n\n## ⭐ Key Features\n\n1. Secure In-Memory Storage\n   - tmpfs mount implementation\n   - Memory-based file system configuration\n   - Secure data handling\n\n2. Docker Configuration\n   - Custom Dockerfile setup\n   - Container security measures\n   - Resource limitation controls\n\n3. Python Microservice\n   - Secure file operations\n   - Error handling\n   - Memory management\n\n4. Security Features\n   - No disk persistence\n   - Isolated storage space\n   - Access control implementation\n\n5. Performance Optimization\n   - Memory-only operations\n   - Efficient resource usage\n   - Quick data access\n\n## 📚 Learning Journey\n\n### Technical Mastery:\n\n1. Docker container configuration and security\n2. Memory-based filesystem implementation\n3. Microservice architecture design\n4. Secure data handling practices\n5. Resource management and optimization\n\n### Professional Development:\n\n1. Security-first thinking\n2. Documentation best practices\n3. Problem-solving with containerization\n4. System architecture design\n5. Performance optimization techniques\n\n## 🔄 Future Enhancements\n\n\u003cdetails\u003e\n\u003csummary\u003eView Planned Improvements\u003c/summary\u003e\n\n1. Implement multiple tmpfs mounts for different security levels\n2. Add monitoring and logging capabilities\n3. Develop automated testing suite\n4. Implement data encryption at rest\n5. Add horizontal scaling capabilities\n6. Enhance error handling and recovery\n\u003c/details\u003e\n\n## ⚙️ Installation\n\n\u003cdetails\u003e\n\u003csummary\u003eView Installation Details\u003c/summary\u003e\n\n### Prerequisites\n\n- Docker installed on your system\n- Python 3.9 or higher\n- Basic understanding of containerization\n\n### Setup Steps\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/TheToriqul/docker-in-memory-storage.git\ncd docker-in-memory-storage\n```\n\n2. Build the Docker image:\n```bash\ndocker build -t my_microservice .\n```\n\n3. Run the container:\n```bash\ndocker run --rm -d \\\n    --mount type=tmpfs,dst=/app/tmp,tmpfs-size=16k,tmpfs-mode=1770 \\\n    my_microservice\n```\n\n\u003c/details\u003e\n\n## 📖 Usage Guide\n\n\u003cdetails\u003e\n\u003csummary\u003eView Usage Details\u003c/summary\u003e\n\n### Basic Usage\n\nThe microservice automatically handles sensitive data in memory. To verify the setup:\n\n1. Check container status:\n```bash\ndocker ps\n```\n\n2. Inspect tmpfs mount:\n```bash\ndocker inspect \u003ccontainer_id\u003e\n```\n\n### Troubleshooting\n\n- Ensure tmpfs mount is properly configured\n- Verify memory allocation is sufficient\n- Check container logs for any errors\n\n\u003c/details\u003e\n\n## 📫 Contact\n\n- 📧 Email: toriqul.int@gmail.com\n- 📱 Phone: +65 8936 7705, +8801765 939006\n\n## 🔗 Project Links\n\n- [GitHub Repository](https://github.com/TheToriqul/docker-in-memory-storage)\n- [Documentation](https://github.com/TheToriqul/docker-in-memory-storage/blob/main/README.md)\n\n## 👏 Acknowledgments\n\n- [Poridhi for excellent labs](https://poridhi.io/)\n- Docker documentation for tmpfs mount guidance\n- Python community for microservice best practices\n\n---\n\nFeel free to explore, modify, and build upon this configuration as part of my learning journey. You're also welcome to learn from it, and I wish you the best of luck!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthetoriqul%2Fdocker-in-memory-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthetoriqul%2Fdocker-in-memory-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthetoriqul%2Fdocker-in-memory-storage/lists"}