services: db: image: postgres:16-alpine environment: POSTGRES_USER: rarelens POSTGRES_PASSWORD: rarelens POSTGRES_DB: rarelens ports: ["5432:5432"] volumes: [pgdata:/var/lib/postgresql/data] healthcheck: test: ["CMD-SHELL", "pg_isready -U rarelens"] interval: 5s retries: 10 api: build: ./api environment: DATABASE_URL: postgresql+asyncpg://rarelens:rarelens@db:5432/rarelens MLFLOW_TRACKING_URI: http://mlflow:5000 ports: ["8000:8000"] depends_on: db: { condition: service_healthy } volumes: ["./api:/app"] command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload web: build: context: ./web target: build environment: PUBLIC_API_URL: http://localhost:8000/api ports: ["5173:5173"] depends_on: [api] volumes: ["./web:/app", "/app/node_modules"] command: npm run dev -- --host mlflow: image: ghcr.io/mlflow/mlflow:v3.16.0 # --artifacts-destination makes the server proxy artifacts over HTTP; a bare local # --default-artifact-root would hand clients a /mlruns path only this container can see. command: > mlflow server --host 0.0.0.0 --backend-store-uri sqlite:////mlruns/mlflow.db --artifacts-destination /mlruns ports: ["5000:5000"] volumes: [mlruns:/mlruns] volumes: pgdata: mlruns: