ContainersDocker + Render IaC

Dockerized AI Stock Research Platform (NSE/BSE)

Multi-container Docker Compose & Render Blueprint setup orchestrating FastAPI, PostgreSQL, Redis, LangGraph agents, and React frontend.

Docker Compose

Containers

render.yaml

Cloud Spec

NSE / BSE

Markets

LangGraph

Agent Stack

Infrastructure & Delivery Flow

Docker Compose

Multi-Service Network

FastAPI Engine

Python 3.11 + Async

PostgreSQL + Redis

SQLAlchemy + Cache

LangGraph Agent

Quant Synthesis

Render Blueprint

render.yaml Deploy

The Infrastructure Challenge

Spinning up a Python ML backend, PostgreSQL, Redis, LangGraph agents, and a React frontend across developer machines led to environment drift and dependency conflicts.

Engineered DevOps Solution

Containerized the full stack with Docker Compose and a Render Blueprint (`render.yaml`), standardizing service networking, environment variables, Redis caching, and PostgreSQL init scripts.

What Broke & What I Learned

The FastAPI container initially tried connecting to PostgreSQL before the DB finished initializing inside Docker Compose. Adding proper service startup sequencing and health-aware connection retries prevented cold-start crashes.

Key Production Highlights

  • Single `docker-compose up --build` workflow for FastAPI, PostgreSQL, Redis, and React
  • Declarative Render Blueprint (`render.yaml`) for straightforward cloud deployment
  • Separated deterministic quantitative scoring from LangGraph LLM synthesis for reliability
  • Pluggable data provider interfaces supporting Yahoo Finance, Dhan, and Zerodha feeds

Tools & Infrastructure Stack

Docker ComposeFastAPIPostgreSQLRedisRender

Next DevOps Case Study

AWS S3 + CloudFront + EC2 + RDS Production Stack

Read Case Study