Cognosa Deployment Topology

EC2 hosts, Docker Compose containers, and external services

Where each runtime piece of the Cognosa web app lives: the per-environment EC2 application host and its six Docker Compose containers, the GPU host for Ollama, the four cloud LLM APIs, and the AWS and external services around them. Qdrant is the vector store shown; ChromaDB and pgvector are tested drop-in alternatives behind the same group_vdbs config.

prod.cognosa.net (planned) same compose stack · host TBD demo.cognosa.net · 52.13.212.94 i-0cb656285d48d9bfc · c6a.xlarge · up 10:00–18:00 PT Docker Compose · 6 containers dev.cognosa.net · 44.230.124.164 EC2 i-01cf57d1433d161fc · c6a.xlarge · Ubuntu 24.04 · us-west-2 docker compose · systemd cognosa.service · ops dir ~/cognosa · clone ~/cognosa-src nginx nginx:stable · 80/443 app FastAPI + uvicorn :8000 rt run_tasks.py · LangChain certbot profile tools · on demand db postgres:17 · :5432 qdrant qdrant v1.15.5 · :6333 hf_cache (app + rt) ./pg_db_data ./qdrantdb proxy_pass app:8000 SQLAlchemy asyncpg polls doc_tasks, writes status 0 → 6 + answer embed + search langchain-qdrant ollama_local / other remote e.g. Mac Studio :11434 ollama serve systemd service · :11434 · not a container LLM host · EC2 g6e.2xlarge NVIDIA L40S 48 GB · 300 GB gp3 · ollama_remote Users browser · React SPA user · group admin · superuser Route 53 · cognosa.net zone dev → 44.230.124.164 demo → 52.13.212.94 (elastic IPs) Let’s Encrypt ACME http‑01 via nginx webroot certbot renew cron Mon/Thu 03:17 UTC Qwen / Alibaba DashScope · OpenAI‑compatible ChatGPT / OpenAI langchain-openai Gemini / Google langchain-google-genai Claude / Anthropic langchain-anthropic cloud LLM APIs · one group_llms row each EventBridge Scheduler demo: start 10:00 · stop 18:00 PT dev: manual start/stop only Hugging Face Hub all‑MiniLM‑L6‑v2 BAAI/bge‑base‑en‑v1.5 Developer Mac ssh -i ctc01instance.pem ubuntu@… cd ~/cognosa && ./deploy.sh [ref] Git remotes GitHub origin · GitLab mirror branch main DNS lookup HTTPS 443 HTTP 80 → 301 issue / renew cert nginx_certs volume model download on first use ec2:start / stopInstances ssh 22 deploy.sh: git pull origin/main compose build → up -d push / pull chat completions, streaming ChatOpenAI · ChatAnthropic · ChatGoogleGenerativeAI OpenAI‑compatible /v1 :11434
Solid platform is the dev host as deployed today. Dashed outlines behind it are the same compose stack on other hosts: demo (live, scheduled power) and prod (planned). Nginx terminates TLS and proxies to app; app serves the React SPA and the REST API and writes queries to Postgres; rt polls Postgres for new tasks, embeds and searches in Qdrant, then streams the answer from whichever LLM the group's config names.
Container, Python process (ollama: systemd service) Container, data store Container, edge / TLS Volume or bind mount External or AWS service Replicated or alternate instance Arrows point from the client that opens the connection to the service that listens; the label says what moves.

Hosts

HostInstanceRunsPowerTLS
dev.cognosa.net
44.230.124.164
c6a.xlarge, Ubuntu 24.04, us-west-2
i-01cf57d1433d161fc
compose: nginx, app, rt, db, qdrant (+ certbot on demand)Manual start and stopLet's Encrypt on the box, cron renew
demo.cognosa.net
52.13.212.94
c6a.xlarge, Ubuntu 24.04, us-west-2
i-0cb656285d48d9bfc
Same compose stackEventBridge Scheduler 10:00 to 18:00 PT dailyLet's Encrypt on the box, cron renew
prod (planned)TBDSame compose stackAlways onLet's Encrypt or CloudFront, undecided
LLM hostg6e.2xlarge, NVIDIA L40S 48 GB, 300 GB gp3ollama serve under systemd on :11434, OpenAI-compatible /v1Started when a local-model demo needs itNone, reached as ollama_remote

Inside the application host

ContainerImage or buildPortsStorageRole
nginxnginx:stable80, 443nginx_certs, nginx_vhost, ./nginxHTTPS termination, HTTP 301, proxy to app:8000, certbot webroot
appwebapp.Dockerfile8000 internal./app_logs, hf_cacheFastAPI + uvicorn, fastapi-users JWT, serves the built React SPA from backend/static
rtrun_tasks.Dockerfilenone./rt_logs, hf_cacherun_tasks.py: 2 VDB worker processes with preloaded embedding models, threaded LLM workers, LangChain chains, watchdogs
dbpostgres:175432./pg_db_datacwa_db: tenants, users, LLM and VDB configs, contexts, doc_tasks, audit log
qdrantqdrant/qdrant:v1.15.56333./qdrantdbOne collection per tenant VDB, metadata-filtered hybrid retrieval
certbotcertbot/certbotnonenginx_certs, nginx_vhostProfile tools; run on demand for issue and renew