version: '3.8'

services:
  postgres:
    image: postgres:15-alpine
    container_name: maternal-postgres
    environment:
      POSTGRES_DB: maternal_app
      POSTGRES_USER: maternal_user
      POSTGRES_PASSWORD: maternal_dev_password_2024
    ports:
      - "5555:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - maternal-network

  redis:
    image: redis:7-alpine
    container_name: maternal-redis
    ports:
      - "6666:6379"
    volumes:
      - redis_data:/data
    networks:
      - maternal-network
    command: redis-server --appendonly yes

  mongodb:
    image: mongo:4.4
    container_name: maternal-mongodb
    environment:
      MONGO_INITDB_ROOT_USERNAME: maternal_admin
      MONGO_INITDB_ROOT_PASSWORD: maternal_mongo_password_2024
      MONGO_INITDB_DATABASE: maternal_ai_chat
    ports:
      - "27777:27017"
    volumes:
      - mongodb_data:/data/db
    networks:
      - maternal-network

  minio:
    image: minio/minio:RELEASE.2023-01-25T00-19-54Z
    container_name: maternal-minio
    environment:
      MINIO_ROOT_USER: maternal_minio_admin
      MINIO_ROOT_PASSWORD: maternal_minio_password_2024
    ports:
      - "9002:9000"
      - "9003:9001"
    volumes:
      - minio_data:/data
    networks:
      - maternal-network
    command: server /data --console-address ":9001"

networks:
  maternal-network:
    driver: bridge

volumes:
  postgres_data:
  redis_data:
  mongodb_data:
  minio_data: