# Every port binds to BIND_ADDRESS (default 127.0.0.1; set it in .env, e.g. a VPN # address). The API has no authentication yet: whoever reaches that address reads it. x-python: &python build: { context: ., target: app } image: isssteleon-rebuild:dev volumes: ["./data:/data"] environment: DAGSTER_HOST: dagster-webserver DAGSTER_PORT: "3000" LLM_URL: ${LLM_URL:-} # any OpenAI-compatible endpoint; empty: extract uses its patterns LLM_MODEL: ${LLM_MODEL:-qwen3:4b} MLFLOW_TRACKING_URI: http://mlflow:5000 # the model registry (training, scoring, promotion) MLFLOW_DISABLE_AGENT_HINT: "1" EXECUTION_MODE: ${EXECUTION_MODE:-local} # sync, local or remote (Dask) DASK_SCHEDULERS: ${DASK_SCHEDULERS:-} # the allow-list of remote schedulers, comma separated DASK_EXPECTED_WORKERS: ${DASK_EXPECTED_WORKERS:-} DASK_DASHBOARD_URL: ${DASK_DASHBOARD_URL:-} DASK_LOCAL_WORKERS: ${DASK_LOCAL_WORKERS:-} # local cluster size (default: cores that fit in memory) restart: unless-stopped x-sql-server: &sql-server image: mcr.microsoft.com/mssql/server:2022-CU20-ubuntu-22.04 healthcheck: test: [CMD-SHELL, '/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P "$$MSSQL_SA_PASSWORD" -Q "select 1" -b'] interval: 5s retries: 30 x-sql-server-env: &sql-server-env ACCEPT_EULA: "Y" MSSQL_PID: Developer services: dagster-webserver: <<: *python command: > sh -c "mkdir -p /data/dagster && cp dagster.yaml /data/dagster/ && dagster-webserver -h 0.0.0.0 -p 3000 -w workspace.yaml" ports: ["${BIND_ADDRESS:-127.0.0.1}:${DAGSTER_PORT:-5712}:3000"] healthcheck: # healthy once the code location has loaded test: - CMD - python - -c - >- import json, urllib.request as u; q = {"query": "{repositoriesOrError {... on RepositoryConnection {nodes {name}}}}"}; r = u.urlopen(u.Request("http://localhost:3000/graphql", json.dumps(q).encode(), {"Content-Type": "application/json"})); assert json.load(r)["data"]["repositoriesOrError"]["nodes"] interval: 10s timeout: 60s retries: 30 dagster-daemon: <<: *python command: dagster-daemon run -w workspace.yaml depends_on: # the webserver loads the code location first (and writes dagster.yaml) dagster-webserver: { condition: service_healthy } api: <<: *python command: fastapi run WebApi/webapi/main.py --host 0.0.0.0 --port 8000 ports: ["${BIND_ADDRESS:-127.0.0.1}:${API_PORT:-5711}:8000"] depends_on: dagster-webserver: { condition: service_healthy } mlflow: image: ghcr.io/mlflow/mlflow:v3.18.0 command: > sh -c "mkdir -p /data/mlflow && exec mlflow server --host 0.0.0.0 --port 5000 --backend-store-uri sqlite:////data/mlflow/mlflow.db --artifacts-destination /data/mlflow/artifacts --allowed-hosts 'localhost:*,127.0.0.1:*,mlflow:*,${BIND_ADDRESS:-127.0.0.1}:*'" volumes: ["./data:/data"] ports: ["${BIND_ADDRESS:-127.0.0.1}:${MLFLOW_PORT:-5713}:5000"] restart: unless-stopped # Optional (`--profile llm`), with LLM_URL=http://llm:11434/v1. Any OpenAI-compatible # server works instead; without one, extract nodes use their patterns. llm: image: ollama/ollama:0.13.5 profiles: [llm] volumes: ["./data/ollama:/root/.ollama"] ports: ["${BIND_ADDRESS:-127.0.0.1}:${LLM_PORT:-5714}:11434"] restart: unless-stopped web: build: WebApp ports: ["${BIND_ADDRESS:-127.0.0.1}:${WEB_PORT:-5710}:80"] depends_on: [api] restart: unless-stopped # A hospital to connect (`--profile site`): SQL Server holding ISSSTELEON's test source # (Pruebas.dbo.ArchivosUni and ResultadosSubrogados, PDFs of synthetic patients, filled by # `python -m synthetic.load`). Not published: only the platform's containers reach it. site-sql: <<: *sql-server profiles: [site] environment: { <<: *sql-server-env, MSSQL_SA_PASSWORD: "${SITE_SQL_PASSWORD:-Synthetic-Site-1}" } volumes: ["site-sql:/var/opt/mssql"] restart: unless-stopped # `docker compose run --rm test`: the whole suite but the pages, on SQLite and PostgreSQL, # with OCR, the HL7 validator and the SQL Server a site's documents come from. # It also runs the Dask scheduler and workers the remote-mode tests use. test: build: { context: ., target: test } image: isssteleon-rebuild:test profiles: [test] environment: POSTGRES_TEST_URL: postgresql://postgres:postgres@postgres-test:5432/platform PGHOST: postgres-test SITE_SQL_SERVER: mssql+pymssql://sa:Test-only-Site-1@site-sql-test:1433 DASK_SCHEDULERS: tcp://dask-scheduler:8786 DASK_TEST_SCHEDULER: tcp://dask-scheduler:8786 DASK_EXPECTED_WORKERS: "2" depends_on: postgres-test: { condition: service_healthy } site-sql-test: { condition: service_healthy } dask-worker: { condition: service_started } site-sql-test: <<: *sql-server profiles: [test] environment: { <<: *sql-server-env, MSSQL_SA_PASSWORD: Test-only-Site-1 } postgres-test: image: postgres:17 profiles: [test] environment: { POSTGRES_PASSWORD: postgres, POSTGRES_DB: platform } healthcheck: test: [CMD, pg_isready] interval: 2s retries: 30 dask-scheduler: build: { context: ., target: test } image: isssteleon-rebuild:test profiles: [test] command: dask scheduler --port 8786 --dashboard-address :8787 mem_limit: 512m memswap_limit: 512m cpus: 1 healthcheck: test: [CMD, python, -c, "import urllib.request as u; u.urlopen('http://localhost:8787/health')"] interval: 2s retries: 30 dask-worker: build: { context: ., target: test } image: isssteleon-rebuild:test profiles: [test] command: dask worker tcp://dask-scheduler:8786 --nworkers 2 --nthreads 1 --memory-limit 1500MiB mem_limit: 3g memswap_limit: 3g cpus: 2 depends_on: dask-scheduler: { condition: service_healthy } volumes: site-sql: