candle-annotator/docker-compose.yml
Marko Djordjevic c327ba3370 bind: MLflow port to 127.0.0.1:5000:5000 in docker-compose.yml
Changes:
- Updated docker-compose.yml MLflow service port binding from 5000:5000 to 127.0.0.1:5000:5000
  to restrict access to localhost only for security
- Marked task 1.7 as complete in tasks.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 10:58:11 +01:00

89 lines
2.2 KiB
YAML

services:
candle-annotator:
build: .
ports:
- "3000:3000"
volumes:
- ml-data:/app/ml-data
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
- INFERENCE_API_URL=http://ml-service:8001
- INFERENCE_API_TIMEOUT=30000
- INFERENCE_BATCH_TIMEOUT=120000
- NEXT_PUBLIC_PREDICTIONS_ENABLED=true
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
ml-service:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
ml-service:
build: ./services/ml
ports:
- "8001:8001"
volumes:
- ml-data:/app/data
- mlflow-data:/app/mlruns
environment:
- MLFLOW_TRACKING_URI=http://mlflow:5000
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
- PYTHONUNBUFFERED=1
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
mlflow:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
mlflow:
image: ghcr.io/mlflow/mlflow:v2.10.0
ports:
- "127.0.0.1:5000:5000"
volumes:
- mlflow-data:/mlflow
command: >
mlflow server
--backend-store-uri /mlflow
--default-artifact-root /mlflow/artifacts
--host 0.0.0.0
--port 5000
restart: unless-stopped
postgres:
image: postgres:16-alpine
ports:
- "127.0.0.1:5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
ml-data:
mlflow-data:
postgres-data: