# Local infrastructure for the Dynamic Pricing & Demand Forecasting Platform. # Compatible with Docker Compose v2 on Windows, macOS, and Linux. name: pricing-platform services: postgres: image: postgres:16-alpine container_name: pricing-postgres restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-pricing} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-pricing_local_change_me} POSTGRES_DB: ${POSTGRES_DB:-pricing} POSTGRES_MLFLOW_DB: ${POSTGRES_MLFLOW_DB:-mlflow} ports: - "${POSTGRES_PORT:-5433}:5432" volumes: - postgres_data:/var/lib/postgresql/data - ./docker/postgres/01_create_mlflow_db.sh:/docker-entrypoint-initdb.d/01_create_mlflow_db.sh:ro healthcheck: test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-pricing} -d ${POSTGRES_DB:-pricing}", ] interval: 5s timeout: 5s retries: 12 start_period: 10s networks: - pricing_net mlflow: build: context: . dockerfile: docker/mlflow/Dockerfile image: pricing-platform-mlflow:local container_name: pricing-mlflow restart: unless-stopped depends_on: postgres: condition: service_healthy environment: MLFLOW_BACKEND_STORE_URI: postgresql+psycopg://${POSTGRES_USER:-pricing}:${POSTGRES_PASSWORD:-pricing_local_change_me}@postgres:5432/${POSTGRES_MLFLOW_DB:-mlflow} MLFLOW_ARTIFACT_ROOT: ${MLFLOW_ARTIFACT_ROOT:-/mlflow/artifacts} ports: - "${MLFLOW_PORT:-5050}:5000" volumes: - mlflow_artifacts:/mlflow/artifacts healthcheck: test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:5000/ || exit 1", ] interval: 10s timeout: 5s retries: 12 start_period: 25s networks: - pricing_net volumes: postgres_data: mlflow_artifacts: networks: pricing_net: driver: bridge