Ritu-AI / compose.yaml
SeriousSam07's picture
Backup before Problem Statement changes
a3b21d2
Raw History Blame Contribute Delete
3.96 kB
# ─────────────────────────────────────────────────────────────────────
# compose.yaml β€” Podman Compose with docker compose watch
# SKILL.md Rule 2: All services containerized
# ─────────────────────────────────────────────────────────────────────
name: isro-climate-twin
services:
# ─── FastAPI Backend ───────────────────────────────────────────────
api:
build:
context: .
dockerfile: backend/Containerfile
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql+asyncpg://climate:climate@postgres:5432/climatedb
REDIS_URL: redis://redis:6379/0
LITELLM_BASE_URL: http://litellm:4000
LITELLM_API_KEY: ${LITELLM_MASTER_KEY}
DEVICE: auto # auto-detect GPU/CPU
MODEL_HIDDEN_DIM: 32
LOG_LEVEL: info
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
litellm:
condition: service_started
volumes:
- ./backend/data:/app/data:ro
develop:
watch:
- action: sync
path: ./backend
target: /app/backend
ignore:
- backend/__pycache__
- backend/.pytest_cache
- action: sync+restart
path: backend/pyproject.toml
# ─── React Frontend ────────────────────────────────────────────────
frontend:
build:
context: ./frontend
dockerfile: Containerfile
ports:
- "5173:5173"
environment:
- VITE_API_BASE_URL=http://api:8000
depends_on:
- api
volumes:
- ./frontend:/app
- /app/node_modules
develop:
watch:
- action: sync
path: ./frontend/src
target: /app/src
- action: rebuild
path: ./frontend/package.json
# ─── LiteLLM FinOps Gateway ────────────────────────────────────────
litellm:
image: ghcr.io/berriai/litellm:main-latest
ports:
- "4000:4000"
environment:
GEMINI_API_KEY: ${GEMINI_API_KEY}
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY}
LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
volumes:
- ./backend/litellm_config/config.yaml:/app/config.yaml:ro
command: ["--config", "/app/config.yaml", "--port", "4000", "--num_workers", "1"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
interval: 10s
timeout: 5s
retries: 5
# ─── PostgreSQL + TimescaleDB ──────────────────────────────────────
postgres:
image: timescale/timescaledb:latest-pg16
ports:
- "5432:5432"
environment:
POSTGRES_DB: climatedb
POSTGRES_USER: climate
POSTGRES_PASSWORD: climate
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U climate -d climatedb"]
interval: 5s
timeout: 5s
retries: 10
# ─── Redis Cache & Agent State ─────────────────────────────────────
redis:
image: redis:7-alpine
ports:
- "6379:6379"
command: redis-server --maxmemory 256mb --maxmemory-policy allkeys-lru
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
volumes:
postgres_data: