Current Runtime Architecture
This document describes the current Docker Compose architecture used by Vortex. The root orchestrator is compose.yml using Compose include to load service-specific */compose.yml files.
Service Topology Diagram
mermaid
graph TD
VUE["vue-nginx"] --> FASTAPI["fastapi"]
FASTAPI --> REDIS["redis (db0)"]
FASTAPI --> PGBOUNCER["pgbouncer"]
FASTAPI_WORKER["fastapi-worker"] --> REDIS
FASTAPI_WORKER --> PGBOUNCER
PGBOUNCER --> POSTGRES["postgres"]
AIRFLOW_INIT["airflow-init"] --> POSTGRES
AIRFLOW_INIT --> REDIS
AIRFLOW_WEBSERVER["airflow-webserver"] --> POSTGRES
AIRFLOW_WEBSERVER --> REDIS
AIRFLOW_SCHEDULER["airflow-scheduler"] --> POSTGRES
AIRFLOW_SCHEDULER --> REDIS
AIRFLOW_WORKER["airflow-worker"] --> POSTGRES
AIRFLOW_WORKER --> REDIS
AIRFLOW_TRIGGERER["airflow-triggerer"] --> POSTGRES
AIRFLOW_TRIGGERER --> REDIS
FLOWER["flower"] --> REDIS
AIRFLOW_SCHEDULER --> DBT["dbt-runner"]
DBT --> POSTGRES
DBT_DOCS["dbt-docs"] --> POSTGRES
SUPERSET_INIT["superset-init"] --> POSTGRES
SUPERSET_INIT --> REDIS
SUPERSET["superset"] --> POSTGRES
SUPERSET --> REDIS
SUPERSET_WORKER["superset-worker"] --> POSTGRES
SUPERSET_WORKER --> REDIS
SUPERSET_BEAT["superset-beat"] --> POSTGRES
SUPERSET_BEAT --> REDIS
PGADMIN["pgadmin"] --> POSTGRES
PROM_EXPORTER["postgres-exporter"] --> POSTGRES
PROMETHEUS["prometheus"] --> PROM_EXPORTER
PROMETHEUS --> FASTAPI
PROMETHEUS --> AIRFLOW_WEBSERVER
PROMETHEUS --> SUPERSET
PROMETHEUS --> ALERTMANAGER["alertmanager"]
GRAFANA["grafana"] --> PROMETHEUS
GRAFANA --> LOKI["loki"]
PROMTAIL["promtail"] --> LOKI
OTEL["otel-collector"] --> TEMPO["tempo"]
GRAFANA --> TEMPO
TRAEFIK["traefik"] --> VUE
TRAEFIK --> FASTAPI
TRAEFIK --> AIRFLOW_WEBSERVER
TRAEFIK --> SUPERSET
TRAEFIK --> GRAFANA
TRAEFIK --> PGADMIN
MINIO["minio"]Service Connection Map
postgres: receives connections frompgbouncer, Airflow services, Superset services,dbt-runner,dbt-docs,pgadmin, andpostgres-exporter.pgbouncer: receives DB traffic fromfastapiandfastapi-worker, forwards topostgres.redis: receives queue/broker traffic fromfastapi,fastapi-worker, Airflow services, Superset services, andflower.fastapi: receives HTTP fromvue-nginx(and optionally Traefik), writes queue messages to Redis, reads/writes relational data through PgBouncer.fastapi-worker: consumes Redis queue messages and writes to Postgres through PgBouncer.vue-nginx: serves frontend, callsfastapibackend.airflow-init: one-time metadata/admin bootstrap against Postgres + Redis.airflow-webserver: Airflow UI/API, backed by Postgres + Redis.airflow-scheduler: schedules DAGs and coordinates work via Postgres + Redis; triggers dbt DAG runs.airflow-worker: executes Celery tasks using Redis broker and Postgres metadata.airflow-triggerer: handles deferrable tasks; uses Postgres + Redis.flower: observes Airflow Celery workers through Redis broker.dbt-runner: on-demand transform execution against Postgres.dbt-docs: serves dbt docs and reads dbt metadata/project context.superset-init: one-time metadata/admin bootstrap against Postgres + Redis.superset: BI UI/API backed by Postgres metadata and Redis async channels.superset-worker: async query/background worker using Redis + Postgres.superset-beat: periodic Superset jobs using Redis + Postgres.pgadmin: admin UI connecting directly to Postgres.prometheus: scrapes metrics targets (prometheus,postgres-exporter,fastapi,airflow-webserver,superset) and forwards alerts toalertmanager.alertmanager: receives alerts from Prometheus and routes notifications.postgres-exporter: reads Postgres metrics and exposes them to Prometheus.grafana: queries Prometheus (metrics), Loki (logs), and Tempo (traces) for dashboards.loki: receives logs from Promtail.promtail: tails host/container logs and pushes to Loki.tempo: trace backend, receives telemetry fromotel-collector.otel-collector: telemetry pipeline that exports traces to Tempo.traefik: optional edge proxy routing to selected internal UIs/APIs.minio: S3-compatible object store service (currently standalone in this topology).
Core Data and Queue Plane
postgres
- System-of-record relational database for application, analytics, and metadata domains.
- Custom image:
vortex-postgres. - Backed by the
postgresvolume. - Hosts multiple logical databases used by the stack (for example Vortex app data, Airflow metadata DB, Superset metadata DB).
pgbouncer
- Connection pooler in front of Postgres for high-concurrency API workloads.
- Custom image:
vortex-pgbouncer(PgBouncer1.25.2). - Exposes host port
6432and forwards to Postgres. - Used by FastAPI services (
fastapi,fastapi-worker) to reduce direct connection churn.
redis
- Shared in-memory broker/cache used by async components.
- Custom image:
vortex-redis. - Backed by the
redisvolume. - Logical DB usage:
0: FastAPI worker queue and app async messaging.2: Airflow Celery broker (and Flower when enabled).- Also used by Superset task workers.
Application Runtime
fastapi
- Primary backend API service (
uvicorn). - Custom image:
vortex-fastapi. - Depends on Postgres (through PgBouncer) and Redis.
- Exposes host port
8000. - Health endpoint used for container health checks.
- Example ingest endpoint:
POST /example/events(writes events to Redis queue for worker consumption).
fastapi-worker
- Background worker process for async jobs initiated by the API layer.
- Shares the same codebase and env as
fastapi. - Consumes Redis-backed work and persists state in Postgres via PgBouncer.
- For the example pipeline, consumes
vortex:example:eventsand writes toanalytics.example_events_raw.
vue-nginx
- Vue frontend served by NGINX.
- Custom image built from
vue/Dockerfile. - Depends on
fastapibeing available. - Exposes host port
5173mapped to container port80.
Workflow and Scheduling Plane (Airflow)
airflow-webserver
- Airflow UI/API plane for DAG visibility and operations.
- Exposes host port
8081.
airflow-scheduler
- Evaluates DAG schedules and enqueues task instances.
airflow-worker
- Celery worker that executes queued Airflow tasks.
airflow-triggerer
- Runs deferrable operators and trigger-based async orchestration.
Supporting init service: airflow-init
- One-time database migration and admin bootstrap.
- Must complete successfully before other Airflow services start.
Airflow uses:
- Postgres (
airflowdatabase) for metadata and task result backend. - Redis DB
2as Celery broker. - Bind mount for DAGs:
airflow/dags -> /opt/airflow/dags. - Bind mount for dbt project (read-only):
dbt -> /opt/vortex/dbt. - Named volumes for logs/plugins:
airflow-logs,airflow-plugins. - Airflow image is custom (
vortex-airflow) and includesdbt-postgresfor DAG-driven transformations. - Example scheduled DAG:
vortex_dbt_example(hourly) runsdbt run.
Analytics and BI Plane (Superset)
superset
- Superset web UI and API.
- Exposes host port
8088.
superset-worker
- Celery worker for async query jobs and background tasks.
superset-beat
- Celery beat scheduler for periodic Superset jobs.
Supporting init service: superset-init
- Runs DB migrations, admin creation, and app initialization.
Superset uses:
- Postgres (
supersetdatabase) for metadata. - Redis for async Celery workloads.
- Custom image:
vortex-superset. - Persistent volume
superset. - Environment-driven configuration (no dedicated
superset_config.pymount).
Data Transformation Plane
dbt-runner
- Ephemeral dbt execution container used to run transformations against Postgres.
- Custom image:
vortex-dbt. - Reads project files from
dbt/via bind mount to/usr/app. - Uses environment-driven profile values for target DB/schema.
Related utility:
dbt-docsserves dbt docs on host port8082.
Admin Plane
pgadmin
- Database administration UI.
- Custom image:
vortex-pgadmin. - Exposes host port
5050. - Depends on healthy Postgres.
- Uses persistent volume
pgadmin-data.
Edge and Routing (nginx-or-traefik)
Vortex currently supports two edge patterns:
Local/default edge
vue-nginxserves the frontend directly on5173.- Backend and platform UIs are exposed on their own ports (
8000,8081,8088, etc.).
Traefik overlay (traefik)
- Optional reverse proxy and TLS termination layer (
traefik/compose.yml). - Custom image:
vortex-traefik. - Exposes
80/443and can route host-based domains (including Traefik dashboard). - Uses Docker provider labels and ACME certificate resolver.
- Attaches to external network
traefik-public.
Observability Plane
Metrics
prometheus(vortex-prometheus): metrics scrape and rule evaluation (port9090).postgres-exporter(vortex-postgres-exporter): Postgres metrics endpoint (port9187) for Prometheus.grafana(vortex-grafana): dashboards and visualization (port3000, persistentgrafana-data).alertmanager: alert routing and notification fan-out endpoint (port9093, persistentalertmanager-data).- Prometheus forwards fired alerts to
alertmanager:9093. - Alert rules are loaded from
prometheus/rules/*.yml.
- Prometheus forwards fired alerts to
Logs
loki(vortex-loki): log store and query backend (port3100).promtail(vortex-promtail): log shipper that tails host logs and pushes to Loki.
Traces
tempo: trace backend (port3200and OTLP gRPC ingest mapped on4319).otel-collector: OpenTelemetry ingest/processor/exporter (ports4317,4318,8889) exporting traces to Tempo.
Optional Platform Services
flower
- Celery monitoring UI for Airflow worker queues.
- Exposes host port
5555. - Uses Redis DB
2broker connectivity.
minio
- S3-compatible object storage service.
- Exposes host ports
9000(API) and9001(console). - Uses persistent volume
minio-data.
Service Dependency Summary
Primary runtime dependency chain:
postgresandredisstart first.pgbouncerstarts after Postgres health is green.fastapiandfastapi-workerstart after Postgres, PgBouncer, and Redis.vue-nginxstarts afterfastapi.airflow-initandsuperset-initbootstrap metadata before their control-plane services.dbt-runneris invoked on demand or by Airflow DAG orchestration.- Observability stack runs alongside and monitors the rest of the platform.
- Prometheus evaluates alert rules and forwards alert events to Alertmanager.
Network and Port Map (Host)
5173: Vue app via NGINX (vue-nginx)8000: FastAPI8081: Airflow webserver8088: Superset5050: pgAdmin6432: PgBouncer6379: Redis9090: Prometheus9093: Alertmanager3000: Grafana9187: Postgres exporter3100: Loki3200: Tempo query API4317: OTEL Collector gRPC ingest4318: OTEL Collector HTTP ingest4319: Tempo OTLP gRPC ingest (host-mapped)5555: Flower9000: MinIO API9001: MinIO Console80/443: Traefik (optional overlay)
Source of Truth
This page reflects the current Compose manifests:
compose.yml(root includes)postgres/compose.ymlpgbouncer/compose.ymlredis/compose.ymlfastapi/compose.ymlvue/compose.ymlairflow/compose.ymlsuperset/compose.ymldbt/compose.ymlpgadmin/compose.ymltraefik/compose.ymlprometheus/compose.ymlalertmanager/compose.ymlgrafana/compose.ymlpostgres-exporter/compose.ymlloki/compose.ymlpromtail/compose.ymlflower/compose.ymlminio/compose.ymlotel/compose.ymltempo/compose.yml