🚀 Built my first multi-container application using Docker! Over the past few days, I worked through building a simple Flask web app connected to a Redis database — all containerised and orchestrated with Docker Compose. 🔧 What I built: A Flask app with multiple routes: • / → welcome page • /count → increments visit count • /reset → resets the counter Redis used as a key-value store for tracking visits Multi-container setup using Docker Compose 🧠 What I learned: How to containerise a Python application using a Dockerfile Running multiple services with Docker Compose Container-to-container communication using service names (no localhost!) Using environment variables instead of hardcoding configuration Persisting data with Docker volumes 📌 Key takeaway: Understanding how services communicate inside containers (and debugging when they don’t!) was the biggest learning moment. Next step: exploring scaling and load balancing 👀 #Docker #DevOps #Python #Flask #Redis #LearningInPublic CoderCo
Building Multi-Container App with Docker and Flask
More Relevant Posts
-
This case study shows building a centralized multi-account AWS monitoring platform managing 25+ accounts using Python Boto3 to fetch resource configurations into MongoDB, with Flask API and Next.js frontend achieving $30k annual savings. More: https://ku.bz/LV7qH0CK1
To view or add a comment, sign in
-
-
You don't always need Redis. Here's a rate limiter I built in 40 lines of pure Python. No django-ratelimit. No external dependencies. Just a sliding window algorithm, a dictionary, and timestamps. The core idea: → Every request logs a timestamp against a client key → On each new request, prune anything older than your window → If the remaining count hits your limit — return 429 → Otherwise, log it and let it through That's the entire algorithm. I plugged it into Django middleware and a per-view decorator so you can control limits at both levels. I've used Redis-backed rate limiters in production. They're great when you need them. But for a personal project, an internal tool, or a lightweight API — this does the job without the infrastructure overhead. Full implementation + Django integration on my Medium. Also covers the one IP extraction detail that will silently break your limiter if you're behind a proxy — worth checking even if you're using a library. #Python #Django #BackendDevelopment #SoftwareEngineering #WebDevelopment
To view or add a comment, sign in
-
Just published a deep-dive blog on Docker + Python 🐳 Covered everything from scratch: → What Docker actually is (with a Maggie noodles analogy, yes) → Writing your first Dockerfile → Docker Compose for multi-service apps → Production setup with Gunicorn + Nginx → Deploying on AWS EC2 If you've been confused about containers, images, port mapping, or why your app "works on your machine" but breaks on the server - this one's for you. Link https://lnkd.in/gcn7atem #Docker #Python #DevOps #WebDevelopment #Flask #CloudComputing #AWS #Programming #100DaysOfCode #TechBlog
To view or add a comment, sign in
-
-
We launched our MCP server as an npm package yesterday, and the adoption has been insane!! You can now take any React or Python Claude Code project to production on AWS in literally one command. Try it out and ship faster - https://lnkd.in/d3mpXw5B
To view or add a comment, sign in
-
-
A minimal Python MCP server, validated locally with Gemini CLI, then deployed to AWS ECS Express in a single step. This dev walks through the incremental approach — from stdio transport to HTTP, from local to remote — without the extra noise. { author: William McLean + Google Developer Experts } https://lnkd.in/eQ6R5cbc
To view or add a comment, sign in
-
We’re excited to announce the production-ready release of Microsoft Agent Framework 1.0 for .NET and Python, bringing stable APIs, long‑term support, and enterprise‑grade foundations for building agentic and multi‑agent systems.
To view or add a comment, sign in
-
You don't need Node.js for real-time applications. This is the assumption I challenged when I required WebSocket support in a Django project. The common advice suggests adding a Node service for the real-time components, which introduces a second language, a second deployment pipeline, and an additional point of failure. Django Channels combined with Redis demonstrated that this approach is unnecessary. Here’s the setup: - Daphne replaces Gunicorn as the ASGI server, managing both HTTP and WebSocket on the same process. - ProtocolTypeRouter effectively splits traffic: HTTP requests are directed to Django, while WebSocket connections are handled by Channels consumers. - Redis acts as a message broker and serves as the channel layer, enabling pub/sub functionality across all connected consumers. - Consumers are async Python classes with methods like receive(), group_send(), and disconnect(). The outcome is that a message sent by one client reaches Redis, propagates to every consumer in the group, and connects with all clients, without leaving the Python ecosystem. No Node. No socket.io. No separate service to maintain. Everything operates within the same Docker container as the rest of the backend, utilizing the same codebase, deployments, and logs. Sometimes, the seemingly boring choice is actually the most intelligent one. #django #python #webdev #backend #software #architecture
To view or add a comment, sign in
-
-
I've built a comprehensive Django REST API for project and task management designed to streamline team collaboration. Here's what's under the hood: ✨ Key Features: 1. JWT-based authentication with secure refresh tokens 2. Full CRUD operations for projects and tasks 3. Async task processing with Celery & Redis 4. Email notifications for task updates 5. Complete RESTful API endpoints Tech Stack: Django 5.x | Django REST Framework | PostgreSQL | Celery + Redis 🔗 Check it out: https://lnkd.in/gvBjwbXs #Django #REST_API #Python #Backend #ProjectManagement #OpenSource
To view or add a comment, sign in
-
We all use Redis libraries to work with Redis, but what actually happens under the hood when you call redis_client.get("key")? To find out, I built a simple Redis client in Python from scratch using raw TCP sockets. It implements a subset of redis commands and basic features of a client library. Here's what happens: 1. Whenever you call a command, it gets converted into a list of strings similar to what you'd type in redis-cli. redis_client.get("key") → ["GET", "key"] 2. This is then encoded into bytes using the RESP protocol. ["GET", "key"] → "*2\r\n$3\r\nGET\r\n$3\r\nkey\r\n" 3. These bytes are transmitted over a TCP socket, and the Redis server responds with the result of the command. 4. Finally the response is then parsed back from bytes into a Python value and returned to caller or error is raised. What I found most interesting is how simple and thoughtful the RESP protocol is. Simple protocol means less time on the network and more time doing actual work. For Redis that promises speed, it makes sense to keep everything around it as lightweight as possible. I would recommend you to read the RESP protocol, you can understand it in an hour. Start with RESP2 as its the widely used and actually the first one. Code: https://lnkd.in/gXp7ZM5p #Python #Redis #BackendDevelopment #LearningByBuilding
To view or add a comment, sign in
-
Before Docker, my FastAPI app only ran on my machine. Setting it up anywhere else meant installing Python, PostgreSQL, configuring ports, matching versions... With Docker, I reduced that to 2 commands: git clone ... docker compose up --build I containerized a FastAPI + PostgreSQL REST API covering users, products, and orders. The database and app run as isolated services that communicate through Docker's internal network. What I learned: Writing Dockerfiles Docker Compose for multi-container apps Container networking repo: https://lnkd.in/diy7H_Xh I also noted down every important Docker command I learned as a cheatsheet, might be useful if you're just starting out:https://lnkd.in/dchhqHkC #Docker #Python #FastAPI #Backend #Learning
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development