Files
ISSSTELEON/compose.yml
T

81 lines
2.6 KiB
YAML

# Everything binds to 127.0.0.1: the API has no authentication yet.
x-python: &python
build: { context: ., target: app }
image: isssteleon-rebuild:dev
volumes: ["./data:/data"]
environment:
DAGSTER_HOST: dagster-webserver
DAGSTER_PORT: "3000"
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: ["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: ["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:*'"
volumes: ["./data:/data"]
ports: ["127.0.0.1:${MLFLOW_PORT:-5713}:5000"]
restart: unless-stopped
web:
build: WebApp
ports: ["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