Skip to Content

How do you orchestrate pgvector + FastAPI + Celery + Streamlit in dev?

Category: DevOps & Deployment

Answer

docker-compose.yml gives the whole stack a single declaration. Each service has an image (or build context), volumes, environment, depends_on, and a healthcheck. Bind-mount the source folder so a host edit live-reloads in containers. Use a single one-liner to start it all.

Concrete examples from the fca project context

Example 1

db: pgvector/pgvector:pg15 (extension pre-installed).

Example 2

web + worker: bind mount .:/app for hot reload, separate processes.

Example 3

frontend: Streamlit on 8501, talks to web via http://web:8000.

Example 4

worker ignores healthcheck (no HTTP port).

Data flow / flow chart

docker compose up
  db    -> web <- frontend
           \
            worker (Celery)

Takeaway

One docker-compose.yml replaces 5 README sections. Ship a working dev env in seconds.