95 lines
3.4 KiB
YAML
95 lines
3.4 KiB
YAML
# 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"
|
|
restart: unless-stopped
|
|
|
|
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
|
|
|
|
# `docker compose run --rm test`: the whole suite, on SQLite and PostgreSQL, with OCR.
|
|
test:
|
|
build: { context: ., target: test }
|
|
profiles: [test]
|
|
environment:
|
|
POSTGRES_TEST_URL: postgresql://postgres:postgres@postgres-test:5432/platform
|
|
PGHOST: postgres-test
|
|
depends_on:
|
|
postgres-test: { condition: service_healthy }
|
|
|
|
postgres-test:
|
|
image: postgres:17
|
|
profiles: [test]
|
|
environment: { POSTGRES_PASSWORD: postgres, POSTGRES_DB: platform }
|
|
healthcheck:
|
|
test: [CMD, pg_isready]
|
|
interval: 2s
|
|
retries: 30
|